Wrong error message is shown when running jstests.py with wrong js shell path.

RESOLVED FIXED in mozilla38

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: arai, Assigned: arai)

Tracking

Trunk
mozilla38
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments, 1 obsolete attachment)

(Assignee)

Description

4 years ago
When running jstests.py with wrong js shell path, following message is shown:
> Can't find config/autoconf.mk on a directory containing the JS shell (searched from %s)

it's incompatibility problem between print statement and print function.
https://dxr.mozilla.org/mozilla-central/source/js/src/tests/lib/manifest.py#61
(Assignee)

Comment 1

4 years ago
"%s" in the messsage should be replaced with jsdir variable.
(Assignee)

Comment 2

4 years ago
Created attachment 8554260 [details] [diff] [review]
Fix error message when running jstests.py with wrong js shell path.

I guess this file is not used on try server now.
Tested locally.

$ ./jstests.py /usr/bin/js
Can't find config/autoconf.mk on a directory containing the JS shell (searched from /usr/bin/js)
Attachment #8554260 - Flags: review?(terrence)
Comment on attachment 8554260 [details] [diff] [review]
Fix error message when running jstests.py with wrong js shell path.

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

::: js/src/tests/lib/manifest.py
@@ +57,5 @@
>                  break
>  
>          if path == None:
> +            print (("Can't find config/autoconf.mk on a directory containing the JS shell"
> +                    " (searched from %s)") % jsdir)

Python 2.7 is required, so could we switch this to use .format() instead?
(Assignee)

Comment 4

4 years ago
Created attachment 8554721 [details] [diff] [review]
Part 1: Use .format() instead of module operator in manifest.py.

As a first step, switched to `.format()` in manifest.py, and applied some styles.
After this patch gets ready, I'll prepare patches for other files.
Attachment #8554260 - Attachment is obsolete: true
Attachment #8554260 - Flags: review?(terrence)
Attachment #8554721 - Flags: review?(terrence)
Comment on attachment 8554721 [details] [diff] [review]
Part 1: Use .format() instead of module operator in manifest.py.

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

Nice!
Attachment #8554721 - Flags: review?(terrence) → review+
(Assignee)

Comment 6

4 years ago
Created attachment 8555178 [details] [diff] [review]
Part 2: Use .format() instead of modulo operator in js test libs.

Thank you for reviewing :)

Okay, prepared 3 more patches.
Attachment #8555178 - Flags: review?(terrence)
(Assignee)

Comment 7

4 years ago
Created attachment 8555179 [details] [diff] [review]
Part 3: Use .format() instead of modulo operator in jstests.py.

Forgot to add link to try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=855f19857f68
Attachment #8555179 - Flags: review?(terrence)
(Assignee)

Comment 8

4 years ago
Created attachment 8555180 [details] [diff] [review]
Part 4: Use .format() instead of modulo operator in jit_test.py.
Attachment #8555180 - Flags: review?(terrence)
Attachment #8555178 - Flags: review?(terrence) → review+
Attachment #8555179 - Flags: review?(terrence) → review+
Attachment #8555180 - Flags: review?(terrence) → review+
You need to log in before you can comment on or make changes to this bug.