Merge lp:~elopio/webapps-demo/autopilot-tests-fixes into lp:webapps-demo

Proposed by Leo Arias
Status: Needs review
Proposed branch: lp:~elopio/webapps-demo/autopilot-tests-fixes
Merge into: lp:webapps-demo
Diff against target: 350 lines (+45/-93)
15 files modified
debian/changelog (+6/-0)
debian/control (+4/-4)
debian/postinst (+0/-21)
debian/rules (+10/-37)
debian/webapps-core-click-autopilot.install (+1/-0)
debian/webapps-demo-click.install (+0/-1)
tests/autopilot/setup.py (+1/-1)
tests/autopilot/webapps_click_packages_autopilot/tests/__init__.py (+10/-22)
tests/autopilot/webapps_click_packages_autopilot/tests/test_click_packages.py (+2/-2)
webapp-amazon/manifest.json (+2/-1)
webapp-ebay/manifest.json (+2/-1)
webapp-facebook/manifest.json (+2/-1)
webapp-gmail/manifest.json (+1/-0)
webapp-twitter/manifest.json (+2/-1)
webapp-ubuntuone/manifest.json (+2/-1)
To merge this branch: bzr merge lp:~elopio/webapps-demo/autopilot-tests-fixes
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+207582@code.launchpad.net

Commit message

Fixes to webapps-core AP.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
40. By Leo Arias

Added setup tools to the build deps.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

40. By Leo Arias

Added setup tools to the build deps.

39. By Leo Arias

Merged with trunk.

38. By Alexandre Abreu

update to use click autopilot caps

37. By Alexandre Abreu

update to use click autopilot caps

36. By Alexandre Abreu

Fixes

35. By David Barth

rename to webapps-core and adjust AP test suite

34. By David Barth

merging in the autopilot test suite

33. By David Barth

specify architecture explicitely: all, and bump version numbers

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2013-09-27 13:51:02 +0000
+++ debian/changelog 2014-02-21 19:03:33 +0000
@@ -1,3 +1,9 @@
1webapps-core (0.20) trusty; urgency=low
2
3 * Rename package to webapps-core
4
5 -- David Barth <david.barth@canonical.com> Thu, 28 Nov 2013 15:58:42 +0100
6
1webapps-demo (0.19) saucy; urgency=low7webapps-demo (0.19) saucy; urgency=low
28
3 * Get rid of the main package; icons and desktop files are no longer packaged9 * Get rid of the main package; icons and desktop files are no longer packaged
410
=== modified file 'debian/control'
--- debian/control 2014-01-08 15:44:03 +0000
+++ debian/control 2014-02-21 19:03:33 +0000
@@ -1,10 +1,11 @@
1Source: webapps-demo1Source: webapps-core
2Section: web2Section: web
3Priority: extra3Priority: extra
4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>4Maintainer: Webapps Team <webapps@lists.launchpad.net>
5XSBC-Original-Maintainer: Ricardo Mendoza <ricardo.mendoza@canonical.com>5XSBC-Original-Maintainer: Ricardo Mendoza <ricardo.mendoza@canonical.com>
6Build-Depends: debhelper (>= 9.0.0),6Build-Depends: debhelper (>= 9.0.0),
7 click7 click,
8 python-setuptools,
8Standards-Version: 3.9.39Standards-Version: 3.9.3
9Vcs-Bzr: lp:webapps-demo10Vcs-Bzr: lp:webapps-demo
1011
@@ -38,4 +39,3 @@
38 of popuplar web services on Ubuntu.39 of popuplar web services on Ubuntu.
39 This package contains click packages that will are pre-installed40 This package contains click packages that will are pre-installed
40 in the base image.41 in the base image.
41
4242
=== removed file 'debian/postinst'
--- debian/postinst 2013-09-09 17:48:39 +0000
+++ debian/postinst 1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
1#!/bin/sh
2
3set -e
4
5echo "Setting up click packages"
6
7click_db=/usr/share/click/preinstalled
8tmpdir=/tmp/webapps-demo
9
10mkdir -p -m 755 "$click_db"
11chown clickpkg:clickpkg "$click_db"
12
13for package in $(ls "$tmpdir")
14do
15 echo "Setting up $package"
16 # WARNING: install for user phablet, as --all-users doesn't install
17 # the aa-exec frontend to enable the containment of webapps
18 click install --force-missing-framework --root="$click_db" \
19 --user=phablet \
20 "$tmpdir/$package"
21done
220
=== modified file 'debian/rules'
--- debian/rules 2013-09-09 17:48:39 +0000
+++ debian/rules 2014-02-21 19:03:33 +0000
@@ -1,44 +1,17 @@
1#!/usr/bin/make -f1#!/usr/bin/make -f
2# -*- makefile -*-2# -*- makefile -*-
3# Sample debian/rules that uses debhelper.
4#
5# This file was originally written by Joey Hess and Craig Small.
6# As a special exception, when this file is copied by dh-make into a
7# dh-make output file, you may use that output file without restriction.
8# This special exception was added by Craig Small in version 0.37 of dh-make.
9#
10# Modified to make a template file for a multi-binary package with separated
11# build-arch and build-indep targets by Bill Allombert 2001
12
13include /usr/share/dpkg/default.mk
143
15# Uncomment this to turn on verbose mode.4# Uncomment this to turn on verbose mode.
16#export DH_VERBOSE=15#export DH_VERBOSE=1
176
18# This has to be exported to make some magic below work.
19export DH_OPTIONS
20
21%:7%:
22 dh $@ 8 dh $@ --with python2
239
24build_click = make -f debian/rules click APP=$(1) 10override_dh_install:
2511 # install autopilot tests
26click:12 cd tests/autopilot; \
27 mkdir -p build13 set -ex; for python in $(shell pyversions -r); do \
28 cd build; click build ../$(APP)14 $$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
2915 done; \
30override_dh_auto_conf:16 cd $(CURDIR)
31 rm -rf build17 dh_install -X'*.pyc' --fail-missing
32 mkdir -p build
33
34override_dh_auto_build:
35 $(call build_click,webapp-twitter)
36 $(call build_click,webapp-ebay)
37 $(call build_click,webapp-amazon)
38 $(call build_click,webapp-facebook)
39 $(call build_click,webapp-ubuntuone)
40 $(call build_click,webapp-gmail)
41
42override_dh_clean:
43 rm -rf build
44 dh_clean
4518
=== added file 'debian/webapps-core-click-autopilot.install'
--- debian/webapps-core-click-autopilot.install 1970-01-01 00:00:00 +0000
+++ debian/webapps-core-click-autopilot.install 2014-02-21 19:03:33 +0000
@@ -0,0 +1,1 @@
1usr/lib/python*
02
=== removed file 'debian/webapps-demo-click.install'
--- debian/webapps-demo-click.install 2013-09-09 17:48:39 +0000
+++ debian/webapps-demo-click.install 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1build/* /tmp/webapps-demo/
20
=== modified file 'tests/autopilot/setup.py'
--- tests/autopilot/setup.py 2013-10-10 17:47:30 +0000
+++ tests/autopilot/setup.py 2014-02-21 19:03:33 +0000
@@ -14,7 +14,7 @@
14 name='webapps-click-packages-autopilot',14 name='webapps-click-packages-autopilot',
15 version='0.1',15 version='0.1',
16 description='Webapps click packages autopilot tests.',16 description='Webapps click packages autopilot tests.',
17 url='https://launchpad.net/webapps-demo',17 url='https://launchpad.net/webapps-core',
18 license='GPLv3',18 license='GPLv3',
19 packages=find_packages(),19 packages=find_packages(),
20)20)
2121
=== modified file 'tests/autopilot/webapps_click_packages_autopilot/tests/__init__.py'
--- tests/autopilot/webapps_click_packages_autopilot/tests/__init__.py 2014-01-08 15:44:03 +0000
+++ tests/autopilot/webapps_click_packages_autopilot/tests/__init__.py 2014-02-21 19:03:33 +0000
@@ -11,6 +11,7 @@
11import os.path11import os.path
12import subprocess12import subprocess
13import re13import re
14import time
1415
15from testtools.matchers import Contains, Equals, GreaterThan, NotEquals16from testtools.matchers import Contains, Equals, GreaterThan, NotEquals
16from autopilot.matchers import Eventually17from autopilot.matchers import Eventually
@@ -28,6 +29,7 @@
28 return output.split('\n')29 return output.split('\n')
29 return []30 return []
30 31
32
31def get_pid_for_appid(app_id):33def get_pid_for_appid(app_id):
32 command = "ps -ef"34 command = "ps -ef"
33 output, errors = subprocess.Popen(["-c", command], stderr=subprocess.STDOUT, stdout=subprocess.PIPE, shell=True).communicate()35 output, errors = subprocess.Popen(["-c", command], stderr=subprocess.STDOUT, stdout=subprocess.PIPE, shell=True).communicate()
@@ -39,22 +41,8 @@
39 pid = pids[0].split()[1]41 pid = pids[0].split()[1]
40 return pid42 return pid
4143
44
42class WebappsClickPackagesTestCaseBase(AutopilotTestCase):45class WebappsClickPackagesTestCaseBase(AutopilotTestCase):
43 def launch_click_with_appid(self, app_id):
44 os.system('/sbin/initctl set-env QT_LOAD_TESTABILITY=1; start application APP_ID={0}'.format(app_id))
45 self.app_id = app_id
46 self.assertThat(lambda: get_pid_for_appid(app_id), Eventually(NotEquals("")))
47
48 def update_autopilot_proxy_for_pid(self, pid):
49 self.app_proxy = None
50 for x in range(10):
51 self.app_proxy = get_proxy_object_for_existing_process(pid=int(pid))
52 if not self.app_proxy is None:
53 break
54 sleep(1000)
55 self.assertThat(x, NotEquals(9))
56 self.assertThat(self.app_proxy, NotEquals(None))
57
58 def validate_url_for_current_proxy(self):46 def validate_url_for_current_proxy(self):
59 self.assertThat(self.app_proxy, NotEquals(None))47 self.assertThat(self.app_proxy, NotEquals(None))
60 webviews = self.app_proxy.select_many('UbuntuWebView')48 webviews = self.app_proxy.select_many('UbuntuWebView')
@@ -70,13 +58,13 @@
70 clicks = get_click_packages_list()58 clicks = get_click_packages_list()
71 self.assertThat(len([package for package in clicks if package.find(package_name) != -1]), NotEquals(0))59 self.assertThat(len([package for package in clicks if package.find(package_name) != -1]), NotEquals(0))
7260
73 def validate_app_launch(self, package_name, app_name):61 def validate_app_launch(self, package_name, app_name, app_hint=None):
62 if not app_hint:
63 app_hint = app_name.strip('webapp-')
74 self.validate_click_app_exists(package_name)64 self.validate_click_app_exists(package_name)
75 app_version = self.get_app_version(package_name)65 self.app_proxy = self.launch_click_package(
76 full_app_id = "{0}_{1}_{2}".format(package_name, app_name, app_version)66 package_name,
77 self.launch_click_with_appid(full_app_id)67 app_name)
78 pid = get_pid_for_appid(package_name)
79 self.update_autopilot_proxy_for_pid(pid)
80 self.validate_url_for_current_proxy()68 self.validate_url_for_current_proxy()
8169
82 def setUp(self):70 def setUp(self):
@@ -85,5 +73,5 @@
8573
86 def tearDown(self):74 def tearDown(self):
87 if not self.app_id is None:75 if not self.app_id is None:
88 os.system('stop application APP_ID={0}'.format(self.app_id))76 os.system('upstart-app-stop {0}'.format(self.app_id))
89 super(WebappsClickPackagesTestCaseBase, self).tearDown()77 super(WebappsClickPackagesTestCaseBase, self).tearDown()
9078
=== modified file 'tests/autopilot/webapps_click_packages_autopilot/tests/test_click_packages.py'
--- tests/autopilot/webapps_click_packages_autopilot/tests/test_click_packages.py 2013-10-11 15:52:27 +0000
+++ tests/autopilot/webapps_click_packages_autopilot/tests/test_click_packages.py 2014-02-21 19:03:33 +0000
@@ -27,7 +27,7 @@
2727
28class DefaultInstallWebappsClickPackagesTestCaseBase(WebappsClickPackagesTestCaseBase):28class DefaultInstallWebappsClickPackagesTestCaseBase(WebappsClickPackagesTestCaseBase):
29 def setUp(self):29 def setUp(self):
30 super(WebappsClickPackagesTestCaseBase, self).setUp()30 super(DefaultInstallWebappsClickPackagesTestCaseBase, self).setUp()
3131
32 def test_facebook(self):32 def test_facebook(self):
33 package_name = 'com.ubuntu.developer.webapps.webapp-facebook'33 package_name = 'com.ubuntu.developer.webapps.webapp-facebook'
@@ -57,6 +57,6 @@
57 def test_ubuntuone(self):57 def test_ubuntuone(self):
58 package_name = 'com.ubuntu.developer.webapps.webapp-ubuntuone'58 package_name = 'com.ubuntu.developer.webapps.webapp-ubuntuone'
59 app_name = 'webapp-ubuntuone'59 app_name = 'webapp-ubuntuone'
60 self.validate_app_launch(package_name, app_name)60 self.validate_app_launch(package_name, app_name, 'one.ubuntu')
6161
6262
6363
=== modified file 'webapp-amazon/manifest.json'
--- webapp-amazon/manifest.json 2013-09-24 19:10:36 +0000
+++ webapp-amazon/manifest.json 2014-02-21 19:03:33 +0000
@@ -1,6 +1,7 @@
1{1{
2 "description": "Amazon (webapp version)",2 "description": "Amazon (webapp version)",
3 "framework": "ubuntu-sdk-13.10",3 "framework": "ubuntu-sdk-13.10",
4 "architecture": "all",
4 "hooks": {5 "hooks": {
5 "webapp-amazon": {6 "webapp-amazon": {
6 "apparmor": "webapp-amazon.json",7 "apparmor": "webapp-amazon.json",
@@ -10,6 +11,6 @@
10 "maintainer": "Webapps Team <webapps@lists.launchpad.net>",11 "maintainer": "Webapps Team <webapps@lists.launchpad.net>",
11 "name": "com.ubuntu.developer.webapps.webapp-amazon",12 "name": "com.ubuntu.developer.webapps.webapp-amazon",
12 "title": "webapp-amazon",13 "title": "webapp-amazon",
13 "version": "1.0.6"14 "version": "1.0.7"
14}15}
1516
1617
=== modified file 'webapp-ebay/manifest.json'
--- webapp-ebay/manifest.json 2013-10-16 16:36:55 +0000
+++ webapp-ebay/manifest.json 2014-02-21 19:03:33 +0000
@@ -1,6 +1,7 @@
1{1{
2 "description": "eBay (webapp version)",2 "description": "eBay (webapp version)",
3 "framework": "ubuntu-sdk-13.10",3 "framework": "ubuntu-sdk-13.10",
4 "architecture": "all",
4 "hooks": {5 "hooks": {
5 "webapp-ebay": {6 "webapp-ebay": {
6 "apparmor": "webapp-ebay.json",7 "apparmor": "webapp-ebay.json",
@@ -10,6 +11,6 @@
10 "maintainer": "Webapps Team <webapps@lists.launchpad.net>",11 "maintainer": "Webapps Team <webapps@lists.launchpad.net>",
11 "name": "com.ubuntu.developer.webapps.webapp-ebay",12 "name": "com.ubuntu.developer.webapps.webapp-ebay",
12 "title": "webapp-ebay",13 "title": "webapp-ebay",
13 "version": "1.0.8"14 "version": "1.0.9"
14}15}
1516
1617
=== modified file 'webapp-facebook/manifest.json'
--- webapp-facebook/manifest.json 2013-10-01 15:10:40 +0000
+++ webapp-facebook/manifest.json 2014-02-21 19:03:33 +0000
@@ -1,6 +1,7 @@
1{1{
2 "description": "Facebook (webapp version)",2 "description": "Facebook (webapp version)",
3 "framework": "ubuntu-sdk-13.10",3 "framework": "ubuntu-sdk-13.10",
4 "architecture": "all",
4 "hooks": {5 "hooks": {
5 "webapp-facebook": {6 "webapp-facebook": {
6 "apparmor": "webapp-facebook.json",7 "apparmor": "webapp-facebook.json",
@@ -10,6 +11,6 @@
10 "maintainer": "Webapps Team <webapps@lists.launchpad.net>",11 "maintainer": "Webapps Team <webapps@lists.launchpad.net>",
11 "name": "com.ubuntu.developer.webapps.webapp-facebook",12 "name": "com.ubuntu.developer.webapps.webapp-facebook",
12 "title": "webapp-facebook",13 "title": "webapp-facebook",
13 "version": "1.0.5"14 "version": "1.0.6"
14}15}
1516
1617
=== modified file 'webapp-gmail/manifest.json'
--- webapp-gmail/manifest.json 2013-10-18 19:05:50 +0000
+++ webapp-gmail/manifest.json 2014-02-21 19:03:33 +0000
@@ -1,6 +1,7 @@
1{1{
2 "description": "Gmail (webapp version)",2 "description": "Gmail (webapp version)",
3 "framework": "ubuntu-sdk-13.10",3 "framework": "ubuntu-sdk-13.10",
4 "architecture": "all",
4 "hooks": {5 "hooks": {
5 "webapp-gmail": {6 "webapp-gmail": {
6 "apparmor": "webapp-gmail.json",7 "apparmor": "webapp-gmail.json",
78
=== modified file 'webapp-twitter/manifest.json'
--- webapp-twitter/manifest.json 2013-10-15 17:17:21 +0000
+++ webapp-twitter/manifest.json 2014-02-21 19:03:33 +0000
@@ -1,6 +1,7 @@
1{1{
2 "description": "Twitter (webapp version)",2 "description": "Twitter (webapp version)",
3 "framework": "ubuntu-sdk-13.10",3 "framework": "ubuntu-sdk-13.10",
4 "architecture": "all",
4 "hooks": {5 "hooks": {
5 "webapp-twitter": {6 "webapp-twitter": {
6 "apparmor": "webapp-twitter.json",7 "apparmor": "webapp-twitter.json",
@@ -10,6 +11,6 @@
10 "maintainer": "Webapps Team <webapps@lists.launchpad.net>",11 "maintainer": "Webapps Team <webapps@lists.launchpad.net>",
11 "name": "com.ubuntu.developer.webapps.webapp-twitter",12 "name": "com.ubuntu.developer.webapps.webapp-twitter",
12 "title": "webapp-twitter",13 "title": "webapp-twitter",
13 "version": "1.0.5"14 "version": "1.0.6"
14}15}
1516
1617
=== modified file 'webapp-ubuntuone/manifest.json'
--- webapp-ubuntuone/manifest.json 2013-09-26 16:17:53 +0000
+++ webapp-ubuntuone/manifest.json 2014-02-21 19:03:33 +0000
@@ -1,6 +1,7 @@
1{1{
2 "description": "Ubuntu One (webapp version)",2 "description": "Ubuntu One (webapp version)",
3 "framework": "ubuntu-sdk-13.10",3 "framework": "ubuntu-sdk-13.10",
4 "architecture": "all",
4 "hooks": {5 "hooks": {
5 "webapp-ubuntuone": {6 "webapp-ubuntuone": {
6 "apparmor": "webapp-ubuntuone.json",7 "apparmor": "webapp-ubuntuone.json",
@@ -10,6 +11,6 @@
10 "maintainer": "Webapps Team <webapps@lists.launchpad.net>",11 "maintainer": "Webapps Team <webapps@lists.launchpad.net>",
11 "name": "com.ubuntu.developer.webapps.webapp-ubuntuone",12 "name": "com.ubuntu.developer.webapps.webapp-ubuntuone",
12 "title": "webapp-ubuntuone",13 "title": "webapp-ubuntuone",
13 "version": "1.0.4"14 "version": "1.0.5"
14}15}
1516

Subscribers

People subscribed via source and target branches

to all changes: