ktest: Add TEST_NAME option
Searching through several tests, it gets confusing which test result is for which test. By adding the TEST_NAME option, the user can tell which test result belongs to which test. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
committed by
Steven Rostedt
parent
30f75da5ff
commit
9064af5206
@@ -101,6 +101,7 @@ my $sleep_time;
|
|||||||
my $bisect_sleep_time;
|
my $bisect_sleep_time;
|
||||||
my $patchcheck_sleep_time;
|
my $patchcheck_sleep_time;
|
||||||
my $store_failures;
|
my $store_failures;
|
||||||
|
my $test_name;
|
||||||
my $timeout;
|
my $timeout;
|
||||||
my $booted_timeout;
|
my $booted_timeout;
|
||||||
my $detect_triplefault;
|
my $detect_triplefault;
|
||||||
@@ -620,9 +621,15 @@ sub fail {
|
|||||||
end_monitor;
|
end_monitor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $name = "";
|
||||||
|
|
||||||
|
if (defined($test_name)) {
|
||||||
|
$name = " ($test_name)";
|
||||||
|
}
|
||||||
|
|
||||||
doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
|
doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
|
||||||
doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
|
doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
|
||||||
doprint "KTEST RESULT: TEST $i Failed: ", @_, "\n";
|
doprint "KTEST RESULT: TEST $i$name Failed: ", @_, "\n";
|
||||||
doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
|
doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
|
||||||
doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
|
doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
|
||||||
|
|
||||||
@@ -1130,9 +1137,15 @@ sub success {
|
|||||||
|
|
||||||
$successes++;
|
$successes++;
|
||||||
|
|
||||||
|
my $name = "";
|
||||||
|
|
||||||
|
if (defined($test_name)) {
|
||||||
|
$name = " ($test_name)";
|
||||||
|
}
|
||||||
|
|
||||||
doprint "\n\n*******************************************\n";
|
doprint "\n\n*******************************************\n";
|
||||||
doprint "*******************************************\n";
|
doprint "*******************************************\n";
|
||||||
doprint "KTEST RESULT: TEST $i SUCCESS!!!! **\n";
|
doprint "KTEST RESULT: TEST $i$name SUCCESS!!!! **\n";
|
||||||
doprint "*******************************************\n";
|
doprint "*******************************************\n";
|
||||||
doprint "*******************************************\n";
|
doprint "*******************************************\n";
|
||||||
|
|
||||||
@@ -2181,6 +2194,7 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) {
|
|||||||
$bisect_skip = set_test_option("BISECT_SKIP", $i);
|
$bisect_skip = set_test_option("BISECT_SKIP", $i);
|
||||||
$config_bisect_good = set_test_option("CONFIG_BISECT_GOOD", $i);
|
$config_bisect_good = set_test_option("CONFIG_BISECT_GOOD", $i);
|
||||||
$store_failures = set_test_option("STORE_FAILURES", $i);
|
$store_failures = set_test_option("STORE_FAILURES", $i);
|
||||||
|
$test_name = set_test_option("TEST_NAME", $i);
|
||||||
$timeout = set_test_option("TIMEOUT", $i);
|
$timeout = set_test_option("TIMEOUT", $i);
|
||||||
$booted_timeout = set_test_option("BOOTED_TIMEOUT", $i);
|
$booted_timeout = set_test_option("BOOTED_TIMEOUT", $i);
|
||||||
$console = set_test_option("CONSOLE", $i);
|
$console = set_test_option("CONSOLE", $i);
|
||||||
|
@@ -545,6 +545,12 @@
|
|||||||
# all preceding tests until a new CHECKOUT is set.
|
# all preceding tests until a new CHECKOUT is set.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
# TEST_NAME = name
|
||||||
|
#
|
||||||
|
# If you want the test to have a name that is displayed in
|
||||||
|
# the test result banner at the end of the test, then use this
|
||||||
|
# option. This is useful to search for the RESULT keyword and
|
||||||
|
# not have to translate a test number to a test in the config.
|
||||||
#
|
#
|
||||||
# For TEST_TYPE = patchcheck
|
# For TEST_TYPE = patchcheck
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user