aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Chris Parsons <cparsons@google.com>2015-08-31 15:41:09 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2015-08-31 19:21:07 +0000
commit6c29d57b6ddef8a6e7ac39b09e9338f616e78e4d (patch)
tree4007f29b02b530dbeea9bf9e78d8d1756c5bdbdc /tools
parent676905a9e828adc5cf6f43893703f93568f37dfe (diff)
For standalone tests, cd into the workspace directory before running the test script.
-- MOS_MIGRATED_REVID=101937276
Diffstat (limited to 'tools')
-rwxr-xr-xtools/test/test-setup.sh5
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.