aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2015-11-20 18:42:15 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2015-11-20 21:06:25 +0000
commitc4e4bb49e3a8ecd75040a38b7c0f507ed125912e (patch)
tree44756de5eca364c9cb21cd0ec048664f94052c0b
parent91280c52394c53f310695749d9912caa0d62d968 (diff)
Fix external test not to use realpath
-- MOS_MIGRATED_REVID=108357476
-rwxr-xr-xsrc/test/shell/bazel/external_integration_test.sh22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/test/shell/bazel/external_integration_test.sh b/src/test/shell/bazel/external_integration_test.sh
index 6421d81e34..c135242e89 100755
--- a/src/test/shell/bazel/external_integration_test.sh
+++ b/src/test/shell/bazel/external_integration_test.sh
@@ -145,19 +145,23 @@ fi
expect_log $what_does_the_fox_say
if [[ $do_symlink = 1 ]]; then
- if [[ -x ${realpath_path} ]]; then
- realpath=${realpath_path}
- else
- realpath=realpath
- fi
base_external_path=bazel-out/../external/endangered/fox
- assert_equals $(${realpath} ${base_external_path}/male) \
- $(${realpath} ${base_external_path}/male_relative)
- assert_equals $(${realpath} ${base_external_path}/male) \
- $(${realpath} ${base_external_path}/male_absolute)
+ assert_files_same ${base_external_path}/male ${base_external_path}/male_relative
+ assert_files_same ${base_external_path}/male ${base_external_path}/male_absolute
fi
}
+function assert_files_same() {
+ assert_contains "$(cat $1)" $2 && return 0
+ echo "Expected these to be the same:"
+ echo "---------------------------"
+ cat $1
+ echo "==========================="
+ cat $2
+ echo "---------------------------"
+ return 1
+}
+
function test_http_archive_zip() {
http_archive_helper zip_up