File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,9 @@ public static function setUpBeforeClass(): void
72
72
if (!extension_loaded ('grpc ' )) {
73
73
self ::markTestSkipped ('Must enable grpc extension. ' );
74
74
}
75
+ if ('true ' !== getenv ('GOOGLE_SPANNER_RUN_BACKUP_TESTS ' )) {
76
+ self ::markTestSkipped ('Skipping backup tests. ' );
77
+ }
75
78
self ::$ instanceId = self ::requireEnv ('GOOGLE_SPANNER_INSTANCE_ID ' );
76
79
77
80
$ spanner = new SpannerClient ([
Original file line number Diff line number Diff line change @@ -85,14 +85,21 @@ FILES_CHANGED=$(git diff --name-only HEAD $(git merge-base HEAD master))
85
85
if [ -z " $PULL_REQUEST_NUMBER " ]; then
86
86
RUN_ALL_TESTS=1
87
87
else
88
+ labels=$( curl " https://api.github.com/repos/GoogleCloudPlatform/php-docs-samples/issues/$PULL_REQUEST_NUMBER /labels" )
89
+
88
90
# Check to see if the repo includes the "kokoro:run-all" label
89
- if curl " https://api.github.com/repos/GoogleCloudPlatform/php-docs-samples/issues/$PULL_REQUEST_NUMBER /labels" \
90
- | grep -q " kokoro:run-all" ; then
91
+ if grep -q " kokoro:run-all" <<< $labels ; then
91
92
RUN_ALL_TESTS=1
92
93
else
93
94
RUN_ALL_TESTS=0
94
95
fi
95
96
97
+ # Check to see if the repo includes the "spanner:run-backup-tests" label
98
+ # If we intend to run the backup tests in Spanner, we set the env variable
99
+ if grep -q " spanner:run-backup-tests" <<< $labels ; then
100
+ export GOOGLE_SPANNER_RUN_BACKUP_TESTS=true
101
+ fi
102
+
96
103
fi
97
104
98
105
if [ " ${TEST_DIRECTORIES} " = " " ]; then
You can’t perform that action at this time.
0 commit comments