Closed Bug 736112 Opened 10 years ago Closed 10 years ago

add try/except blocks around all harnesses devicemanager initialization so we always return an error code

Categories

(Testing :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla14

People

(Reporter: jmaher, Assigned: jmaher)

References

Details

Attachments

(2 files)

if we throw an exception during devicemanager() initialization, then we need to catch this and turn the test red.
Assignee: nobody → jmaher
Status: NEW → ASSIGNED
Attachment #606241 - Flags: review?(wlachance)
Comment on attachment 606241 [details] [diff] [review]
wrap dm.init calls in try/except (1.0)

Looks fine to me. Probably want to run this through try first.
Attachment #606241 - Flags: review?(wlachance) → review+
Should the return code be "exception" (4) rather than "warnings" (1 - as per patch)?
If we chose "retry" (5) we could ask the job to be tried again on another board.

If we can't initialize I doubt it will due to developers' code changes in most cases.

[1] https://github.com/buildbot/buildbot/blob/master/master/buildbot/status/results.py#L16
Here's a corresponding patch for talos. There's a few extra things in here that go beyond just fixing this bug:

1. We now pass the browser_path into devicemanageradb's constructor (it was just choosing its own before, which could cause weird behaviour).
2. I made one other part of talos use get Jeff's new testAgent routine in utils

This seems to work ok for me in testing.
Attachment #606331 - Flags: review?(jmaher)
Comment on attachment 606331 [details] [diff] [review]
Handle devicemanager created exceptions in talos

Review of attachment 606331 [details] [diff] [review]:
-----------------------------------------------------------------

this looks good, if we can run a few tests before pushing I would appreciate it.
Attachment #606331 - Flags: review?(jmaher) → review+
https://hg.mozilla.org/mozilla-central/rev/54136d44055b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
(we still need to land the talos bit, I'll double check against try and land that momentarily)
Try run for bdae5065b168 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=bdae5065b168
Results (out of 17 total builds):
    exception: 2
    success: 2
    failure: 12
    other: 1
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/wlachance@mozilla.com-bdae5065b168
Try run for 6777d51a7e42 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=6777d51a7e42
Results (out of 17 total builds):
    success: 3
    failure: 14
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/wlachance@mozilla.com-6777d51a7e42
Not looking pretty.
INFO: http://people.mozilla.com/~wlachance/talos-bug-736112.zip -> talos.zip

Should droid.py be under mozdevice?
  inflating: talos/mozdevice/devicemanager.py  
  inflating: talos/mozdevice/devicemanagerSUT.py  
  inflating: talos/mozdevice/devicemanagerADB.py  
  inflating: talos/mozdevice/__init__.py  

python remotePerfConfigurator.py -v -e org.mozilla.fennec -t tegra-255 --branchName Try --resultsServer graphs.mozilla.org --resultsLink /server/collect.cgi --activeTests tdhtml --noChrome --symbolsPath ../symbols --remoteDevice 10.250.51.95 --sampleConfig remote.config --output local.yml --webServer bm-remote.build.mozilla.org --browserWait 60 --nativeUI
 in dir /builds/tegra-255/test/../talos-data/talos/ (timeout 1200 secs)
 watching logfiles {}
 argv: ['python', 'remotePerfConfigurator.py', '-v', '-e', 'org.mozilla.fennec', '-t', 'tegra-255', '--branchName', 'Try', '--resultsServer', 'graphs.mozilla.org', '--resultsLink', '/server/collect.cgi', '--activeTests', 'tdhtml', '--noChrome', '--symbolsPath', '../symbols', '--remoteDevice', '10.250.51.95', '--sampleConfig', 'remote.config', '--output', 'local.yml', '--webServer', 'bm-remote.build.mozilla.org', '--browserWait', '60', '--nativeUI']
 environment:
  PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
  PWD=/builds/tegra-255/talos-data/talos
  SUT_IP=10.250.51.95
  SUT_NAME=tegra-255
  __CF_USER_TEXT_ENCODING=0x1F5:0:0
 closing stdin
 using PTY: False
Traceback (most recent call last):
  File "remotePerfConfigurator.py", line 5, in <module>
    import PerfConfigurator as pc
  File "/builds/tegra-255/talos-data/talos/PerfConfigurator.py", line 22, in <module>
    import utils
  File "/builds/tegra-255/talos-data/talos/utils.py", line 46, in <module>
    from mozdevice import DeviceManagerADB, DeviceManagerSUT, DMError
  File "/builds/tegra-255/talos-data/talos/mozdevice/__init__.py", line 41, in <module>
    from droid import DroidADB, DroidSUT
ImportError: No module named droid
program finished with exit code 1
elapsedTime=0.229578
You need to log in before you can comment on or make changes to this bug.