better error message if launched application terminates
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Autopilot |
Fix Released
|
Medium
|
Christopher Lee | ||
autopilot (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
See comment 19 for an analysis of the root causes and actual bugs here.
I'm having trouble lately running test cases with autopilot. One of the problems is that I'm not able to launch the gallery application using something like:
launch_
In particular the backtrace that I obtain in this case is:
Traceback (most recent call last):
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
return get_autopilot_
File "/usr/lib/
return get_proxy_
File "/usr/lib/
raise RuntimeError(
RuntimeError: Search criteria returned no results
Something that might be related is that recently a needed to update the test cases in the device (mako) to make them work and that broke them when running them in my laptop. What I needed to do was replace `proxy.pid` with `proxy.process`. At first it looked to me like `pid` was renamed to `process`, but now I think something might be wrong with this because in the code `process` seems to be clearly set to whatever is returned by `subprocess.Popen` and `pid` is set to access `process.pid`.
Related branches
- PS Jenkins bot: Approve (continuous-integration)
- Thomi Richards (community): Approve
- Martin Pitt (community): Needs Fixing
-
Diff: 325 lines (+205/-21)3 files modifiedautopilot/introspection/__init__.py (+80/-13)
autopilot/testcase.py (+19/-7)
autopilot/tests/functional/test_ap_apps.py (+106/-1)
Changed in autopilot: | |
importance: | Undecided → Critical |
assignee: | nobody → Christopher Lee (veebers) |
summary: |
- Failed to create proxy object for gallery app + better error message if launched application terminates |
tags: | added: qa-touch |
Changed in autopilot: | |
status: | Fix Committed → Fix Released |
The same problem happens with the media player application:
Traceback (most recent call last): python2. 7/dist- packages/ ubuntu_ test_cases/ memory_ usage_measureme nt/tests/ test_memory_ usage.py" , line 62, in test_scenari
media_ player. launch( ) python2. 7/dist- packages/ ubuntu_ test_cases/ memory_ usage_measureme nt/apps/ media_player. py", line 46, in launch launch_ test_applicatio n(*args, app_type='qt') python2. 7/dist- packages/ autopilot/ testcase. py", line 256, in launch_ test_applicatio n proxy_object_ for_process( process, emulator_base) python2. 7/dist- packages/ autopilot/ introspection/ __init_ _.py", line 160, in get_autopilot_ proxy_object_ for_process object_ for_existing_ process( pid, emulator_ base=emulator_ base) python2. 7/dist- packages/ autopilot/ introspection/ __init_ _.py", line 205, in get_proxy_ object_ for_existing_ process "Search criteria returned no results")
File "/usr/lib/
File "/usr/lib/
self.app = self.tc.
File "/usr/lib/
return get_autopilot_
File "/usr/lib/
return get_proxy_
File "/usr/lib/
raise RuntimeError(
RuntimeError: Search criteria returned no results