Skip to content

Commit

Permalink
build(python): samples tests should pass if no samples exist (#803)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche committed Oct 14, 2020
1 parent 3c1fd09 commit 477764c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
git checkout $LATEST_RELEASE
fi

# Exit early if samples directory doesn't exist
if [ ! -d "./samples" ]; then
echo "No tests run. `./samples` not found"
exit 0
fi

# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1

Expand Down Expand Up @@ -101,4 +107,4 @@ cd "$ROOT"
# Workaround for Kokoro permissions issue: delete secrets
rm testing/{test-env.sh,client-secrets.json,service-account.json}

exit "$RTN"
exit "$RTN"

0 comments on commit 477764c

Please sign in to comment.