Skip to content

Commit b267d9c

Browse files
committed
tests: enable system tests
1 parent 6cd6a11 commit b267d9c

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.kokoro/system.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ packages_with_system_tests=(
5353
"google-cloud-error-reporting"
5454
"google-cloud-firestore"
5555
"google-cloud-logging"
56+
"google-cloud-pubsub"
5657
"google-cloud-testutils"
5758
)
5859

@@ -62,9 +63,17 @@ packages_with_system_tests_pattern="${packages_with_system_tests_pattern:1}" # R
6263

6364

6465
# Run system tests for each package with directory packages/*/tests/system
65-
for dir in `find 'packages' -type d -wholename 'packages/*/tests/system'`; do
66-
# Get the path to the package by removing the suffix /tests/system
67-
package=$(echo $dir | cut -f -2 -d '/')
66+
for path in `find 'packages' \
67+
\( -type d -wholename 'packages/*/tests/system' \) -o \
68+
\( -type d -wholename 'packages/*/system_tests' \) -o \
69+
\( -type f -wholename 'packages/*/tests/system.py' \)`; do
70+
71+
# Extract the package name and define the relative package path
72+
# 1. Remove the 'packages/' prefix
73+
# 2. Remove everything after the first '/'
74+
package_name=${path#packages/}
75+
package_name=${package_name%%/*}
76+
package_path="packages/${package_name}"
6877

6978
# Run system tests on every change to these libraries
7079
if [[ $package == @($packages_with_system_tests_pattern) ]]; then

0 commit comments

Comments
 (0)