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

test PWD should be TEST_SRCDIR/{workspace_name} #1126

Closed
shahms opened this issue Apr 6, 2016 · 7 comments
Closed

test PWD should be TEST_SRCDIR/{workspace_name} #1126

shahms opened this issue Apr 6, 2016 · 7 comments
Labels
P2 We'll consider working on this in future. (Assignee optional) type: documentation (cleanup)

Comments

@shahms
Copy link

shahms commented Apr 6, 2016

At the moment, the current working directory is just TEST_SRCDIR, but it should be TEST_SRCDIR/{workspace_name} (see #1124).

@kchodorow
Copy link
Contributor

After further inspection, this is WAI.

@shahms
Copy link
Author

shahms commented Apr 6, 2016

Then this is inconsistent with internal blaze.

@shahms
Copy link
Author

shahms commented Apr 6, 2016

Upon further inspection, I'm not sure how our PWD may be getting confused in #1124 as a very simple test shows that you're correct.

$ cat testenv.sh
#!/bin/bash
echo "$PWD"
echo "$TEST_SRCDIR"
exit 1
$ bazel test //:testenv
$ bazel test --test_output=streamed //:testenv
WARNING: Streamed test output requested so all tests will be run locally, without sharding, one at a time.
INFO: Found 1 test target...
.../testenv/bazel-out/local-fastbuild/bin/testenv.runfiles/WORKSPACE_NAME
.../testenv/bazel-out/local-fastbuild/bin/testenv.runfiles

Apologies for the distraction.

@shahms
Copy link
Author

shahms commented Apr 6, 2016

The bazel documentation should be updated, though :-)

@kchodorow
Copy link
Contributor

Are you requesting more docs about it, or is the documentation incorrect somewhere?

@shahms
Copy link
Author

shahms commented Apr 6, 2016

The Test Encyclopedia is incorrect, both in the table and below:

PWD $TEST_SRCDIR
The initial working directory shall be $TEST_SRCDIR.

@kchodorow
Copy link
Contributor

Ah, quite.

@kchodorow kchodorow reopened this Apr 6, 2016
@kchodorow kchodorow added type: documentation (cleanup) category: native rules (Java / C++ / Python) P2 We'll consider working on this in future. (Assignee optional) labels Apr 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) type: documentation (cleanup)
Projects
None yet
Development

No branches or pull requests

2 participants