File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,4 +32,17 @@ NOX_FILE_ARG=""
3232
3333[[ -z " ${NOX_FILE} " ]] || NOX_FILE_ARG=" -f ${NOX_FILE} "
3434
35- python3 -m nox ${NOX_SESSION_ARG} $NOX_FILE_ARG
35+ python3 -m pip install uv
36+ for attempt in 1 2 3; do
37+ echo " Execution attempt $attempt of 3..."
38+ if uvx --with ' nox[uv]' nox ${NOX_SESSION_ARG} $NOX_FILE_ARG ; then
39+ echo " Tests passed successfully!"
40+ exit 0
41+ fi
42+
43+ echo " Tests failed. Backing off for 15 seconds..."
44+ sleep 15
45+ done
46+
47+ echo " Tests failed after 3 attempts. Hard failure."
48+ exit 1
Original file line number Diff line number Diff line change @@ -115,6 +115,8 @@ system_test_script="${PROJECT_ROOT}/.kokoro/system-single.sh"
115115packages_with_system_tests_pattern=$( printf " |*%s*" " ${packages_with_system_tests[@]} " )
116116packages_with_system_tests_pattern=" ${packages_with_system_tests_pattern: 1} " # Remove the leading pipe
117117
118+ declare -A pids
119+
118120# Run system tests for each package with directory packages/*/tests/system
119121for path in ` find ' packages' \
120122 \( -type d -wholename ' packages/*/tests/system' \) -o \
@@ -140,10 +142,23 @@ for path in `find 'packages' \
140142 set -e
141143
142144 if [[ " ${package_modified} " -gt 0 ]]; then
143- # Call the function - its internal exports won't affect the next loop
144- run_package_test " $package_name " || RETVAL=$?
145+ echo " Dispatching ${package_name} in the background..."
146+ run_package_test " $package_name " &
147+ pids[" $package_name " ]=$!
145148 else
146149 echo " No changes in ${package_name} , skipping."
147150 fi
148151done
149- exit ${RETVAL}
152+
153+ echo " ============================================================"
154+ echo " Waiting for all concurrent system tests to complete..."
155+ echo " ============================================================"
156+
157+ for package in " ${! pids[@]} " ; do
158+ wait ${pids[$package]} || {
159+ echo " ERROR: System tests failed for $package "
160+ RETVAL=1
161+ }
162+ done
163+
164+ exit ${RETVAL}
You can’t perform that action at this time.
0 commit comments