Merge lp:~vila/ubuntu-test-cases/copy-only-debian into lp:ubuntu-test-cases/touch

Proposed by Vincent Ladeuil
Status: Merged
Merged at revision: 369
Proposed branch: lp:~vila/ubuntu-test-cases/copy-only-debian
Merge into: lp:ubuntu-test-cases/touch
Diff against target: 43 lines (+12/-4)
1 file modified
scripts/boottest.sh (+12/-4)
To merge this branch: bzr merge lp:~vila/ubuntu-test-cases/copy-only-debian
Reviewer Review Type Date Requested Status
Para Siva (community) Approve
Review via email: mp+249996@code.launchpad.net

Commit message

As explained in https://trello.com/c/UVP24JdU/77-boottest-copying-source-package-to-the-phone-can-fail , we're exhausting space on the phone.

To avoid the issue, this proposals copy the debian directory only which is all we care about to be able to inject the boot DEP8 test.

Description of the change

https://trello.com/c/UVP24JdU/77-boottest-copying-source-package-to-the-phone-can-fail
Instead of copying the whole package source tree to the phone (which can fail), copy only the debian directory which is the only part we care about.

A successful run with this proposal is at: http://d-jenkins.ubuntu-ci:8080/view/Vivid/view/BootTest/job/fjg-boottest/9/console

To post a comment you must log in.
Revision history for this message
Para Siva (psivaa) wrote :

+1, sorry for the late response.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/boottest.sh'
2--- scripts/boottest.sh 2015-02-13 17:00:02 +0000
3+++ scripts/boottest.sh 2015-02-17 13:41:48 +0000
4@@ -101,6 +101,7 @@
5
6 # --no-built-binaries should come first
7 # --debug helps while debugging, can be removed otherwise
8+# 'timeout' returns 124 if ${ADT_TIMEOUT} is reached.
9 ADT_CMD="timeout ${ADT_TIMEOUT} adt-run --debug --no-built-binaries"
10 # ADT_VIRT can be overridden for local tests,
11 # it defaults to ${ANDROID_SERIAL} phone via the adb/ssh combo
12@@ -145,10 +146,17 @@
13 RET=$?
14 set -e
15 else
16- # Inject the boot DEP8 test into the package source tree
17 SOURCE_DIR=$(ls -d ${PKG_SRC_DIR}/artifacts/${SRC_PKG_NAME}-*)
18+ # Get the debian dir from the source package (involving the whole
19+ # source tree can fail with 'No space left on device' on the phone).
20+ TARGET_BASE=work
21+ rm -fr ${TARGET_BASE}
22+ mkdir -p ${TARGET_BASE}
23+ cp -rd ${SOURCE_DIR}/debian ${TARGET_BASE}
24+ # Inject the boot DEP8 test into the debian dir from the package
25+ # source tree
26 FROM=${TESTS}/boottest/debian/tests
27- TARGET="${SOURCE_DIR}/debian/tests"
28+ TARGET="${TARGET_BASE}/debian/tests"
29 mkdir -p ${TARGET} # For packages that don't define DEP8 tests
30 # Inject the binary packages built previously
31 BIN_PACKAGES=$(tr '\n' ',' < ${PKG_SRC_DIR}/artifacts/needs_install.packages | sed -e s/,$//)
32@@ -156,9 +164,9 @@
33 ${FROM}/control.template > ${TARGET}/control
34 cp ${FROM}/boottest ${TARGET}
35
36- # Now execute the boot test from inside the pkg source tree
37+ # Now execute the boot test from inside the (reduced) pkg source tree
38 set +e
39- ${ADT_CMD} --unbuilt-tree ${SOURCE_DIR} -o results ${ADT_OPTS}
40+ ${ADT_CMD} --unbuilt-tree ${TARGET_BASE} -o results ${ADT_OPTS}
41 RET=$?
42 set -e
43 fi

Subscribers

People subscribed via source and target branches