You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce the new functions: run_go_tests and
run_go_test_expanding_packages, which implements (without Shellcheck
exceptions) the old behavior from go_test, simplifying the arguments
received.
Replaced the three possible values mode with:
1. keep_going: By using the KEEP_GOING_TESTS environment variable. This
mode expanded the relative modules; it can be run by using
run_go_tests_expanding_packages.
2. parallel: It worked without expanding the relative modules with the
absolute modules. Therefore, this mode can be run directly using
run_go_tests.
3. fail_fast: By adding an argument "-failfast", and not setting the
KEEP_GOING_TESTS environment variable.
The argument flags_for_package_func can be replaced by regular arguments
passed to the function.
These two changes simplify the complexity of the go test wrapper
function and allow further customization in the callers.
The JUnit XML generation works the same way, by reading the
JUNIT_REPORT_DIR or ARTIFACTS environment variable. It generates the
same reports.
Temporarily introduce the get_junit_filename_prefix function, as a
replacement for junitFilenamePrefix. The latter will be removed once all
test targets are using the new functions.
Finally, update the unit tests function to make use of the new
functions, and allow running the tests by using the workspace (i.e.,
there's no need to change directories anymore).
Signed-off-by: Ivan Valdes <ivan@vald.es>
if! run env ETCD_VERIFY="${ETCD_VERIFY}""${cmd[@]}"| tee ${junit_filename_prefix:+"${junit_filename_prefix}.stdout"}| grep --binary-files=text "${go_test_grep_pattern}";then
0 commit comments