From 3cc9b2c4905c7ececa5f52d35fdc8b4c65fe641c Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 3 Nov 2016 17:18:05 +0100 Subject: [PATCH] check: Fix corrupted xml check files By making sure each different videoscale check instance gets logged into different output file --- tests/check/elements/videoscale.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/tests/check/elements/videoscale.c b/tests/check/elements/videoscale.c index c158061b01..3346647473 100644 --- a/tests/check/elements/videoscale.c +++ b/tests/check/elements/videoscale.c @@ -1069,4 +1069,23 @@ videoscale_suite (void) return s; } -GST_CHECK_MAIN (videoscale); +/* NOTE: + * We need to do the filename dance below in order to avoid having + * multiple parallel tests (identified by VSCALE_TEST_GROUP) going + * to the same output xml file (when using GST_CHECK_XML) */ +int +main (int argc, char **argv) +{ + Suite *s; + + gst_check_init (&argc, &argv); + s = videoscale_suite (); +#ifndef VSCALE_TEST_GROUP +#define FULL_RUN_NAME __FILE__ +#else +#define STR_HELPER(x) #x +#define STR(x) STR_HELPER(x) +#define FULL_RUN_NAME __FILE__ STR(VSCALE_TEST_GROUP)".c" +#endif + return gst_check_run_suite (s, "videoscale", FULL_RUN_NAME); +}