@@ -342,3 +342,13 @@ int odp_cunit_register(odp_suiteinfo_t testsuites[])
return 0;
}
+
+/*
+ * Parse command line options to extract options affectiong cunit_common.
+ * (hence also helpers options as cunit_common uses the helpers)
+ * Options private to the test calling cunit_common are not parsed here.
+ */
+int odp_cunit_parse_options(int argc, char *argv[])
+{
+ return odph_parse_options(argc, argv, NULL, NULL);
+}
@@ -73,6 +73,8 @@ typedef struct {
int numthrds; /**< no of pthreads to create */
} pthrd_arg;
+/* parse parameters that affect the behaviour of odp_cunit_common */
+int odp_cunit_parse_options(int argc, char *argv[]);
/* register suites to be run via odp_cunit_run() */
int odp_cunit_register(odp_suiteinfo_t testsuites[]);
/* update tests previously registered via odp_cunit_register() */
A function to parse the command line args is added. This function is meant to parse only arguments altering the behaviour of cunit_common (this includes the helpers args as cunit_common uses the helpers) As at this stage only helper args fall into that category, this function simply calls the helper parsing function. (parsing pure cunit_commons args might be added later here if needed) Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- test/validation/common/odp_cunit_common.c | 10 ++++++++++ test/validation/common/odp_cunit_common.h | 2 ++ 2 files changed, 12 insertions(+)