aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
diff options
context:
space:
mode:
authorGravatar Brian Silverman <bsilver16384@gmail.com>2015-12-08 06:47:23 +0000
committerGravatar Lukacs Berki <lberki@google.com>2015-12-08 13:16:21 +0000
commit606db4dca3e1eb73664261294308c4517a7d540e (patch)
treefce5ea766a6215dc4b7de3dda85d9e355f6fc2dd /src/test
parenta3cf6144843eece7caee855c8587dddb3dd0eb77 (diff)
Fix sandbox .params files being left around
They accumulate indefinitely and take up space. -- Change-Id: I74c7ffd795b21793f8654e0e30785e1b8ba99ca4 Reviewed-on: https://bazel-review.googlesource.com/#/c/2510/ MOS_MIGRATED_REVID=109656651
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/shell/bazel/bazel_sandboxing_test.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/shell/bazel/bazel_sandboxing_test.sh b/src/test/shell/bazel/bazel_sandboxing_test.sh
index 8c316fa81d..3ab5b744c2 100755
--- a/src/test/shell/bazel/bazel_sandboxing_test.sh
+++ b/src/test/shell/bazel/bazel_sandboxing_test.sh
@@ -210,6 +210,21 @@ function test_sandboxed_genrule_with_tools() {
|| fail "Genrule didn't produce output: examples/genrule:tools_work"
}
+# Make sure that sandboxed execution doesn't accumulate files in the
+# sandbox directory.
+function test_sandbox_cleanup() {
+ bazel --batch clean &> $TEST_log \
+ || fail "bazel clean failed"
+ bazel build \
+ examples/genrule:tools_work \
+ || fail "Hermetic genrule failed: examples/genrule:tools_work"
+ bazel shutdown &> $TEST_log || fail "bazel shutdown failed"
+ ls -la "$(bazel info execution_root)/bazel-sandbox"
+ if [[ "$(ls -A "$(bazel info execution_root)"/bazel-sandbox)" ]]; then
+ fail "Build left files around afterwards"
+ fi
+}
+
# Test for #400: Linux sandboxing and relative symbolic links.
#
# let A = examples/genrule/symlinks/a/b/x.txt -> ../x.txt