Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mocha_test: add mocha to runfiles #21

Merged
merged 1 commit into from
May 30, 2017
Merged

Conversation

ixdy
Copy link
Contributor

@ixdy ixdy commented May 27, 2017

Something changed in Bazel 0.5.0 such that this rule stopped working, e.g.:

module.js:457
    throw err;
    ^

Error: Cannot find module '/root/.cache/bazel/_bazel_root/27a95fe2fc68aa1195ddf1a4bbaaea62/bazel-sandbox/2986611709447846617/execroot/test-infra/bazel-out/local-fastbuild/bin/triage/script_test.runfiles/__main__/t/.cache/bazel/_bazel_root/27a95fe2fc68aa1195ddf1a4bbaaea62/external/npm_mocha/bin/mocha'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.runMain (module.js:590:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3
Use --strategy=TestRunner=standalone to disable sandboxing for the failing actions.

I don't exactly understand what _get_abs_sourcepath is doing, but it was still getting confused, even after adding mocha to the runfiles. Using just mocha.path seems to work as intended, though, and is far simpler.

cc @rmmh

@ixdy
Copy link
Contributor Author

ixdy commented May 27, 2017

Seems like node_library is still broken. manually parsing the File object (looking for Artifact:) seems to be problematic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants