summaryrefslogtreecommitdiff
path: root/runner/runner_tests.c
diff options
context:
space:
mode:
authorPetri Latvala <petri.latvala@intel.com>2018-08-30 15:51:39 +0300
committerPetri Latvala <petri.latvala@intel.com>2018-08-31 13:18:43 +0300
commitc7a0b451a9680d8ff1ea13b748f8295937d41399 (patch)
tree58e3765a74e8d27673393cbd80f84b48c3e66b1a /runner/runner_tests.c
parentf2e4bbdb072b80c1fba854aabd1e15565a42eb76 (diff)
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 <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Martin Peres <martin.peres@linux.intel.com> Acked-by: Martin Peres <martin.peres@linux.intel.com>
Diffstat (limited to 'runner/runner_tests.c')
-rw-r--r--runner/runner_tests.c21
1 files changed, 21 insertions, 0 deletions
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,
};