add FreeBSD support
[dpdk.git] / app / test / commands.c
index 4b98018..118f70d 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without
 #include <netinet/in.h>
 #include <termios.h>
 #ifndef __linux__
+#ifndef __FreeBSD__
 #include <net/socket.h>
 #endif
+#endif
 #include <inttypes.h>
 #include <errno.h>
 #include <sys/queue.h>
@@ -160,6 +162,8 @@ static void cmd_autotest_parsed(void *parsed_result,
                ret |= test_ring_perf();
        if (all || !strcmp(res->autotest, "timer_autotest"))
                ret |= test_timer();
+       if (all || !strcmp(res->autotest, "timer_perf_autotest"))
+               ret |= test_timer_perf();
        if (all || !strcmp(res->autotest, "mempool_autotest"))
                ret |= test_mempool();
        if (all || !strcmp(res->autotest, "mempool_perf_autotest"))
@@ -176,12 +180,19 @@ static void cmd_autotest_parsed(void *parsed_result,
                ret |= test_meter();
        if (all || !strcmp(res->autotest, "kni_autotest"))
                ret |= test_kni();
-       if (all || !strcmp(res->autotest, "acl_autotest"))
-               ret |= test_pmac_acl();
        if (all || !strcmp(res->autotest, "power_autotest"))
                ret |= test_power();
        if (all || !strcmp(res->autotest, "common_autotest"))
                ret |= test_common();
+#ifdef RTE_LIBRTE_PMD_RING
+       if (all || !strcmp(res->autotest, "ring_pmd_autotest"))
+               ret |= test_pmd_ring();
+#endif /* RTE_LIBRTE_PMD_RING */
+
+#ifdef RTE_LIBRTE_ACL
+       if (all || !strcmp(res->autotest, "acl_autotest"))
+               ret |= test_acl();
+#endif /* RTE_LIBRTE_ACL */
 
        if (ret == 0)
                printf("Test OK\n");
@@ -213,7 +224,15 @@ cmdline_parse_token_string_t cmd_autotest_autotest =
                        "memcpy_perf_autotest#ring_perf_autotest#"
                        "red_autotest#meter_autotest#sched_autotest#"
                        "memcpy_perf_autotest#kni_autotest#"
-                       "pm_autotest#acl_autotest#power_autotest#"
+                       "pm_autotest#"
+#ifdef RTE_LIBRTE_ACL
+                       "acl_autotest#"
+#endif
+                       "power_autotest#"
+                       "timer_perf_autotest#"
+#ifdef RTE_LIBRTE_PMD_RING
+                       "ring_pmd_autotest#"
+#endif
                        "common_autotest#all_autotests");
 
 cmdline_parse_inst_t cmd_autotest = {