Merge lp:~fboucault/camera-app/autopilot_no_location_service into lp:camera-app

Proposed by Florian Boucault
Status: Merged
Approved by: Bill Filler
Approved revision: 405
Merged at revision: 409
Proposed branch: lp:~fboucault/camera-app/autopilot_no_location_service
Merge into: lp:camera-app
Diff against target: 50 lines (+0/-28)
2 files modified
tests/autopilot/camera_app/helpers.py (+0/-25)
tests/autopilot/camera_app/tests/__init__.py (+0/-3)
To merge this branch: bzr merge lp:~fboucault/camera-app/autopilot_no_location_service
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+238185@code.launchpad.net

Commit message

[Autopilot] Do not stop/start the location service at the beginning of each test.

To post a comment you must log in.
405. By Florian Boucault

Removed unused helper.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'tests/autopilot/camera_app/helpers.py'
2--- tests/autopilot/camera_app/helpers.py 2014-08-16 08:26:46 +0000
3+++ tests/autopilot/camera_app/helpers.py 1970-01-01 00:00:00 +0000
4@@ -1,25 +0,0 @@
5-# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
6-# Copyright 2014 Canonical
7-#
8-# This program is free software: you can redistribute it and/or modify it
9-# under the terms of the GNU General Public License version 3, as published
10-# by the Free Software Foundation.
11-
12-"""Camera-app autopilot helpers."""
13-
14-import subprocess
15-
16-
17-def set_location_service_testing(test_mode):
18- test = "true" if test_mode else "false"
19- try:
20- subprocess.check_call(
21- 'sudo setprop custom.location.testing {}'.format(test),
22- shell=True)
23- subprocess.check_call(
24- "sudo restart ubuntu-location-service && "
25- "restart ubuntu-location-service-trust-stored",
26- shell=True)
27- except subprocess.CalledProcessError:
28- print("Unable to start location service in testing mode "
29- "tests may fail as a result.")
30
31=== modified file 'tests/autopilot/camera_app/tests/__init__.py'
32--- tests/autopilot/camera_app/tests/__init__.py 2014-08-16 08:26:46 +0000
33+++ tests/autopilot/camera_app/tests/__init__.py 2014-10-13 15:49:52 +0000
34@@ -16,7 +16,6 @@
35 from camera_app.emulators.main_window import MainWindow
36 from camera_app.emulators.baseemulator import CameraCustomProxyObjectBase
37 from camera_app.emulators.panel import Panel
38-from camera_app.helpers import set_location_service_testing
39
40 class CameraAppTestCase(AutopilotTestCase):
41
42@@ -35,8 +34,6 @@
43 def setUp(self):
44 self.pointing_device = Pointer(self.input_device_class.create())
45 super(CameraAppTestCase, self).setUp()
46- set_location_service_testing(True)
47- self.addCleanup(set_location_service_testing, False)
48 if os.path.exists(self.local_location):
49 self.launch_test_local()
50 elif os.path.exists(self.deb_location):

Subscribers

People subscribed via source and target branches