Skip to content

Commit fcf261f

Browse files
tests: ensure samples pass if no samples exist (via synth) (googleapis#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: googleapis/synthtool@477764c
1 parent 85e14e3 commit fcf261f

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.kokoro/test-samples.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
2828
git checkout $LATEST_RELEASE
2929
fi
3030

31+
# Exit early if samples directory doesn't exist
32+
if [ ! -d "./samples" ]; then
33+
echo "No tests run. `./samples` not found"
34+
exit 0
35+
fi
36+
3137
# Disable buffering, so that the logs stream through.
3238
export PYTHONUNBUFFERED=1
3339

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

104-
exit "$RTN"
110+
exit "$RTN"

synth.metadata

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/python-api-core.git",
7-
"sha": "a85533903c57be4809fe76435e298409e0903931"
7+
"sha": "70ebe42601b3d088b3421233ef7d8245229b7265"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "synthtool",
1313
"remote": "https://github.com/googleapis/synthtool.git",
14-
"sha": "487eba79f8260e34205d8ceb1ebcc65685085e19"
14+
"sha": "477764cc4ee6db346d3febef2bb1ea0abf27de52"
1515
}
1616
}
1717
],

0 commit comments

Comments
 (0)