about summary refs log blame commit diff
path: root/third_party/bazel/rules_nixpkgs/tests/test_output.sh
blob: 29f2735cf4ca9f56ecd2720a27b713ec4081aea7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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