Closed Bug 1628784 Opened 5 years ago Closed 5 years ago

./mach jsapi-tests crashes in testBinASTReaderContextECMAScript2

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: mgaudet, Assigned: arai)

Details

Attachments

(1 file)

Tried running ./mach jsapi-tests and got the following failure

testBinASTReaderContextECMAScript2
runTestFromPath: entering directory 'jsapi-tests/binast/parser/context/'
Hit MOZ_CRASH(Couldn't open directory) at /home/matthew/unified/js/src/jsapi-tests/testBinASTReader.cpp:183

Could this be that the test case expect to be running in a given directory, that the mach command does not respect?

Flags: needinfo?(dteller)
Flags: needinfo?(arai.unmht)
Priority: -- → P2
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Flags: needinfo?(dteller)

mach is running it from the wrong directory. The BinAST tests have to run from $SRCDIR/js/src. It's not good.

Yeah, that's not good. I haven't found a better way to make it work, but if anybody has ideas, I'm interested.

Priority: P2 → P1

to avoid depending on cwd, one option is to refer env var like TOPSRCDIR.
for automation, we can specify it in autospider.py
for local run, we could either, abort if it's not specified, or maybe fallback to some common cwds.

(In reply to David Teller [:Yoric] (please use "needinfo") from comment #3)

Yeah, that's not good. I haven't found a better way to make it work, but if anybody has ideas, I'm interested.

Hmm. I imagine C++ __FILE__ is useless because it's relative?

The code under test here is largely generated C++; what if the code-generator spat the absolute path to the test directory into the C++ code somewhere? Then there could be a function in jsfriendapi.h to get that path.

Flags: needinfo?(dteller)

looks like, we have topsrcdir macro defined by command line parameter while compiling, that points js/src with absolute path.
I'll use it.

Flags: needinfo?(arai.unmht)
Flags: needinfo?(dteller)
Attachment #9141145 - Attachment description: Bug 1628784 - Use topsrcdir macro value for js/src path in BinAST tests. r?Yoric! → Bug 1628784 - Pass TOPSRCDIR environment variable to jsapi-tests, in order to read test files. r?Yoric!
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/31ed49b0ce77 Pass TOPSRCDIR environment variable to jsapi-tests, in order to read test files. r=Yoric
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: