dep-protobuf/pkg/test/gen_file_lists_golden_test.sh
Adam Cozzette dea15165c6 Add simple golden test for CMake file list generation
I updated our Bazel CI jobs to cover `//pkg/...` and thereby exercise this new
test. That made me realize that `//pkg/...` was not fully buildable because
there was a reference to the non-existent target `@utf8_range//:dist_files`, so
I also fixed that.

PiperOrigin-RevId: 498437497
2022-12-29 13:10:49 -08:00

14 lines
310 B
Bash
Executable file

#!/bin/bash
set -ex
if cmp "$1" "$2"; then
# Files are identical, as expected.
exit 0;
else
echo "Golden file $1 does not match generated output $2:"
echo "--------------------------------------------------"
diff -u "$1" "$2"
echo "--------------------------------------------------"
exit 1
fi