Skip to content

Commit 2aed76c

Browse files
committed
tests: run system test on every change
1 parent 00111ff commit 2aed76c

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.kokoro/system.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,25 @@ system_test_script="${PROJECT_ROOT}/.kokoro/system-single.sh"
4141
# This is needed in order for `git diff` to succeed
4242
git config --global --add safe.directory $(realpath .)
4343

44+
packages_with_system_tests=(
45+
"google-cloud-bigquery-storage"
46+
"google-cloud-dns"
47+
"google-cloud-error-reporting"
48+
"google-cloud-testutils"
49+
)
50+
51+
# Join array elements with | for the pattern match
52+
packages_with_system_tests_pattern=$(printf "|*%s*" "${packages_with_system_tests[@]}")
53+
packages_with_system_tests_pattern="${packages_with_system_tests_pattern:1}" # Remove the leading pipe
54+
55+
4456
# Run system tests for each package with directory packages/*/tests/system
4557
for dir in `find 'packages' -type d -wholename 'packages/*/tests/system'`; do
4658
# Get the path to the package by removing the suffix /tests/system
4759
package=$(echo $dir | cut -f -2 -d '/')
4860

4961
# Run system tests on every change to these libraries
50-
if [[ $package = @(*google-cloud-bigquery-storage*|*google-cloud-dns*|*google-cloud-testutils*) ]]; then
62+
if [[ $package == @($packages_with_system_tests_pattern) ]]; then
5163
files_to_check=${package}
5264
else
5365
files_to_check=${package}/CHANGELOG.md

0 commit comments

Comments
 (0)