Closed Bug 1399805 Opened 7 years ago Closed 7 years ago

can't run wpt tests without specifying the path of fix_macosx_stack.py by "--stackfix-dir"

Categories

(Testing :: web-platform-tests, defect)

Version 3
Unspecified
macOS
defect
Not set
normal

Tracking

(firefox57 fixed)

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: chenpighead, Assigned: chenpighead)

References

Details

Attachments

(1 file)

STR: 

./mach wpt [PATH_TO_TEST_FILE]

Expect:
The test could be run

Actual:
Can't run the test and get error log like follows

======

 0:04.55 LOG: Thread-Log INFO STDERR: Exception in thread Thread-TestrunnerManager-1:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/Users/jeremy/gecko-cinnabar/testing/web-platform/tests/tools/wptrunner/wptrunner/testrunner.py", line 316, in run
    with self.browser_cls(self.logger, **self.browser_kwargs) as browser:
  File "/Users/jeremy/gecko-cinnabar/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py", line 157, in __init__
    self.symbols_path)
  File "/Users/jeremy/gecko-cinnabar/testing/mozbase/mozrunner/mozrunner/utils.py", line 285, in get_stack_fixer_function
    'fix_macosx_stack')
  File "/Users/jeremy/gecko-cinnabar/testing/mozbase/mozrunner/mozrunner/utils.py", line 265, in import_stack_fixer_module
    module = __import__(module_name, globals(), locals(), [])
  File "/Users/jeremy/gecko-cinnabar/build/mach_bootstrap.py", line 351, in __call__
    module = self._original_import(name, globals, locals, fromlist, level)
ImportError: No module named fix_macosx_stack

======

I can work around this issue by running test with
```
./mach wpt --stackfix-dir [PATH_TO_BIN] [PATH_TO_TEST_FILE]
```

Not sure if this is related, but I have a line like follows in my mozconfig:
```
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/[CUSTOMIZED_NAME]
```
It seems that we use 'Nightly.app/Contents/Resources' to store fix_maxosx_stack.py, but try to get_stack_fixer_function [1][2] from 'Nightly.app/Contents/MacOS'....


[1] https://searchfox.org/mozilla-central/rev/6326724982c66aaeaf70bb7c7ee170f7a38ca226/testing/web-platform/mach_commands.py#48
[2] https://searchfox.org/mozilla-central/rev/6326724982c66aaeaf70bb7c7ee170f7a38ca226/python/mozbuild/mozbuild/base.py#444-445
Hmm, so I think that we are doing the same as mochitest here; it seems to use the bindir for utilityPath, which is then passed to get_stack_fixer_function [1]. I assume that changing [2] to self.bindir doesn't make a difference? Unfortuantely it's not trivial for me to test on OSX, so I can't tell what's going wrong in this case.

[1] https://searchfox.org/mozilla-central/source/testing/mochitest/mochitest_options.py#163
[2] https://searchfox.org/mozilla-central/rev/6326724982c66aaeaf70bb7c7ee170f7a38ca226/testing/web-platform/mach_commands.py#49
(In reply to James Graham [:jgraham] from comment #2)
> Hmm, so I think that we are doing the same as mochitest here; it seems to
> use the bindir for utilityPath, which is then passed to
> get_stack_fixer_function [1]. I assume that changing [2] to self.bindir
> doesn't make a difference? Unfortuantely it's not trivial for me to test on
> OSX, so I can't tell what's going wrong in this case.
> 
> [1]
> https://searchfox.org/mozilla-central/source/testing/mochitest/
> mochitest_options.py#163
> [2]
> https://searchfox.org/mozilla-central/rev/
> 6326724982c66aaeaf70bb7c7ee170f7a38ca226/testing/web-platform/mach_commands.
> py#49

Aha, changing to self.bindir seems a fix!!!! I just confirmed on my local.
(In reply to Jeremy Chen [:jeremychen] UTC+8 from comment #3)
> (In reply to James Graham [:jgraham] from comment #2)
> > Hmm, so I think that we are doing the same as mochitest here; it seems to
> > use the bindir for utilityPath, which is then passed to
> > get_stack_fixer_function [1]. I assume that changing [2] to self.bindir
> > doesn't make a difference? Unfortuantely it's not trivial for me to test on
> > OSX, so I can't tell what's going wrong in this case.
> > 
> > [1]
> > https://searchfox.org/mozilla-central/source/testing/mochitest/
> > mochitest_options.py#163
> > [2]
> > https://searchfox.org/mozilla-central/rev/
> > 6326724982c66aaeaf70bb7c7ee170f7a38ca226/testing/web-platform/mach_commands.
> > py#49
> 
> Aha, changing to self.bindir seems a fix!!!! I just confirmed on my local.

Actually, I was trying to changing it to "os.path.join(self.topobjdir, 'dist', 'bin')" this also fix the issue on my local.
Attachment #8908056 - Flags: review?(james)
Comment on attachment 8908056 [details]
Bug 1399805 - fix the default path of fix_macosx_stack.py for running wpt tests.

https://reviewboard.mozilla.org/r/179764/#review184964
Attachment #8908056 - Flags: review?(james) → review+
Thanks for the pointer and the quick review. :)
Pushed by jichen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/18928907d9bc
fix the default path of fix_macosx_stack.py for running wpt tests. r=jgraham
I guess it is bug 1399214 that helped reveal this issue.
Depends on: 1399214
Assignee: nobody → jeremychen
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/18928907d9bc
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: