diff --git a/.kokoro/tests/diff_tests.sh b/.kokoro/tests/diff_tests.sh index ec135a969f3..0fab39a60b8 100755 --- a/.kokoro/tests/diff_tests.sh +++ b/.kokoro/tests/diff_tests.sh @@ -42,14 +42,15 @@ echo -e "\n******************** TESTING AFFECTED PROJECTS ********************" cd github/java-docs-samples find * -name pom.xml -print0 | sort -z | while read -d $'\0' file do - # Navigate to project + file=$(dirname "$file") pushd "$file" > /dev/null + set +e - # Has the project changed? + # Only tests changed projects git diff --quiet master.. . CHANGED=$? - # Skip parents so the projects aren't tested twice + # Only test leafs to prevent testing twice PARENT=$(grep "" pom.xml -c) set -e