[Piglit] [PATCH v2 4/5] framework: add command line switch to enable junit subtests

Dylan Baker dylan at pnwbakers.com
Tue Aug 23 00:03:51 UTC 2016


Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
Acked-by: Jose Fonseca <jfonseca at vmware.com> (v1)

v2: - reword the help message for the new switch.
---
 framework/programs/run.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/framework/programs/run.py b/framework/programs/run.py
index 7c8660c..f531b37 100644
--- a/framework/programs/run.py
+++ b/framework/programs/run.py
@@ -151,6 +151,11 @@ def _run_parser(input_):
                         type=str,
                         default="",
                         help="suffix string to append to each test name in junit")
+    parser.add_argument("--junit-subtests",
+                        action='store_true',
+                        help="Encode tests with subtets as testsuite elements. "
+                             "Some xUnit parsers do not handle nested "
+                             "testsuites, though it is allowed in the spec.")
     log_parser = parser.add_mutually_exclusive_group()
     log_parser.add_argument('-v', '--verbose',
                             action='store_const',
@@ -289,7 +294,8 @@ def run(input_):
 
     backend = backends.get_backend(args.backend)(
         args.results_path,
-        junit_suffix=args.junit_suffix)
+        junit_suffix=args.junit_suffix,
+        junit_subtests=args.junit_subtests)
     backend.initialize(_create_metadata(args, results.name))
 
     profile = framework.profile.merge_test_profiles(args.test_profile)
-- 
git-series 0.8.7


More information about the Piglit mailing list