Merge lp:~pwlars/ubuntu-test-cases/jenkins-provision-version into lp:ubuntu-test-cases/smoke-touch-apps

Proposed by Paul Larson
Status: Merged
Merged at revision: 88
Proposed branch: lp:~pwlars/ubuntu-test-cases/jenkins-provision-version
Merge into: lp:ubuntu-test-cases/smoke-touch-apps
Diff against target: 53 lines (+15/-4)
2 files modified
jenkins/jenkins.sh (+4/-4)
jenkins/provision.sh (+11/-0)
To merge this branch: bzr merge lp:~pwlars/ubuntu-test-cases/jenkins-provision-version
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
Review via email: mp+183773@code.launchpad.net

Description of the change

* Move the version tagging to provision.sh
* make jenkins.sh use it

To post a comment you must log in.
88. By Paul Larson

missing quote

Revision history for this message
Andy Doan (doanac) wrote :

8 - BUILDID=`cat ${RESDIR}/media-info | awk '{ print $(NF)}' | sed -e 's/(//' -e 's/)//'`
9 - echo "= TOUCH BUILD DATE:$BUILDID"
10 + BUILDID=$(adb shell cat /home/phablet/.ci-version)
11 + echo "= TOUCH IMAGE VERSION:$BUILDID"

you've got spaces instead of tabs I think

Revision history for this message
Andy Doan (doanac) wrote :

+1 once you fix tabs/spaces

review: Approve
89. By Paul Larson

Fixes and cleanups after testing locally

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'jenkins/jenkins.sh'
2--- jenkins/jenkins.sh 2013-08-30 15:26:47 +0000
3+++ jenkins/jenkins.sh 2013-09-04 03:17:16 +0000
4@@ -51,7 +51,7 @@
5 --from-host \
6 --results-dir ${RESDIR} \
7 --skip-install --skip-network --skip-utah \
8- --pull /var/crash \
9+ --pull /var/crash \
10 --pull /home/phablet/.cache/upstart \
11 -l ${TESTSUITE_HOST}/master.run
12 }
13@@ -63,8 +63,8 @@
14 # print the build date so the jenkins job can use it as the
15 # build description
16 adb -s ${ANDROID_SERIAL} pull /var/log/installer/media-info ${RESDIR}
17- BUILDID=`cat ${RESDIR}/media-info | awk '{ print $(NF)}' | sed -e 's/(//' -e 's/)//'`
18- echo "= TOUCH BUILD DATE:$BUILDID"
19+ BUILDID=$(adb shell cat /home/phablet/.ci-version)
20+ echo "= TOUCH IMAGE VERSION:$BUILDID"
21
22 adb shell "top -n1 -b" > ${RESDIR}/top.log
23
24@@ -91,7 +91,7 @@
25 echo "launching test from the host...."
26 test_from_host
27 fi
28- adb shell 'rm -f /var/crash/*'
29+ adb shell 'rm -f /var/crash/*'
30
31 if ! `grep "^errors: [!0]" < $UTAHFILE >/dev/null` ; then
32 echo "errors found"
33
34=== modified file 'jenkins/provision.sh'
35--- jenkins/provision.sh 2013-08-21 20:24:54 +0000
36+++ jenkins/provision.sh 2013-09-04 03:17:16 +0000
37@@ -22,5 +22,16 @@
38
39 ${UTAH_PHABLET_CMD} -s ${ANDROID_SERIAL} --results-dir ${RESDIR} --network-file=${NETWORK_FILE} ${TOUCH_IMAGE}
40
41+# mark the version we installed in /home/phablet/.ci-version
42+if [ -n "$TOUCH_IMAGE" ]; then
43+ DEVICE_TYPE=$(adb shell "getprop ro.cm.device" |tr -d '\r')
44+ bzr export utils lp:~ubuntu-system-image/ubuntu-system-image/server/utils
45+ IMAGEVER=$(utils/check-latest ${DEVICE_TYPE} |sed -n 's/Current full image: \([0-9]*\).*ubuntu=\([0-9\.]*\),.*=\([0-9\.]*\))/\1:\2:\3/p')
46+ rm -rf utils
47+else
48+ IMAGEVER=$(adb shell "cat /var/log/installer/media-info |sed 's/.*(\([0-9\.]*\))/\1/'")
49+fi
50+adb shell "echo '${IMAGEVER}' > /home/phablet/.ci-version"
51+
52 # get our target-based utilities into our PATH
53 adb -s ${ANDROID_SERIAL} push ${BASEDIR}/../utils/target /usr/local/bin/

Subscribers

People subscribed via source and target branches