Merge lp://staging/~dbarth/ubuntu-html5-theme/autopkgtest into lp://staging/ubuntu-html5-theme

Proposed by David Barth
Status: Needs review
Proposed branch: lp://staging/~dbarth/ubuntu-html5-theme/autopkgtest
Merge into: lp://staging/ubuntu-html5-theme
Diff against target: 48 lines (+27/-0)
3 files modified
debian/control (+1/-0)
debian/tests/control (+2/-0)
debian/tests/launcher (+24/-0)
To merge this branch: bzr merge lp://staging/~dbarth/ubuntu-html5-theme/autopkgtest
Reviewer Review Type Date Requested Status
Jean-Baptiste Lallement (community) Needs Fixing
PS Jenkins bot continuous-integration Approve
Ubuntu HTML5 Theme Developers Pending
Review via email: mp+205060@code.staging.launchpad.net

Commit message

Adds a basic autopkgtest to ensure that ubuntu-html5-sdk installs and runs some basic test.

Description of the change

Adds a basic autopkgtest to ensure that ubuntu-html5-sdk installs and runs some basic test.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your patch.

- There are missing dependencies in the control file to install binaries built from the source package. autopkgtest has a special depends '@' that will install all these binaries.
- Tests will run headless, so ubuntu-html5-app-launcher must be executed through a virtual xserver with xvfb-run. I added the dependency on xvfb and the call via xvfb-run
- The patch attached slightly modifies debian/test/launcher to display messages as the test progress, hide the output of kill -0 when the process failed to start, run u-h-a-l with xvfb and fixed indentation

=== modified file 'debian/tests/control'
--- debian/tests/control 2014-02-05 23:11:21 +0000
+++ debian/tests/control 2014-02-06 14:29:13 +0000
@@ -1,2 +1,2 @@
 Tests: launcher
-Depends: ubuntu-html5-ui-toolkit-examples
+Depends: @, ubuntu-html5-ui-toolkit-examples, xvfb

=== modified file 'debian/tests/launcher'
--- debian/tests/launcher 2014-02-05 23:11:21 +0000
+++ debian/tests/launcher 2014-02-06 14:52:58 +0000
@@ -7,18 +7,23 @@
 WORKDIR=$(mktemp -d)
 trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
 cd $WORKDIR
-if [ -x /usr/bin/ubuntu-html5-app-launcher ]; then
- /usr/bin/ubuntu-html5-app-launcher --www=/usr/share/ubuntu-html5-container/examples/simple/www 2>&1 &
- pid=$!
- sleep 3
- if kill -0 $pid; then
- echo "running"
- kill -9 $pid
- else
- echo "Failed to start"
- exit 1
- fi
+
+LAUNCHER_CMD=/usr/bin/ubuntu-html5-app-launcher
+
+if [ -x "$LAUNCHER_CMD" ]; then
+ cmd="$LAUNCHER_CMD --www=/usr/share/ubuntu-html5-container/examples/simple/www"
+ echo "I: Executing: $cmd"
+ xvfb-run -a $cmd 2>&1 &
+ uhal_pid=$!
+ sleep 3
+ if kill -0 $uhal_pid 2>/dev/null; then
+ echo "I: $LAUNCHER_CMD started successfully"
+ kill -9 $uhal_pid
+ else
+ echo "E: $LAUNCHER_CMD failed to start"
+ exit 1
+ fi
 else
- echo "/usr/bin/ubuntu-html5-app-launcher not installed"
- exit 1
+ echo "E: $LAUNCHER_CMD not installed"
+ exit 1
 fi

review: Needs Fixing
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

pastebin to make thing more clear
http://paste.ubuntu.com/6885589/

Unmerged revisions

125. By David Barth

autopkgtest

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches