Merge lp:~fginther/ubuntu-test-cases/boottest-standalone into lp:~canonical-ci-engineering/ubuntu-test-cases/bootttest

Proposed by Francis Ginther
Status: Merged
Approved by: Francis Ginther
Approved revision: 2
Merged at revision: 2
Proposed branch: lp:~fginther/ubuntu-test-cases/boottest-standalone
Merge into: lp:~canonical-ci-engineering/ubuntu-test-cases/bootttest
Diff against target: 79 lines (+14/-7)
1 file modified
boottest.sh (+14/-7)
To merge this branch: bzr merge lp:~fginther/ubuntu-test-cases/boottest-standalone
Reviewer Review Type Date Requested Status
Paul Larson Approve
Review via email: mp+261151@code.launchpad.net

Commit message

Modify paths and bzr branch lp:ubuntu-test-cases/touch as a dependency.

Description of the change

Modify paths and bzr branch lp:ubuntu-test-cases/touch as a dependency.

The result of this is a working version of boottest that is separated from lp:ubuntu-test-cases/touch. It does use lp:ubuntu-test-cases/touch as a dependency, grabbing a fresh copy on each run.

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

Found one potential issue, otherwise looks pretty good. I do think this is a sane idea, and moves us more towards the model we are shooting for. In the future, this really should be a standalone piece that anyone could own.

review: Needs Fixing
Revision history for this message
Francis Ginther (fginther) wrote :

My intention is that this branch contain everything specifically related to boottesting. This includes:

 - boottest.sh
 - adt-run.py (specifically used by boottest.sh to execute adt-run)
 - tests/boottest - The dep8 test used to execute the actual test
 - tests/bootfail - Another dep8 test used to test an actual boot failure

If you think boottest.sh and adt-run belong under a scripts dir, I'm fine with that.

Revision history for this message
Paul Larson (pwlars) wrote :

Ok, I missed that you moved it already. In that case, there's certainly no path problem there. Looks good, we'll just have to change the branch we pull from in auto-package-testing jenkins template I guess. I have another change in progress that will affect that for the description setter if we want to roll them together.

review: Approve
Revision history for this message
Francis Ginther (fginther) wrote :

This is now relocated to lp:ubuntu-touch-boottest.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'boottest.sh'
2--- boottest.sh 2015-06-04 18:46:39 +0000
3+++ boottest.sh 2015-06-04 21:08:28 +0000
4@@ -2,7 +2,7 @@
5 set -e
6
7 # Where am I ?
8-BASEDIR=$(dirname $(readlink -f $0))/..
9+BASEDIR=$(dirname $(readlink -f $0))
10
11 # Provide a message to report special information
12 END_MESSAGE=""
13@@ -21,6 +21,13 @@
14 source $BOOTTESTRC
15 fi
16
17+# Setup our dependencies
18+UTILDIR="${BASEDIR}/utils"
19+if [ -f "${UTILDIR}" ]; then
20+ rm -rf "${UTILDIR}"
21+fi
22+bzr branch lp:ubuntu-test-cases/touch $UTILDIR
23+
24 # Default adt-run timeout
25 export ADT_TIMEOUT=${ADT_TIMEOUT:-600}
26
27@@ -58,7 +65,7 @@
28 fi
29
30 # Ensure we leave a usable phone
31- [ -z ${NODE_NAME} ] || ${BASEDIR}/scripts/recover.py ${NODE_NAME}
32+ [ -z ${NODE_NAME} ] || ${UTILDIR}/scripts/recover.py ${NODE_NAME}
33
34 # Leave a parting message
35 # (disable command tracing as it confuses the output)
36@@ -73,7 +80,7 @@
37 # These can be set by jenkins when running in that context
38
39 # ANDROID_SERIAL: The phone ID.
40-[ -z ${NODE_NAME} ] || export ANDROID_SERIAL=${ANDROID_SERIAL:-$(${BASEDIR}/scripts/get-adb-id ${NODE_NAME})}
41+[ -z ${NODE_NAME} ] || export ANDROID_SERIAL=${ANDROID_SERIAL:-$(${UTILDIR}/scripts/get-adb-id ${NODE_NAME})}
42
43 # FIXME: Should be provided -- vila 2015-01-26
44 ARCH="${ARCH:-krillin}"
45@@ -87,14 +94,14 @@
46 export SKIP_TESTCONFIG=1
47
48 # Ensures we start with a usable phone
49-[ -z ${NODE_NAME} ] || ${BASEDIR}/scripts/recover.py ${NODE_NAME}
50+[ -z ${NODE_NAME} ] || ${UTILDIR}/scripts/recover.py ${NODE_NAME}
51
52 TESTS=${BASEDIR}/tests
53
54 # Provision the device
55 # Allow the image revision to be overridden if the latest is unusable
56 REVISION="${REVISION:-0}"
57-PROV_CMD="${BASEDIR}/scripts/provision.sh \
58+PROV_CMD="${UTILDIR}/scripts/provision.sh \
59 -r $REVISION \
60 -n ${HOME}/.ubuntu-ci/wifi.conf -w"
61 RETRY=3
62@@ -104,7 +111,7 @@
63 ${PROV_CMD} && break
64 PROV_ERR=$?
65 # Make sure the device doesn't need to be recovered first
66- ${BASEDIR}/scripts/recover.py ${NODE_NAME}
67+ ${UTILDIR}/scripts/recover.py ${NODE_NAME}
68 if [ ${PROV_ERR} -eq 124 ]; then
69 # The provisioning fails with a timeout, the image is not
70 # flashable/bootable
71@@ -179,7 +186,7 @@
72 # Now execute the boot test
73 set +e
74 echo "Running boottest test suite."
75- ${BASEDIR}/scripts/run-adt.py ${ADT_CMD} --unbuilt-tree ${TESTS}/boottest -o results ${ADT_OPTS}
76+ ${BASEDIR}/run-adt.py ${ADT_CMD} --unbuilt-tree ${TESTS}/boottest -o results ${ADT_OPTS}
77 RET=$?
78 # Fetch the sourcepkg-version file that contains the version data
79 # for the package under test. We can't use the testpkg-version file

Subscribers

People subscribed via source and target branches