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
=== modified file 'boottest.sh'
--- boottest.sh 2015-06-04 22:04:37 +0000
+++ boottest.sh 2015-06-05 20:15:23 +0000
@@ -99,8 +99,23 @@
99TESTS=${BASEDIR}/tests99TESTS=${BASEDIR}/tests
100100
101# Provision the device101# Provision the device
102# Allow the image revision to be overridden if the latest is unusable102# Select the appropriate image per release
103REVISION="${REVISION:-0}"103# REVISION allows the image revision to be overridden if the latest is
104# unusable. '0' indicates latest.
105if [ "${RELEASE}" == 'vivid' ]; then
106 CHANNEL="ubuntu-touch/rc-proposed/bq-aquaris.en"
107 REVISION="${VIVID_REVISION:-0}"
108elif [ "${RELEASE}" == 'wily' ]; then
109 CHANNEL="ubuntu-touch/devel-proposed/krillin.en"
110 REVISION="${WILY_REVISION:-0}"
111else
112 END_MESSAGE="ERROR: Unsupported release: ${RELEASE}"
113 exit 1
114fi
115
116# IMAGE_OPT is consumed by provision.sh and is currently the only way
117# to specify a channel other then the default
118export IMAGE_OPT="--bootstrap --developer-mode --channel $CHANNEL"
104PROV_CMD="${UTILDIR}/scripts/provision.sh \119PROV_CMD="${UTILDIR}/scripts/provision.sh \
105 -r $REVISION \120 -r $REVISION \
106 -n ${HOME}/.ubuntu-ci/wifi.conf -w"121 -n ${HOME}/.ubuntu-ci/wifi.conf -w"
@@ -143,6 +158,11 @@
143SANITIZED_SRC_PKG_NAME=${SRC_PKG_NAME/+/\\+}158SANITIZED_SRC_PKG_NAME=${SRC_PKG_NAME/+/\\+}
144echo "grep-aptavail -e -n -S -sPackage \"^${SANITIZED_SRC_PKG_NAME}( \\(.*\\))?\$\"| sort | uniq > binary.packages" >> adt-commands159echo "grep-aptavail -e -n -S -sPackage \"^${SANITIZED_SRC_PKG_NAME}( \\(.*\\))?\$\"| sort | uniq > binary.packages" >> adt-commands
145echo "comm -1 -2 binary.packages installed.packages > needs_install.packages" >> adt-commands160echo "comm -1 -2 binary.packages installed.packages > needs_install.packages" >> adt-commands
161# If the list of needs_install.packages is empty, then we're trying to test
162# a source package that installs no binaries to this image. Set an appropriate
163# message which will be picked up after the boottest attempt and exit (which
164# will cause adt-run to exit with error code 20).
165echo '[ $(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
146echo 'release=$(lsb_release -s -c)' >> adt-commands166echo 'release=$(lsb_release -s -c)' >> adt-commands
147# Include '-y' in the list of apt-get options because the updated package167# Include '-y' in the list of apt-get options because the updated package
148# under test could pull in new dependencies.168# under test could pull in new dependencies.
@@ -194,6 +214,8 @@
194 # fake boottest package, not the package we're actually testing.214 # fake boottest package, not the package we're actually testing.
195 adb pull /home/phablet/sourcepkg-version results/sourcepkg-version215 adb pull /home/phablet/sourcepkg-version results/sourcepkg-version
196 echo "Version tested: $(cat results/sourcepkg-version)"216 echo "Version tested: $(cat results/sourcepkg-version)"
217 grep -q 'ERROR' results/sourcepkg-version && \
218 END_MESSAGE="$(cat results/sourcepkg-version)"
197 set -e219 set -e
198fi220fi
199221

Subscribers

People subscribed via source and target branches