2022-10-13 12:39:17 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
bazel test "$@" ...
|
|
|
|
|
|
|
|
# /tmp/bazel-zig-cc should be empty for the test below to be valid.
|
|
|
|
# This test ensures that github.com/ziglang/zig/issues/13050 does not
|
2022-11-29 14:23:45 +02:00
|
|
|
# regress
|
2022-12-11 07:20:14 +02:00
|
|
|
find /tmp/bazel-zig-cc -name mutex_destructor.o -execdir file '{}' \; | \
|
2022-10-13 12:39:17 +03:00
|
|
|
sort | uniq -c | sort -rn > /tmp/got_cache
|
|
|
|
|
|
|
|
diff -u ci/testdata/want_cache /tmp/got_cache || {
|
|
|
|
>&2 echo "ERROR: unexpected artifacts."
|
|
|
|
>&2 echo "Was /tmp/bazel-zig-cc empty before the test?"
|
2022-11-29 14:23:45 +02:00
|
|
|
exit 1
|
2022-10-13 12:39:17 +03:00
|
|
|
}
|