diff options
author | 2015-10-26 14:42:41 +0000 | |
---|---|---|
committer | 2015-10-27 11:47:09 +0000 | |
commit | ee51bdd08ab3cc883f5e5e90c6f8ecadf8ba1ebb (patch) | |
tree | fc1c98d3a6e96ba31dde5257665b47e7ac8073fa /src/test | |
parent | e42275c03a1978f4eb5aa97e6a4929606e97bed8 (diff) |
Allow C++ compile actions to run in a sandbox by replacing the LocalGccStrategy / LocalLinkStrategy with SpawnGccStrategy / SpawnLinkStrategy.
RELNOTES: C++ compile actions run in a sandbox now on systems that support sandboxed execution.
--
MOS_MIGRATED_REVID=106299043
Diffstat (limited to 'src/test')
-rwxr-xr-x | src/test/shell/bazel/bazel_sandboxing_cpp_test.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/shell/bazel/bazel_sandboxing_cpp_test.sh b/src/test/shell/bazel/bazel_sandboxing_cpp_test.sh index eb5aeb2f1c..7391669d1b 100755 --- a/src/test/shell/bazel/bazel_sandboxing_cpp_test.sh +++ b/src/test/shell/bazel/bazel_sandboxing_cpp_test.sh @@ -77,6 +77,7 @@ function tear_down() { rm -rf examples/cpp } +# Tests for #473: Sandboxing for C++ compilation was accidentally disabled. function test_sandboxed_cpp_build_rebuilds_on_change() { bazel --batch clean &> $TEST_log \ || fail "bazel clean failed" @@ -111,11 +112,12 @@ cc_library( ) EOF - bazel build --hdrs_check=strict --spawn_strategy=sandboxed //examples/cpp:hello-lib &> $TEST_log \ + bazel build --spawn_strategy=sandboxed //examples/cpp:hello-lib &> $TEST_log \ && fail "build should not have succeeded with missing header file" - fgrep "undeclared inclusion(s) in rule '//examples/cpp:hello-lib'" $TEST_log \ - || fail "could not find 'undeclared inclusion' error message in bazel output" + fgrep "fatal error: examples/cpp/lib/hello-lib.h: No such file or directory" $TEST_log \ + || fgrep "fatal error: 'examples/cpp/lib/hello-lib.h' file not found" $TEST_log \ + || fail "could not find 'No such file or directory' error message in bazel output" } # TODO(philwo) turns out, we have this special "hdrs" attribute and in theory you can only include |