Ubuntu Pastebin

Paste from martin at Tue, 21 Apr 2015 10:13:26 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
diff --git a/doc/README.click-tests.rst b/doc/README.click-tests.rst
index ef05bda..35c063c 100644
--- a/doc/README.click-tests.rst
+++ b/doc/README.click-tests.rst
@@ -76,8 +76,8 @@ command
     (string) Shell command which is passed verbatim to bash
 
 autopilot_module
-    (string) Python module name in ``tests/autopilot`` which is an
-    Autopilot test. See below for details.
+    (string) Python module name in ``app/tests/autopilot`` or
+    ``tests/autopilot`` which is an Autopilot test. See below for details.
 
 *Exactly one* of ``path``, ``command``, or ``autopilot_module`` must be
 given for each test. All other fields below are optional, and assumed to
@@ -125,8 +125,9 @@ Autopilot tests
 ---------------
 For autopilot tests you can use the ``autopilot_module`` test field,
 which will be interpreted as a Python module name under
-``tests/autopilot``. An appropriate test command and default
-dependencies are automatically provided. Thus a test description
+``app/tests/autopilot`` or ``tests/autopilot``. An appropriate test
+command and default dependencies are automatically provided. Thus a test
+description
 
 ::
 
@@ -141,7 +142,7 @@ expands to
 ::
 
     "testname": {
-        "command": "PYTHONPATH=tests/autopilot:$PYTHONPATH python3 -m autopilot.run run foo_tests",
+        "command": "PYTHONPATH=app/tests/autopilot:tests/autopilot:$PYTHONPATH python3 -m autopilot.run run foo_tests",
         "depends": ["ubuntu-ui-toolkit-autopilot", "autopilot-touch", "python3-dateutil"],
         "restrictions": ["allow-stderr"]
     }
diff --git a/lib/testdesc.py b/lib/testdesc.py
index 1730090..454111b 100644
--- a/lib/testdesc.py
+++ b/lib/testdesc.py
@@ -461,7 +461,7 @@ def parse_click_manifest(manifest, testbed_caps, clickdeps, use_installed,
 
         # autopilot special case: dict with extra depends
         if 'autopilot_module' in desc:
-            desc['command'] = 'PYTHONPATH=tests/autopilot:$PYTHONPATH ' \
+            desc['command'] = 'PYTHONPATH=app/tests/autopilot:tests/autopilot:$PYTHONPATH ' \
                 'python3 -m autopilot.run run -v -f subunit -o ' \
                 '$ADT_ARTIFACTS/%s.subunit ' % name + os.environ.get(
                     'ADT_AUTOPILOT_MODULE', desc['autopilot_module'])
Download as text