diff options
author | 2016-06-27 11:26:50 +0000 | |
---|---|---|
committer | 2016-06-27 11:41:34 +0000 | |
commit | 10b9004a6da45cf2018abada7e79af0d354f34f4 (patch) | |
tree | 648c8dd271bb14e7cab47bdde9f52110b7bf849c /src/test | |
parent | 99843a88ab52f5b82e3fd934cefb7bbae58c1f04 (diff) |
Make shell tests run on latest release too.
Fixes #1448.
--
MOS_MIGRATED_REVID=125943283
Diffstat (limited to 'src/test')
-rwxr-xr-x | src/test/shell/bazel/testenv.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/shell/bazel/testenv.sh b/src/test/shell/bazel/testenv.sh index 43c14fd4a9..f51954248b 100755 --- a/src/test/shell/bazel/testenv.sh +++ b/src/test/shell/bazel/testenv.sh @@ -20,6 +20,17 @@ [ -z "$TEST_SRCDIR" ] && { echo "TEST_SRCDIR not set!" >&2; exit 1; } BAZEL_RUNFILES="$TEST_SRCDIR/io_bazel" +if [ ! type rlocation &> /dev/null ]; then + function rlocation() { + if [[ "$1" = /* ]]; then + echo $1 + else + echo "$TEST_SRCDIR/$1" + fi + } + export -f rlocation +fi + # Load the unit-testing framework source "$(rlocation io_bazel/src/test/shell/unittest.bash)" || \ { echo "Failed to source unittest.bash" >&2; exit 1; } |