summaryrefslogtreecommitdiff
path: root/runner/testdata
diff options
context:
space:
mode:
authorPetri Latvala <petri.latvala@intel.com>2020-01-14 11:17:44 +0200
committerPetri Latvala <petri.latvala@intel.com>2020-01-16 13:37:18 +0200
commitc7b6d25226524a9a7831b0b318928dcf8ae7f6bd (patch)
treecca4f4833300229ed2b5d8ea7b80f80bce0b1a17 /runner/testdata
parent8c5f709e4386f4cc9f6083121cf262062c72f4f8 (diff)
runner_tests: Test that dynamic subtest failure is handled correctly
See also: commit 0e6457f1bfe2 ("lib: Don't dump log buffer when dynamic subtest failure is inherited") This is quite an explicit top-to-bottom test that we don't get an incorrect warn result for an innocent dynamic subtest. It is tested here in runner_test instead of testing in lib/tests that the extra lines are not printed, because not printing the extra lines is an implementation detail that might change later. The issue is after all about test results parsed by igt_runner. v2: Squash adding the new mockup test binary to this commit Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'runner/testdata')
-rw-r--r--runner/testdata/dynamic.c12
-rw-r--r--runner/testdata/meson.build1
2 files changed, 13 insertions, 0 deletions
diff --git a/runner/testdata/dynamic.c b/runner/testdata/dynamic.c
new file mode 100644
index 00000000..8e5de7d9
--- /dev/null
+++ b/runner/testdata/dynamic.c
@@ -0,0 +1,12 @@
+#include "igt.h"
+
+igt_main
+{
+ igt_subtest_with_dynamic("dynamic-subtest") {
+ igt_dynamic("failing")
+ igt_assert(false);
+
+ igt_dynamic("passing")
+ ;
+ }
+}
diff --git a/runner/testdata/meson.build b/runner/testdata/meson.build
index 2456f82a..631ba5b9 100644
--- a/runner/testdata/meson.build
+++ b/runner/testdata/meson.build
@@ -2,6 +2,7 @@
testdata_progs = [ 'successtest',
'no-subtests',
'skippers',
+ 'dynamic',
]
testdata_executables = []