aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
diff options
context:
space:
mode:
authorGravatar Dmitry Lomov <dslomov@google.com>2016-06-27 11:26:50 +0000
committerGravatar Dmitry Lomov <dslomov@google.com>2016-06-27 11:41:34 +0000
commit10b9004a6da45cf2018abada7e79af0d354f34f4 (patch)
tree648c8dd271bb14e7cab47bdde9f52110b7bf849c /src/test
parent99843a88ab52f5b82e3fd934cefb7bbae58c1f04 (diff)
Make shell tests run on latest release too.
Fixes #1448. -- MOS_MIGRATED_REVID=125943283
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/shell/bazel/testenv.sh11
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; }