Skip to content

Commit

Permalink
test: current incorrect check ignores the tests from running on chang…
Browse files Browse the repository at this point in the history
…ed modules during presubmit (#8250)
  • Loading branch information
harshachinta authored Jul 12, 2023
1 parent dda1f9d commit c0a3861
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/kokoro/continuous.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ try3 go mod download
# runDirectoryTests runs all tests in the current directory.
# If a PATH argument is specified, it runs `go test [PATH]`.
runDirectoryTests() {
if [[ $PWD != *"/internal/"* ]] ||
[[ $PWD != *"/third_party/"* ]] &&
if { [[ $PWD == *"/internal/"* ]] ||
[[ $PWD == *"/third_party/"* ]]; } &&
[[ $KOKORO_JOB_NAME == *"earliest"* ]]; then
# internal tools only expected to work with latest go version
return
Expand Down
4 changes: 2 additions & 2 deletions internal/kokoro/presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ exit_code=0
# Run tests in the current directory and tee output to log file,
# to be pushed to GCS as artifact.
runPresubmitTests() {
if [[ $PWD != *"/internal/"* ]] ||
[[ $PWD != *"/third_party/"* ]]; then
if [[ $PWD == *"/internal/"* ]] ||
[[ $PWD == *"/third_party/"* ]]; then
# internal tools only expected to work with latest go version
return
fi
Expand Down

0 comments on commit c0a3861

Please sign in to comment.