New upstream version 17.11.1
[deb_dpdk.git] / test / test / test.c
index c561eb5..fe41d40 100644 (file)
@@ -50,7 +50,6 @@ extern cmdline_parse_ctx_t main_ctx[];
 #endif
 
 #include <rte_memory.h>
-#include <rte_memzone.h>
 #include <rte_eal.h>
 #include <rte_cycles.h>
 #include <rte_log.h>
@@ -87,11 +86,7 @@ do_recursive_call(void)
                        { "test_invalid_b_flag", no_action },
                        { "test_invalid_vdev_flag", no_action },
                        { "test_invalid_r_flag", no_action },
-#ifdef RTE_LIBRTE_XEN_DOM0
-                       { "test_dom0_misc_flags", no_action },
-#else
                        { "test_misc_flags", no_action },
-#endif
                        { "test_memory_flags", no_action },
                        { "test_file_prefix", no_action },
                        { "test_no_huge_flag", no_action },
@@ -167,8 +162,20 @@ unit_test_suite_runner(struct unit_test_suite *suite)
        }
 
        if (suite->setup)
-               if (suite->setup() != 0)
+               if (suite->setup() != 0) {
+                       /*
+                        * setup failed, so count all enabled tests and mark
+                        * them as failed
+                        */
+                       while (suite->unit_test_cases[total].testcase) {
+                               if (!suite->unit_test_cases[total].enabled)
+                                       skipped++;
+                               else
+                                       failed++;
+                               total++;
+                       }
                        goto suite_summary;
+               }
 
        printf(" + ------------------------------------------------------- +\n");