diff options
author | 2017-10-17 12:47:33 +0200 | |
---|---|---|
committer | 2017-10-18 10:28:07 +0200 | |
commit | 7cebd1f5f3fa13fe6faa022fc45b2670010b8248 (patch) | |
tree | d0af6df0b25df8e7e516eb648e40838f14df2b04 /src/test | |
parent | d0374acf40e182ee4a811b71f2b064d8eb3fbabe (diff) |
Only run cpp_darwin_integration_test on darwin
This test assumes linking and loading behavior only present on darwin, it
doesn't make sense to run this test on other platforms. But our CI does. This cl
makes the test pass without executing anythign when run on a non-darwin
platform.
E.g. of failure: http://ci.bazel.io/blue/organizations/jenkins/bazel-tests/detail/bazel-tests/1088/pipeline/26
RELNOTES: None.
PiperOrigin-RevId: 172446997
Diffstat (limited to 'src/test')
-rwxr-xr-x | src/test/shell/bazel/cpp_darwin_integration_test.sh | 5 | ||||
-rwxr-xr-x | src/test/shell/testenv.sh | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/test/shell/bazel/cpp_darwin_integration_test.sh b/src/test/shell/bazel/cpp_darwin_integration_test.sh index 08cf924f0f..d191ef83b8 100755 --- a/src/test/shell/bazel/cpp_darwin_integration_test.sh +++ b/src/test/shell/bazel/cpp_darwin_integration_test.sh @@ -21,6 +21,11 @@ CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${CURRENT_DIR}/../integration_test_setup.sh" \ || { echo "integration_test_setup.sh not found!" >&2; exit 1; } +if ! is_darwin; then + echo "This test suite requires running on Darwin. But now is ${PLATFORM}" >&2 + exit 0 +fi + function test_osx_cc_wrapper_rpaths_handling() { mkdir -p cpp/rpaths cat > cpp/rpaths/BUILD <<EOF diff --git a/src/test/shell/testenv.sh b/src/test/shell/testenv.sh index 6b31494f4b..e9eee3355d 100755 --- a/src/test/shell/testenv.sh +++ b/src/test/shell/testenv.sh @@ -19,13 +19,17 @@ # TODO(bazel-team): This file is currently an append of the old testenv.sh and # test-setup.sh files. This must be cleaned up eventually. -# Windows PLATFORM="$(uname -s | tr 'A-Z' 'a-z')" + function is_windows() { # On windows, the shell test is actually running on msys [[ "${PLATFORM}" =~ msys_nt* ]] } +function is_darwin() { + [[ "${PLATFORM}" =~ darwin ]] +} + function _log_base() { prefix=$1 shift |