aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/bazel/external_integration_test.sh
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2016-12-21 16:55:18 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-12-21 17:27:01 +0000
commit3a71c1598fbeca77bec47d410f360fc3ab83096f (patch)
tree72d16d1a38a8d7868f539ee292203805cfb072c6 /src/test/shell/bazel/external_integration_test.sh
parentdba3c8337efdf1c032f71bd49e04ed9baa9f2b9f (diff)
Fix test to work on OS X
stat has completely different options. -- PiperOrigin-RevId: 142668570 MOS_MIGRATED_REVID=142668570
Diffstat (limited to 'src/test/shell/bazel/external_integration_test.sh')
-rwxr-xr-xsrc/test/shell/bazel/external_integration_test.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/test/shell/bazel/external_integration_test.sh b/src/test/shell/bazel/external_integration_test.sh
index 4392fe973c..fc4508781a 100755
--- a/src/test/shell/bazel/external_integration_test.sh
+++ b/src/test/shell/bazel/external_integration_test.sh
@@ -149,8 +149,15 @@ fi
base_external_path=bazel-out/../external/endangered/fox
assert_files_same ${base_external_path}/male ${base_external_path}/male_relative
assert_files_same ${base_external_path}/male ${base_external_path}/male_absolute
- ls -l ${base_external_path}/*
- assert_equals "1078100502" "$(stat -c %Y ${base_external_path}/male)"
+ case "${PLATFORM}" in
+ darwin)
+ ts="$(stat -f %m ${base_external_path}/male)"
+ ;;
+ *)
+ ts="$(stat -c %Y ${base_external_path}/male)"
+ ;;
+ esac
+ assert_equals "1078100502" "$ts"
}
function assert_files_same() {