diff options
author | Chris Parsons <cparsons@google.com> | 2015-08-31 15:41:09 +0000 |
---|---|---|
committer | Kristina Chodorow <kchodorow@google.com> | 2015-08-31 19:21:07 +0000 |
commit | 6c29d57b6ddef8a6e7ac39b09e9338f616e78e4d (patch) | |
tree | 4007f29b02b530dbeea9bf9e78d8d1756c5bdbdc /tools | |
parent | 676905a9e828adc5cf6f43893703f93568f37dfe (diff) |
For standalone tests, cd into the workspace directory before running the test script.
--
MOS_MIGRATED_REVID=101937276
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/test/test-setup.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/test/test-setup.sh b/tools/test/test-setup.sh index eab081af59..d5ee1ba799 100755 --- a/tools/test/test-setup.sh +++ b/tools/test/test-setup.sh @@ -22,6 +22,11 @@ echo 'exec ${PAGER:-/usr/bin/less} "$0" || exit 1' DIR="$TEST_SRCDIR" +if [ ! -z "$TEST_WORKSPACE" ] +then + DIR="$DIR"/"$TEST_WORKSPACE" +fi + # normal commands are run in the exec-root where they have access to # the entire source tree. By chdir'ing to the runfiles root, tests only # have direct access to their declared dependencies. |