From 3085f829f453d3bbc3ba3e28ace4f8c67a84f3ef Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Thu, 15 Oct 2020 06:14:05 -0700 Subject: [PATCH] build(python): samples tests should pass if no samples exist Source-Author: Daniel Sanche 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 --- .kokoro/test-samples.sh | 8 +++++++- synth.metadata | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh index 3ed28ed..9611b36 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" diff --git a/synth.metadata b/synth.metadata index 953c84c..d239ef8 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-video-transcoder.git", - "sha": "845f1e371cc45040c882b725e12375430260e45a" + "sha": "89682e93952608ceb4ac7aa096d6b53e26fc6b93" } }, { @@ -19,14 +19,14 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "9b0da5204ab90bcc36f8cd4e5689eff1a54cc3e4" + "sha": "477764cc4ee6db346d3febef2bb1ea0abf27de52" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "9b0da5204ab90bcc36f8cd4e5689eff1a54cc3e4" + "sha": "477764cc4ee6db346d3febef2bb1ea0abf27de52" } } ],