Merge lp:~coreygoldberg/autopilot/rmd-leaks-1187856 into lp:~autopilot/autopilot/temp-dev
- rmd-leaks-1187856
- Merge into temp-dev
Status: | Merged |
---|---|
Approved by: | Thomi Richards |
Approved revision: | 479 |
Merged at revision: | 488 |
Proposed branch: | lp:~coreygoldberg/autopilot/rmd-leaks-1187856 |
Merge into: | lp:~autopilot/autopilot/temp-dev |
Diff against target: |
108 lines (+51/-3) 4 files modified
autopilot/globals.py (+4/-3) autopilot/tests/functional/test_autopilot_functional.py (+37/-0) debian/changelog (+8/-0) debian/control (+2/-0) |
To merge this branch: | bzr merge lp:~coreygoldberg/autopilot/rmd-leaks-1187856 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Thomi Richards (community) | Approve | ||
Max Brustkern | Pending | ||
Review via email: mp+216783@code.launchpad.net |
This proposal supersedes a proposal from 2014-03-26.
Commit message
Prevent autopilot from leaving recordMyDesktop working folders on disk.
Description of the change
previously, when a test passed, the recordmydesktop process was killed using kill(). The side effect of this was recordmydesktop would leave it's session directories/files hanging around in /tmp. (lots of rMD-session* directories)
instead of kill(), you can stop recordmydesktop by sending SIGABRT signal, which will kill it gracefully and allow it to clean up it's session and output files.
This branch changes it to use SIGABRT, and includes a funtional test to verify it is working.
Max Brustkern (nuclearbob) wrote : Posted in a previous version of this proposal | # |
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:460
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Thomi Richards (thomir-deactivatedaccount) wrote : Posted in a previous version of this proposal | # |
Would like to see another test run where the functional tests don't hang. Can you re-trigger that please?
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:460
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Thomi Richards (thomir-deactivatedaccount) wrote : Posted in a previous version of this proposal | # |
Hi Corey - this branch still hangs in the test run. Please investigate.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:460
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:461
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:462
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:464
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:462
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:465
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:466
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:467
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:468
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:469
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:474
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Corey Goldberg (coreygoldberg) wrote : Posted in a previous version of this proposal | # |
Test Name
Duration
Age
<<< autopilot.
Stack Trace
_StringException: Empty attachments:
/var/log/syslog
process-stdout
process-
process-stderr: {{{window-mocker: cannot connect to X server}}}
test-log: {{{
17:45:17.492 INFO globals:59 - *******
17:45:17.493 INFO globals:60 - Starting test autopilot.
17:45:17.553 WARNING testcase:157 - Process manager backend unavailable, application snapshot support disabled.
17:45:17.554 INFO testcase:258 - Attempting to launch application 'window-mocker' with arguments '' as a normal process
17:45:17.578 INFO _launcher:255 - Launching process: ['/usr/
17:45:19.330 INFO _launcher:368 - waiting for process to exit.
17:45:19.337 INFO _launcher:391 - Killing process 3503
17:45:19.341 INFO _launcher:394 - Appears process has already exited.
}}}
Traceback (most recent call last):
File "/usr/lib/
window = self.start_
File "/usr/lib/
app_type='qt'
File "/usr/lib/
return self._launch_
File "/usr/lib/
application
File "/usr/lib/
process
File "/usr/lib/
% return_code
ProcessSearchError: Process exited with exit code: 1
1.8 sec 5
<<< autopilot.
Stack Trace
_StringException: Empty attachments:
/var/log/syslog
process-stdout
process-
process-stderr: {{{window-mocker: cannot connect to X server}}}
test-log: {{{
17:45:19.367 INFO globals:59 - *******
17:45:19.368 INFO globals:60 - Starting test autopilot.
17:45:19.433 WARNING testcase:157 - Process manager backend unavailable, application snapshot support disabled.
17:45:19.434 INFO testcase:258 - Attempting to launch application 'window-mocker' with arguments '' as a normal process
17:45:19.452 INFO _launcher:255 - Launching process: ['/usr/
17...
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:475
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:476
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:477
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:478
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:479
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:479
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Thomi Richards (thomir-deactivatedaccount) wrote : | # |
LGTM
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
No commit message was specified in the merge proposal. Hit 'Add commit message' on the merge proposal web page or follow the link below. You can approve the merge proposal yourself to rerun.
https:/
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file 'autopilot/globals.py' |
2 | --- autopilot/globals.py 2014-03-05 23:17:21 +0000 |
3 | +++ autopilot/globals.py 2014-04-22 21:15:06 +0000 |
4 | @@ -30,6 +30,7 @@ |
5 | from autopilot._debug import DebugProfile |
6 | from autopilot.utilities import LogFormatter, CleanupRegistered |
7 | from testtools.content import text_content |
8 | +import signal |
9 | import subprocess |
10 | import os.path |
11 | import logging |
12 | @@ -167,9 +168,9 @@ |
13 | file.""" |
14 | |
15 | if self._test_passed: |
16 | - # We use kill here because we don't want the recording app to start |
17 | - # encoding the video file (since we're removing it anyway.) |
18 | - self._capture_process.kill() |
19 | + # SIGABRT terminates the program and removes |
20 | + # the specified output file. |
21 | + self._capture_process.send_signal(signal.SIGABRT) |
22 | self._capture_process.wait() |
23 | else: |
24 | self._capture_process.terminate() |
25 | |
26 | === modified file 'autopilot/tests/functional/test_autopilot_functional.py' |
27 | --- autopilot/tests/functional/test_autopilot_functional.py 2014-03-17 01:28:29 +0000 |
28 | +++ autopilot/tests/functional/test_autopilot_functional.py 2014-04-22 21:15:06 +0000 |
29 | @@ -20,6 +20,7 @@ |
30 | |
31 | from __future__ import absolute_import |
32 | |
33 | +import glob |
34 | import os |
35 | import os.path |
36 | import re |
37 | @@ -494,6 +495,42 @@ |
38 | self.assertThat(os.path.exists(video_file_path), Equals(False)) |
39 | |
40 | @skipIf(platform.model() != "Desktop", "Only suitable on Desktop (VidRec)") |
41 | + def test_no_video_session_dir_saved_for_passed_test(self): |
42 | + """RecordMyDesktop should clean up its session files in tmp dir.""" |
43 | + dir_pattern = '/tmp/rMD-session*' |
44 | + original_session_dirs = glob.glob(dir_pattern) |
45 | + |
46 | + self.create_test_file( |
47 | + "test_simple.py", dedent("""\ |
48 | + |
49 | + from autopilot.testcase import AutopilotTestCase |
50 | + from time import sleep |
51 | + |
52 | + class SimpleTest(AutopilotTestCase): |
53 | + |
54 | + def test_simple(self): |
55 | + sleep(1) |
56 | + self.assertTrue(True) |
57 | + """) |
58 | + ) |
59 | + |
60 | + code, output, error = self.run_autopilot(["run", "-r", "tests"]) |
61 | + |
62 | + self.assertThat(code, Equals(0)) |
63 | + |
64 | + session_dirs = glob.glob(dir_pattern) |
65 | + try: |
66 | + new_session_dirs = \ |
67 | + list(set(session_dirs) - set(original_session_dirs)) |
68 | + leftover_session = new_session_dirs.pop() |
69 | + except IndexError: |
70 | + leftover_session = None |
71 | + |
72 | + self.assertEqual(leftover_session, None) |
73 | + if leftover_session is not None: |
74 | + self.addCleanup(remove_if_exists, leftover_session) |
75 | + |
76 | + @skipIf(platform.model() != "Desktop", "Only suitable on Desktop (VidRec)") |
77 | def test_no_video_for_nested_testcase_when_parent_and_child_fail(self): |
78 | """Test recording must not create a new recording for nested testcases |
79 | where both the parent and the child testcase fail. |
80 | |
81 | === modified file 'debian/changelog' |
82 | --- debian/changelog 2014-04-15 00:12:05 +0000 |
83 | +++ debian/changelog 2014-04-22 21:15:06 +0000 |
84 | @@ -1,3 +1,11 @@ |
85 | +autopilot (1.4+14.04.20140416-0ubuntu1) trusty; urgency=low |
86 | + |
87 | + [ Francis Ginther ] |
88 | + * Revert r480 to restore python2 packages as autopilot-touch |
89 | + dependencies as not all tests have been updated. (LP: #1308661) |
90 | + |
91 | + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 16 Apr 2014 19:55:48 +0000 |
92 | + |
93 | autopilot (1.4+14.04.20140415-0ubuntu1) trusty; urgency=low |
94 | |
95 | [ Michael Terry ] |
96 | |
97 | === modified file 'debian/control' |
98 | --- debian/control 2014-04-02 19:32:40 +0000 |
99 | +++ debian/control 2014-04-22 21:15:06 +0000 |
100 | @@ -144,6 +144,8 @@ |
101 | libautopilot-qt (>= 1.4), |
102 | python3-autopilot, |
103 | python3-evdev, |
104 | + python-autopilot, |
105 | + python-evdev, |
106 | fbset, |
107 | Description: Autopilot support for the ubuntu Touch platform |
108 | This metapackage exists to depend on the packages needed to install and use |
Looks good to me.