Merge lp:~fginther/ubuntu-touch-boottest/add-vivid-support into lp:ubuntu-touch-boottest

Proposed by Francis Ginther
Status: Merged
Approved by: Francis Ginther
Approved revision: 5
Merged at revision: 5
Proposed branch: lp:~fginther/ubuntu-touch-boottest/add-vivid-support
Merge into: lp:ubuntu-touch-boottest
Diff against target: 49 lines (+24/-2)
1 file modified
boottest.sh (+24/-2)
To merge this branch: bzr merge lp:~fginther/ubuntu-touch-boottest/add-vivid-support
Reviewer Review Type Date Requested Status
Paul Larson Approve
Francis Ginther Needs Resubmitting
Para Siva (community) Approve
Review via email: mp+261213@code.launchpad.net

Commit message

Add support for a specific image per release and fail the test if the source package produces no needs-install binaries.

Description of the change

Add support for a specific image per release and fail the test if the source package produces no needs-install binaries.

Foundations (sil2100) has confirmed that these are the right images to use. Also checking to make sure the binaries installed on these images match the manifest which britney would use (see: https://code.launchpad.net/~fginther/britney/add-vivid-manifest/+merge/261212). The debian packages from the manifest files match those installed on these images.

This been tested:
* wily gtk+3.0 (valid wily package) - http://d-jenkins.ubuntu-ci:8080/view/Wily/view/BootTest/job/fjg-boottest/43/
* vivid gcc-5 (NOT a valid vivid package) - http://d-jenkins.ubuntu-ci:8080/view/Wily/view/BootTest/job/fjg-boottest/45/
* vivid gcc-4.9 (valid vivid package) - http://d-jenkins.ubuntu-ci:8080/view/Wily/view/BootTest/job/fjg-boottest/46/
* wily gcc-4.9 (NOT a valid wily package) http://d-jenkins.ubuntu-ci:8080/view/Wily/view/BootTest/job/fjg-boottest/47/

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

I think we should make a slight change to this for when the package has no binaries, but do you have an example of a case where that actually happens? It seems like if that were the case?

review: Needs Information
Revision history for this message
Para Siva (psivaa) wrote :

+1, looks good, especially with the results.

review: Approve
5. By Francis Ginther

Add an END_MESSAGE if there is no image for this release or no installable binaries for this source package.

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

Added "ERROR: No packages to install!" to the END_MESSAGE.

review: Needs Resubmitting
Revision history for this message
Francis Ginther (fginther) wrote :
Revision history for this message
Paul Larson (pwlars) wrote :

+1

review: Approve

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 22:04:37 +0000
3+++ boottest.sh 2015-06-05 20:15:23 +0000
4@@ -99,8 +99,23 @@
5 TESTS=${BASEDIR}/tests
6
7 # Provision the device
8-# Allow the image revision to be overridden if the latest is unusable
9-REVISION="${REVISION:-0}"
10+# Select the appropriate image per release
11+# REVISION allows the image revision to be overridden if the latest is
12+# unusable. '0' indicates latest.
13+if [ "${RELEASE}" == 'vivid' ]; then
14+ CHANNEL="ubuntu-touch/rc-proposed/bq-aquaris.en"
15+ REVISION="${VIVID_REVISION:-0}"
16+elif [ "${RELEASE}" == 'wily' ]; then
17+ CHANNEL="ubuntu-touch/devel-proposed/krillin.en"
18+ REVISION="${WILY_REVISION:-0}"
19+else
20+ END_MESSAGE="ERROR: Unsupported release: ${RELEASE}"
21+ exit 1
22+fi
23+
24+# IMAGE_OPT is consumed by provision.sh and is currently the only way
25+# to specify a channel other then the default
26+export IMAGE_OPT="--bootstrap --developer-mode --channel $CHANNEL"
27 PROV_CMD="${UTILDIR}/scripts/provision.sh \
28 -r $REVISION \
29 -n ${HOME}/.ubuntu-ci/wifi.conf -w"
30@@ -143,6 +158,11 @@
31 SANITIZED_SRC_PKG_NAME=${SRC_PKG_NAME/+/\\+}
32 echo "grep-aptavail -e -n -S -sPackage \"^${SANITIZED_SRC_PKG_NAME}( \\(.*\\))?\$\"| sort | uniq > binary.packages" >> adt-commands
33 echo "comm -1 -2 binary.packages installed.packages > needs_install.packages" >> adt-commands
34+# If the list of needs_install.packages is empty, then we're trying to test
35+# a source package that installs no binaries to this image. Set an appropriate
36+# message which will be picked up after the boottest attempt and exit (which
37+# will cause adt-run to exit with error code 20).
38+echo '[ $(wc -l needs_install.packages | cut -f 1 -d " ") -eq "0" ] && (echo "ERROR: No packages to install!" > /home/phablet/sourcepkg-version && exit 1)' >> adt-commands
39 echo 'release=$(lsb_release -s -c)' >> adt-commands
40 # Include '-y' in the list of apt-get options because the updated package
41 # under test could pull in new dependencies.
42@@ -194,6 +214,8 @@
43 # fake boottest package, not the package we're actually testing.
44 adb pull /home/phablet/sourcepkg-version results/sourcepkg-version
45 echo "Version tested: $(cat results/sourcepkg-version)"
46+ grep -q 'ERROR' results/sourcepkg-version && \
47+ END_MESSAGE="$(cat results/sourcepkg-version)"
48 set -e
49 fi
50

Subscribers

People subscribed via source and target branches