Skip to content

Commit

Permalink
TEMP: Add integration test for fallback toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Feb 12, 2022
1 parent f5ff0fe commit 5732d9a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/test/shell/bazel/cc_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1456,4 +1456,26 @@ EOF
expect_log "fatal error: '\?dep.h'\?"
}

function test_fallback_to_non_xcode_toolchain() {
# This test should trivially pass on platforms other than macOS, so there is no need to exclude
# it.

cat > ok.cc <<EOF
#include <stdio.h>
int main() {
printf("Hello\n");
}
EOF

cat > BUILD <<EOF
cc_binary(
name = "ok",
srcs = ["ok.cc"],
)
EOF

DEVELOPER_DIR=/does_not_exist bazel build '//:ok' || \
fail "Should pass with fallback non-Xcode toolchain"
}

run_suite "cc_integration_test"

0 comments on commit 5732d9a

Please sign in to comment.