aboutsummaryrefslogtreecommitdiff
path: root/.kokoro
diff options
context:
space:
mode:
authorYoshi Automation Bot <yoshi-automation@google.com>2020-11-30 07:31:10 -0800
committerGitHub <noreply@github.com>2020-11-30 10:31:10 -0500
commitfcf261fc3c4c1f28f2fa13d055716cf70d21f6f5 (patch)
tree9a9904c79403d52119f72f936b71dee90ad7bdf9 /.kokoro
parent85e14e3f3a6b3e3c3ae9626daf60183f4c05fb6a (diff)
downloadpython-api-core-fcf261fc3c4c1f28f2fa13d055716cf70d21f6f5.tar.gz
tests: ensure samples pass if no samples exist (via synth) (#94)
Source-Author: Daniel Sanche <d.sanche14@gmail.com> Source-Date: Wed Oct 14 08:00:06 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 477764cc4ee6db346d3febef2bb1ea0abf27de52 Source-Link: https://github.com/googleapis/synthtool/commit/477764cc4ee6db346d3febef2bb1ea0abf27de52
Diffstat (limited to '.kokoro')
-rwxr-xr-x.kokoro/test-samples.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh
index 653239f..cbdb07e 100755
--- a/.kokoro/test-samples.sh
+++ b/.kokoro/test-samples.sh
@@ -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
@@ -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" \ No newline at end of file
+exit "$RTN"