Skip to content

Commit 08e9345

Browse files
authored
chore(internal/kokoro): skip submodules repeated test if root directoy is already pushd (#10265)
* chore(internal/kokoro): skip submodules repeated test if root directory is already pushd * run tests on all changed dirs
1 parent f72d4eb commit 08e9345

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

internal/kokoro/presubmit.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ CHANGED_DIRS=$(echo "$SIGNIFICANT_CHANGES" | tr ' ' '\n' | cut -d/ -f1 | sort -u
9292

9393
echo "Running tests only in changed submodules: $CHANGED_DIRS"
9494
for d in $CHANGED_DIRS; do
95+
# Check if "." is in the list of changed directories, which means the root
96+
if [ "$d" = "." ]; then
97+
pushd $(dirname $d)
98+
runPresubmitTests
99+
popd
100+
continue
101+
fi
95102
for i in $(find "$d" -name go.mod); do
96103
pushd $(dirname $i)
97104
runPresubmitTests

0 commit comments

Comments
 (0)