File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,10 +140,26 @@ for path in `find 'packages' \
140140 set -e
141141
142142 if [[ " ${package_modified} " -gt 0 || " $KOKORO_BUILD_ARTIFACTS_SUBDIR " == * " continuous" * ]]; then
143- # Call the function - its internal exports won't affect the next loop
144- run_package_test " $package_name " || RETVAL=$?
143+ PACKAGES_TO_TEST=" ${PACKAGES_TO_TEST} ${package_name} "
145144 else
146145 echo " No changes in ${package_name} and not a continuous build, skipping."
147146 fi
148147done
148+
149+ if [ -n " $PACKAGES_TO_TEST " ]; then
150+ mkdir -p .logs
151+ export -f run_package_test
152+ export system_test_script PROJECT_ROOT KOKORO_GFILE_DIR
153+
154+ echo " $PACKAGES_TO_TEST " | xargs -n 1 -P 8 -I {} bash -c ' run_package_test "{}" > ".logs/{}.log" 2>&1 || touch ".logs/{}.failed"'
155+
156+ for failed in .logs/* .failed; do
157+ if [ -f " $failed " ]; then
158+ echo " --- FAILED: ${failed% .failed} ---"
159+ cat " ${failed% .failed} .log"
160+ RETVAL=1
161+ fi
162+ done
163+ fi
164+
149165exit ${RETVAL}
You can’t perform that action at this time.
0 commit comments