diff --git a/internal/kokoro/presubmit.sh b/internal/kokoro/presubmit.sh index 8fed3deda6b0..b7ff0c5be9d5 100755 --- a/internal/kokoro/presubmit.sh +++ b/internal/kokoro/presubmit.sh @@ -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