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
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 @@
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 @@
# 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 8b2b29d..7072446 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,14 +4,14 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/python-api-core.git",
- "sha": "a85533903c57be4809fe76435e298409e0903931"
+ "sha": "70ebe42601b3d088b3421233ef7d8245229b7265"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
- "sha": "487eba79f8260e34205d8ceb1ebcc65685085e19"
+ "sha": "477764cc4ee6db346d3febef2bb1ea0abf27de52"
}
}
],