bazel_7: Add regression test for empty lockfiles

This commit is contained in:
Guillaume Maudoux 2023-12-18 20:09:34 +01:00
parent eaa9b99502
commit 2a4700c48b

View file

@ -542,6 +542,13 @@ stdenv.mkDerivation rec {
# second call succeeds because it defers to $out/bin/bazel-{version}-{os_arch}
hello_test
## Test that the GSON serialisation files are present
gson_classes=$(unzip -l $(bazel info install_base)/A-server.jar | grep GsonTypeAdapter.class | wc -l)
if [ "$gson_classes" -lt 10 ]; then
echo "Missing GsonTypeAdapter classes in A-server.jar. Lockfile generation will not work"
exit 1
fi
runHook postInstall
'';