From c7a0b451a9680d8ff1ea13b748f8295937d41399 Mon Sep 17 00:00:00 2001 From: Petri Latvala Date: Thu, 30 Aug 2018 15:51:39 +0300 Subject: runner: Introduce --piglit-style-dmesg With the flag, dmesg handling is done exactly as piglit does it: Level 5 (info) and higher dmesg lines, if they match a regexp, cause test result to change to dmesg-*. The default is false (use new method). Signed-off-by: Petri Latvala Cc: Arkadiusz Hiler Cc: Martin Peres Acked-by: Martin Peres --- runner/runner_tests.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'runner/runner_tests.c') diff --git a/runner/runner_tests.c b/runner/runner_tests.c index 942ba26b..1a95a75a 100644 --- a/runner/runner_tests.c +++ b/runner/runner_tests.c @@ -152,6 +152,7 @@ static void assert_settings_equal(struct settings *one, struct settings *two) igt_assert_eq(one->use_watchdog, two->use_watchdog); igt_assert_eqstr(one->test_root, two->test_root); igt_assert_eqstr(one->results_path, two->results_path); + igt_assert_eq(one->piglit_style_dmesg, two->piglit_style_dmesg); } static void assert_job_list_equal(struct job_list *one, struct job_list *two) @@ -219,6 +220,7 @@ igt_main igt_assert(!settings.use_watchdog); igt_assert(strstr(settings.test_root, "test-root-dir") != NULL); igt_assert(strstr(settings.results_path, "path-to-results") != NULL); + igt_assert(!settings.piglit_style_dmesg); } igt_subtest_group { @@ -332,6 +334,7 @@ igt_main igt_assert(!settings.use_watchdog); igt_assert(strstr(settings.test_root, testdatadir) != NULL); igt_assert(strstr(settings.results_path, "path-to-results") != NULL); + igt_assert(!settings.piglit_style_dmesg); } igt_fixture { @@ -355,6 +358,7 @@ igt_main "--multiple-mode", "--inactivity-timeout", "27", "--use-watchdog", + "--piglit-style-dmesg", "test-root-dir", "path-to-results", }; @@ -379,6 +383,7 @@ igt_main igt_assert(settings.use_watchdog); igt_assert(strstr(settings.test_root, "test-root-dir") != NULL); igt_assert(strstr(settings.results_path, "path-to-results") != NULL); + igt_assert(settings.piglit_style_dmesg); } igt_subtest("invalid-option") { @@ -578,6 +583,22 @@ igt_main igt_subtest("settings-serialize") { char *argv[] = { "runner", + "-n", "foo", + "--abort-on-monitored-error", + "--test-list", "path-to-test-list", + "--ignore-missing", + "--dry-run", + "-t", "pattern1", + "-t", "pattern2", + "-x", "xpattern1", + "-x", "xpattern2", + "-s", + "-l", "verbose", + "--overwrite", + "--multiple-mode", + "--inactivity-timeout", "27", + "--use-watchdog", + "--piglit-style-dmesg", testdatadir, dirname, }; -- cgit v1.2.3