Skip to content

Commit

Permalink
A little printf debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed May 24, 2023
1 parent 1df576c commit 40e3c38
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jar_file=$(rlocation rules_jvm_external/tests/integration/java_export/with-proto
# Calling rlocation will also call `set -e` (see line 9)
set +e

echo $jar_file
found=$(jar tvf "${jar_file}" | grep "com/google/protobuf")

if [ "$found" ]; then
Expand All @@ -25,6 +26,7 @@ fi
pom_file=$(rlocation rules_jvm_external/tests/integration/java_export/with-proto-dep-pom.xml)
set +e

echo $pom_file
found=$(cat "${pom_file}" | grep "protobuf-java")

if [ "$found" ]; then
Expand All @@ -35,9 +37,12 @@ fi
pom_file=$(rlocation rules_jvm_external/tests/integration/java_export/with-added-dependency-pom.xml)
set +e

echo $pom_file
# Test will fail if we don't find the dep
found=$(cat "${pom_file}" | grep "protobuf-java")
if [ ! "$found" ]; then
echo "Did not find expected dependency on protobuf when none listed"
exit 1
fi

exit 2

0 comments on commit 40e3c38

Please sign in to comment.