Closed
Bug 1036663
Opened 12 years ago
Closed 12 years ago
[steeplechase] When the directory specified by "--save-logs-to" does not exists, steeplechase dies with an uncaught exception
Categories
(Testing :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sydpolk, Assigned: martijn.martijn)
Details
Attachments
(1 file)
|
608 bytes,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
mozilla@platform-steeplechase:~/firefox-releases$ /usr/bin/env python ~/src/steeplechase/steeplechase/runsteeplechase.py --binary /home/mozilla/firefox-releases/firefox/firefox --specialpowers-path /home/mozilla/firefox-releases/tests/steeplechase/specialpowers --prefs-file /home/mozilla/firefox-releases/tests/steeplechase/prefs_general.js --signalling-server 'http://10.252.28.198:8080/' --html-manifest /home/mozilla/firefox-releases/tests/steeplechase/tests/steeplechase.ini --save-logs-to ~/logs/ --host1 10.252.26.20:20701 --host2 10.252.27.227:20701
steeplechase INFO | Pushing app to Client 1...
steeplechase INFO | Pushing app to Client 2...
Writing profile for Client 1...
Pushing profile to Client 1...
cmd: ['/tmp/tests/steeplechase/app/firefox', '-no-remote', '-profile', '/tmp/tests/steeplechase/profile', 'http://10.252.28.198:50659/index.html']
Writing profile for Client 2...
Pushing profile to Client 2...
cmd: ['/tmp/tests/steeplechase/app/firefox', '-no-remote', '-profile', '/tmp/tests/steeplechase/profile', 'http://10.252.28.198:50659/index.html']
steeplechase INFO | Waiting for results...
steeplechase INFO | All clients finished
Traceback (most recent call last):
File "/home/mozilla/src/steeplechase/steeplechase/runsteeplechase.py", line 308, in <module>
sys.exit(0 if main(sys.argv[1:]) else 1)
File "/home/mozilla/src/steeplechase/steeplechase/runsteeplechase.py", line 298, in main
html_pass_count, html_fail_count = test.run()
File "/home/mozilla/src/steeplechase/steeplechase/runsteeplechase.py", line 198, in run
"%s.log" % info['name']), "wb") as f:
IOError: [Errno 2] No such file or directory: '/home/mozilla/logs/Client 1.log'
When I create the directory, the test succeeds.
| Assignee | ||
Comment 1•12 years ago
|
||
So you want to have the directory automatically be created by steeplechase.py if it doesn't exist?
Comment 2•12 years ago
|
||
(In reply to Martijn Wargers [:mwargers] (QA) from comment #1)
> So you want to have the directory automatically be created by
> steeplechase.py if it doesn't exist?
Either that or at least check if the directory exists and print our a proper error messages if the directory is missing. I think the error message is the safer choice then having steeplechase suddenly create directories somewhere (in case you had a typo in it for example).
| Reporter | ||
Comment 3•12 years ago
|
||
Actually, I would prefer it create the directory. If there is a typo, the creation would most likely fail. Adding an error message still means I have to do "mkdir -p ~/logs" before running any tests in all of my scripts.
Comment 4•12 years ago
|
||
(In reply to Syd Polk from comment #3)
> Actually, I would prefer it create the directory. If there is a typo, the
> creation would most likely fail.
Sounds like we are talking about different typos here: I'm concerned that you provide /log/ as the target dir, but you mean /logs/ (which exists). Then steeplechase will create /log/ and write its log files there. And then your post-processing scripts find nothing in the /logs/ directory and someone has to investigate. I think it basically fails the "fail early" recommendation if a program like steeplechase does things like directory creation.
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → martijn.martijn
| Assignee | ||
Comment 5•12 years ago
|
||
Ok, this bails out early when --save-logs-to points to a non-existing directory.
But I guess this patch has to be a pull request?
Attachment #8458072 -
Flags: review?(ted)
Comment 6•12 years ago
|
||
Comment on attachment 8458072 [details] [diff] [review]
logdir.diff
Review of attachment 8458072 [details] [diff] [review]:
-----------------------------------------------------------------
I'll land this in the steeplechase repo for you.
Attachment #8458072 -
Flags: review?(ted) → review+
Comment 7•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Component: New Frameworks → General
You need to log in
before you can comment on or make changes to this bug.
Description
•