From 53ea3896a52f87c758e79b5a19fa338c83925a98 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Wed, 14 Jul 2021 08:39:21 -0600 Subject: [PATCH] build(python): exit with success status if no samples found (#1153) --- .../templates/python_library/.kokoro/test-samples-impl.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synthtool/gcp/templates/python_library/.kokoro/test-samples-impl.sh b/synthtool/gcp/templates/python_library/.kokoro/test-samples-impl.sh index cf5de74c1..311a8d54b 100755 --- a/synthtool/gcp/templates/python_library/.kokoro/test-samples-impl.sh +++ b/synthtool/gcp/templates/python_library/.kokoro/test-samples-impl.sh @@ -20,9 +20,9 @@ set -eo pipefail # Enables `**` to include files nested inside sub-folders shopt -s globstar -# Exit early if samples directory doesn't exist -if [ ! -d "./samples" ]; then - echo "No tests run. `./samples` not found" +# Exit early if samples don't exist +if ! find samples -name 'requirements.txt' | grep -q .; then + echo "No tests run. './samples/**/requirements.txt' not found" exit 0 fi