diff options
Diffstat (limited to 'third_party/bazel/rules_nixpkgs/tests/test_output.sh')
-rwxr-xr-x | third_party/bazel/rules_nixpkgs/tests/test_output.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/third_party/bazel/rules_nixpkgs/tests/test_output.sh b/third_party/bazel/rules_nixpkgs/tests/test_output.sh new file mode 100755 index 000000000000..29f2735cf4ca --- /dev/null +++ b/third_party/bazel/rules_nixpkgs/tests/test_output.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# first param is the expected number of files given by `locations` +expected_length="$1" + +# rest of the arguments are files +shift +no_of_files=$# + +if [ "$no_of_files" -ne "$expected_length" ]; then + echo "Should have received $expected_length files, but got $no_of_files:" + for f in "$@"; do + echo "$f" + done + exit 1 +fi |