mirror of
https://github.com/containers/podman.git
synced 2025-06-21 17:38:12 +08:00
logformatter: run on system tests & bindings
(that got accidentally dropped in the new Cirrus makeover). Note that 'dotest' does not actually 'do tests', it's only used for a small subset of tests. Also, make logformatter work better in the new Cirrus setup. Remove duplicate test/subtest, remove no-longer-used SPECIALMODE, and make the Cirrus build/task display a little cleaner. Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
@ -517,25 +517,20 @@ END_SYNOPSIS
|
|||||||
}
|
}
|
||||||
|
|
||||||
# eg "test fedora", "special_testing_rootless"
|
# eg "test fedora", "special_testing_rootless"
|
||||||
|
# WARNING: As of 2020-10-05, $CIRRUS_TASK_NAME reflects the same
|
||||||
|
# descriptive content as our $subtest_name argument (confirm via
|
||||||
|
# cross-checking runner.sh:logformatter() vs cirrus.yml:&std_name_fmt).
|
||||||
|
# If this ever becomes untrue, just add _tr("Subtest", $subtest_name).
|
||||||
my $test_name = _env_replace("{CIRRUS_TASK_NAME}");
|
my $test_name = _env_replace("{CIRRUS_TASK_NAME}");
|
||||||
if (my $rcli = $ENV{RCLI}) {
|
# (Special-case cleanup: Cirrus\ quotes\ spaces; remove for readability).
|
||||||
$test_name .= " [remote]" if $rcli eq 'true';
|
$test_name =~ s/\\\s+/ /g;
|
||||||
}
|
|
||||||
else {
|
|
||||||
$test_name .= " [no RCLI; cannot determine remote/local]";
|
|
||||||
}
|
|
||||||
$s .= _tr("Test name", $test_name);
|
$s .= _tr("Test name", $test_name);
|
||||||
|
|
||||||
# Subtest, e.g. system_test
|
|
||||||
$s .= _tr("Subtest", $subtest_name);
|
|
||||||
|
|
||||||
# Link to further Cirrus results, e.g. other runs.
|
# Link to further Cirrus results, e.g. other runs.
|
||||||
# Build is mostly boring, it's usually TASK that we want to see.
|
# Build is mostly boring, it's usually TASK that we want to see.
|
||||||
$s .= _tr("Cirrus Build ID", "<small>" . _a("{CIRRUS_BUILD_ID}", "https://cirrus-ci.com/build/{CIRRUS_BUILD_ID}") . "</small>");
|
$s .= _tr("Cirrus", sprintf("<small>Build %s</small> / <b>Task %s</b>",
|
||||||
$s .= _tr("Cirrus <b>Task</b> ID", _a("{CIRRUS_TASK_ID}", "https://cirrus-ci.com/task/{CIRRUS_TASK_ID}"));
|
_a("{CIRRUS_BUILD_ID}", "https://cirrus-ci.com/build/{CIRRUS_BUILD_ID}"),
|
||||||
|
_a("{CIRRUS_TASK_ID}", "https://cirrus-ci.com/task/{CIRRUS_TASK_ID}")));
|
||||||
# "none", "rootless"
|
|
||||||
$s .= _tr("Special mode", _env_replace("{SPECIALMODE}"));
|
|
||||||
|
|
||||||
$s .= "</table>\n";
|
$s .= "</table>\n";
|
||||||
return $s;
|
return $s;
|
||||||
|
@ -102,7 +102,7 @@ altbuild() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
integration_outputfilter() {
|
logformatter() {
|
||||||
# Use similar format as human-friendly task name from .cirrus.yml
|
# Use similar format as human-friendly task name from .cirrus.yml
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
output_name="$TEST_FLAVOR-$PODBIN_NAME-$DISTRO_NV-$PRIV_NAME-$TEST_ENVIRON"
|
output_name="$TEST_FLAVOR-$PODBIN_NAME-$DISTRO_NV-$PRIV_NAME-$TEST_ENVIRON"
|
||||||
@ -134,10 +134,11 @@ dotest() {
|
|||||||
# does not return
|
# does not return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
output_filter="cat" # no filter
|
# 'logformatter' script makes test logs readable; only works for some tests
|
||||||
if [[ "$testsuite" == "integration" ]]; then
|
case "$testsuite" in
|
||||||
output_filter=integration_outputfilter
|
integration|system) output_filter=logformatter ;;
|
||||||
fi
|
*) output_filter="cat" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# containers/automation sets this to 0 for it's dbg() function
|
# containers/automation sets this to 0 for it's dbg() function
|
||||||
# but the e2e integration tests are also sensitive to it.
|
# but the e2e integration tests are also sensitive to it.
|
||||||
@ -210,7 +211,8 @@ case "$TEST_FLAVOR" in
|
|||||||
bindings)
|
bindings)
|
||||||
# shellcheck disable=SC2155
|
# shellcheck disable=SC2155
|
||||||
export PATH=$PATH:$GOSRC/hack
|
export PATH=$PATH:$GOSRC/hack
|
||||||
cd pkg/bindings/test && ginkgo -trace -noColor -debug -r
|
# Subshell needed for .cirrus.yml to find logformatter output in cwd
|
||||||
|
(cd pkg/bindings/test && ginkgo -trace -noColor -debug -r) |& logformatter
|
||||||
;;
|
;;
|
||||||
endpoint)
|
endpoint)
|
||||||
make test-binaries
|
make test-binaries
|
||||||
|
Reference in New Issue
Block a user