Skip to content

Commit

Permalink
chore(internal/kokoro): skip submodules repeated test if root directo…
Browse files Browse the repository at this point in the history
…y is already pushd (googleapis#10265)

* chore(internal/kokoro): skip submodules repeated test if root directory is already pushd

* run tests on all changed dirs
  • Loading branch information
rahul2393 authored May 28, 2024
1 parent f72d4eb commit 08e9345
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/kokoro/presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ CHANGED_DIRS=$(echo "$SIGNIFICANT_CHANGES" | tr ' ' '\n' | cut -d/ -f1 | sort -u

echo "Running tests only in changed submodules: $CHANGED_DIRS"
for d in $CHANGED_DIRS; do
# Check if "." is in the list of changed directories, which means the root
if [ "$d" = "." ]; then
pushd $(dirname $d)
runPresubmitTests
popd
continue
fi
for i in $(find "$d" -name go.mod); do
pushd $(dirname $i)
runPresubmitTests
Expand Down

0 comments on commit 08e9345

Please sign in to comment.