Closed
Bug 970994
Opened 11 years ago
Closed 10 years ago
Unable to enable NSPR logs on Android 4.0 Opt mochitest: MOZ_UPLOAD_DIR not defined
Categories
(Testing :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla34
People
(Reporter: gbrown, Assigned: gbrown)
References
Details
Attachments
(1 file)
(deleted),
patch
|
dminor
:
review+
|
Details | Diff | Splinter Review |
https://tbpl.mozilla.org/php/getParsedLog.php?id=34460209&tree=Try&full=1#error1
19:00:25 INFO - Mochi-Remote ERROR | Automation Error: Exception caught while running tests
19:00:25 INFO - Traceback (most recent call last):
19:00:25 INFO - File "/builds/panda-0097/test/build/tests/mochitest/runtestsremote.py", line 731, in main
19:00:25 INFO - retVal = mochitest.runTests(options)
19:00:25 INFO - File "/builds/panda-0097/test/build/tests/mochitest/runtests.py", line 1069, in runTests
19:00:25 INFO - with zipfile.ZipFile("%s/nsprlog.zip" % browserEnv["MOZ_UPLOAD_DIR"], "w", zipfile.ZIP_DEFLATED) as logzip:
19:00:25 INFO - KeyError: 'MOZ_UPLOAD_DIR'
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → gbrown
Summary: Unable to enable NSPR logs on Android 4.0 Opt: MOZ_UPLOAD_DIR not defined → Unable to enable NSPR logs on Android 4.0 Opt mochitest: MOZ_UPLOAD_DIR not defined
Assignee | ||
Comment 1•11 years ago
|
||
MOZ_UPLOAD_DIR is defined in the runtestsremote.py environment:
18:54:59 INFO - ENV: MOZ_UPLOAD_DIR is now /builds/panda-0097/test/build/blobber_upload_dir
but for remote tests, browserEnv does not inherit the runtestsremote.py environment.
Assignee | ||
Comment 2•11 years ago
|
||
I had a few problems getting NSPR logs in bug 968200. Setting MOZ_UPLOAD_DIR correctly is one issue, but there is also no remote support -- no existing support for pulling the logs from the device. One solution here would be to pull the remote files and dump them in MOZ_UPLOAD_DIR; a simpler approach would be to define NSPR_LOG_MODULES but not define NSPR_LOG_FILE (probably on Android only), which should dump the requested logging info to stdout / logcat ... which is being saved to blobber now anyway.
Assignee | ||
Comment 3•10 years ago
|
||
To get NSPR logs for Android, this patch sets NSPR_LOG_FILE to a file in a new remote directory, <test-root>/nspr. For mochitests, the log file is named "nspr.log"; for robocop, since there will be a new log for each test, the log file is named "nspr-<testname>.log". At the end of the test run, the nspr directory contents are pulled to the MOZ_UPLOAD_DIR and blobber takes care of the rest.
This is what it ends up looking like:
https://tbpl.mozilla.org/?tree=Try&rev=d5dec9b651fd
Attachment #8472445 -
Flags: review?(dminor)
Comment 4•10 years ago
|
||
Comment on attachment 8472445 [details] [diff] [review]
Add NSPR log support for Android mochitests
Review of attachment 8472445 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me.
Attachment #8472445 -
Flags: review?(dminor) → review+
Assignee | ||
Comment 5•10 years ago
|
||
Comment 6•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•