Closed
Bug 1214152
Opened 9 years ago
Closed 9 years ago
Test runner: print suitable error if handed a non-executable
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: lth, Assigned: lth)
Details
Attachments
(1 file, 2 obsolete files)
3.93 KB,
patch
|
Details | Diff | Splinter Review |
Currently, if the required argument to jit_test.py and jstests.py is not an executable, the test harness will try to execute it once for each test, and print one stack trace for each test. This is usually extremely confusing. A better solution would be to check that the program is executable, and to fail with an error message if it is not.
Assignee | ||
Comment 1•9 years ago
|
||
Comment 2•9 years ago
|
||
Comment on attachment 8673085 [details] [diff] [review] bug1214152-valid-shell.patch Review of attachment 8673085 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/tests/jstests.py @@ +159,5 @@ > # If we do not have a shell, we must be in a special mode. > if options.js_shell is None and not options.make_manifests: > op.error('missing JS_SHELL argument') > > + if not (options.js_shell is None): "is not" is an operator in its own right, so it would be clearer to do: if options.js_shell is not None: @@ +160,5 @@ > if options.js_shell is None and not options.make_manifests: > op.error('missing JS_SHELL argument') > > + if not (options.js_shell is None): > + if not (os.path.isfile(options.js_shell) and os.access(options.js_shell, os.X_OK)): We already have the first two parts of this test right below the parse_args() call in main(). Can you just add the os.access test there to get the same effect?
Attachment #8673085 -
Flags: review?(terrence)
Assignee | ||
Comment 3•9 years ago
|
||
Changed jstests.py as suggested
Attachment #8673085 -
Attachment is obsolete: true
Attachment #8673631 -
Flags: review?(terrence)
Comment 4•9 years ago
|
||
Comment on attachment 8673631 [details] [diff] [review] bug1214152-valid-shell.patch, v2 Review of attachment 8673631 [details] [diff] [review]: ----------------------------------------------------------------- Thanks! ::: js/src/tests/jstests.py @@ +307,5 @@ > > > def main(): > options, prefix, requested_paths, excluded_paths = parse_args() > + if options.js_shell is not None and not (isfile(options.js_shell) and os.access(options.js_shell, os.X_OK)): Please wrap this after the second and to keep things to approximately 80 chars -- people occasionally sweep the tree with a pep8 linter and complain about violations.
Attachment #8673631 -
Flags: review?(terrence) → review+
this appear to have busted Windows jit tests: https://treeherder.mozilla.org/logviewer.html#?job_id=15649235&repo=mozilla-inbound Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/613fcc68a20f
Flags: needinfo?(lhansen)
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(lhansen)
Assignee | ||
Comment 7•9 years ago
|
||
This will go unfixed until I can get my Windows build environment to work, which at the current rate of progress will be never.
Assignee: lhansen → nobody
Status: ASSIGNED → NEW
Assignee | ||
Comment 8•9 years ago
|
||
The problem is that on Windows, the shell will frequently be eg dist/bin/js but the name of the file is actually dist/bin/js.exe.
Assignee | ||
Comment 9•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1649d7c7156b
Assignee | ||
Comment 10•9 years ago
|
||
Assignee: nobody → lhansen
Attachment #8673631 -
Attachment is obsolete: true
Assignee | ||
Comment 11•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/6b34afb1a471b35f9c24945eb2ae094b77952526 Bug 1214152 - early check that shell is executable. r=terrence
Comment 12•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6b34afb1a471
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•