From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 33E37156 for ; Mon, 18 Nov 2013 23:30:17 +0100 (CET) Received: by mail-wg0-f43.google.com with SMTP id n12so6729374wgh.34 for ; Mon, 18 Nov 2013 14:31:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=aVRXqNz3sfSBoEjGMDf4ndhyykAGnVxkHLq2OY/wZxQ=; b=NpaEPg0efzWNSRnCr9UGgN9t9MojzsaswXxs/KhStaz7C8CMf2F6ymsX6qxqqPbyi3 9JjtSmxsHsiYELkj2MahAhyXrdROV7E+4j/P9r8eDl27cebl6dO5fOPopMbj6GF1fJeJ fullQmCwJ1r+4WN1UHHF4wspB/TN/8RGHkM2Uq8fbXte4zQLhk37D4iEfFK2/9qCSXZi NKgmMO/Bf9z0ASyR2BClNa2UMgvUHXqlh9LUB1/1MjBgRZ5x+1NK5Dahw18J+49qKXRt 3qjjTYdCnEXzJScfWElExO1Co5zyrAMuL2/4zsx6h5TukSSklwkIbQbe0KeAbKgveeqD tDug== X-Gm-Message-State: ALoCoQl+Wvs9FrJ0Fsoo1qJOEykT5XVUJDVL6LnGpRCMnEm5KulI2XSBNsL54TiBObhOwk8DsAzY X-Received: by 10.180.9.71 with SMTP id x7mr18426722wia.28.1384813874664; Mon, 18 Nov 2013 14:31:14 -0800 (PST) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id bs15sm28416908wib.10.2013.11.18.14.31.12 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 18 Nov 2013 14:31:14 -0800 (PST) Received: by 6wind.com (sSMTP sendmail emulation); Mon, 18 Nov 2013 23:31:11 +0100 From: Thomas Monjalon To: dev@dpdk.org Date: Mon, 18 Nov 2013 23:31:02 +0100 Message-Id: <1f669b1e0bc60a867e0188279cde03f4a64763c7.1384813681.git.thomas.monjalon@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 3/3] app/test: fix build without librte_cmdline X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Nov 2013 22:30:17 -0000 Some features are not available if LIBRTE_CMDLINE is disabled: - interactive commands - cmdline tests Remove also cmdline_parse includes which are not needed. Signed-off-by: Thomas Monjalon --- app/test/Makefile | 16 ++++++++-------- app/test/test.c | 8 +++++++- app/test/test.h | 4 ---- app/test/test_alarm.c | 2 -- app/test/test_atomic.c | 2 -- app/test/test_byteorder.c | 2 -- app/test/test_cmdline.c | 6 ++++-- app/test/test_common.c | 2 -- app/test/test_cpuflags.c | 1 - app/test/test_cycles.c | 2 -- app/test/test_debug.c | 2 -- app/test/test_eal_flags.c | 2 -- app/test/test_eal_fs.c | 2 -- app/test/test_errno.c | 2 -- app/test/test_func_reentrancy.c | 2 -- app/test/test_hash.c | 1 - app/test/test_hash_perf.c | 1 - app/test/test_interrupts.c | 2 -- app/test/test_kni.c | 2 -- app/test/test_logs.c | 2 -- app/test/test_lpm.c | 1 - app/test/test_lpm6.c | 1 - app/test/test_malloc.c | 2 -- app/test/test_mbuf.c | 2 -- app/test/test_memcpy.c | 1 - app/test/test_memcpy_perf.c | 1 - app/test/test_memory.c | 2 -- app/test/test_mempool.c | 2 -- app/test/test_mempool_perf.c | 2 -- app/test/test_memzone.c | 2 -- app/test/test_meter.c | 2 -- app/test/test_mp_secondary.c | 2 -- app/test/test_pci.c | 2 -- app/test/test_per_lcore.c | 2 -- app/test/test_pmac_acl.c | 2 -- app/test/test_power.c | 2 -- app/test/test_prefetch.c | 2 -- app/test/test_red.c | 1 - app/test/test_ring.c | 2 -- app/test/test_ring_perf.c | 2 -- app/test/test_rwlock.c | 2 -- app/test/test_sched.c | 2 -- app/test/test_spinlock.c | 2 -- app/test/test_string_fns.c | 2 -- app/test/test_tailq.c | 2 -- app/test/test_timer.c | 2 -- app/test/test_version.c | 2 -- 47 files changed, 19 insertions(+), 93 deletions(-) diff --git a/app/test/Makefile b/app/test/Makefile index d4bfd84..a5ca98e 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -39,7 +39,7 @@ APP = test # # all sources are stored in SRCS-y # -SRCS-$(CONFIG_RTE_APP_TEST) := commands.c +SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) := commands.c SRCS-$(CONFIG_RTE_APP_TEST) += test.c SRCS-$(CONFIG_RTE_APP_TEST) += test_pci.c SRCS-$(CONFIG_RTE_APP_TEST) += test_prefetch.c @@ -78,13 +78,13 @@ SRCS-$(CONFIG_RTE_APP_TEST) += test_version.c SRCS-$(CONFIG_RTE_APP_TEST) += test_eal_fs.c SRCS-$(CONFIG_RTE_APP_TEST) += test_func_reentrancy.c SRCS-$(CONFIG_RTE_APP_TEST) += test_cmdline.c -SRCS-$(CONFIG_RTE_APP_TEST) += test_cmdline_num.c -SRCS-$(CONFIG_RTE_APP_TEST) += test_cmdline_etheraddr.c -SRCS-$(CONFIG_RTE_APP_TEST) += test_cmdline_portlist.c -SRCS-$(CONFIG_RTE_APP_TEST) += test_cmdline_ipaddr.c -SRCS-$(CONFIG_RTE_APP_TEST) += test_cmdline_cirbuf.c -SRCS-$(CONFIG_RTE_APP_TEST) += test_cmdline_string.c -SRCS-$(CONFIG_RTE_APP_TEST) += test_cmdline_lib.c +SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_num.c +SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_etheraddr.c +SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_portlist.c +SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_ipaddr.c +SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_cirbuf.c +SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_string.c +SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_lib.c SRCS-$(CONFIG_RTE_APP_TEST) += test_red.c SRCS-$(CONFIG_RTE_APP_TEST) += test_sched.c SRCS-$(CONFIG_RTE_APP_TEST) += test_meter.c diff --git a/app/test/test.c b/app/test/test.c index 606fc55..73039b2 100644 --- a/app/test/test.c +++ b/app/test/test.c @@ -41,10 +41,13 @@ #include #include +#ifdef RTE_LIBRTE_CMDLINE #include #include #include #include +extern cmdline_parse_ctx_t main_ctx[]; +#endif #include #include @@ -102,7 +105,9 @@ do_recursive_call(void) int main(int argc, char **argv) { +#ifdef RTE_LIBRTE_CMDLINE struct cmdline *cl; +#endif int ret; ret = rte_eal_init(argc, argv); @@ -127,13 +132,14 @@ main(int argc, char **argv) "HPET is not enabled, using TSC as default timer\n"); - +#ifdef RTE_LIBRTE_CMDLINE cl = cmdline_stdin_new(main_ctx, "RTE>>"); if (cl == NULL) { return -1; } cmdline_interact(cl); cmdline_stdin_exit(cl); +#endif return 0; } diff --git a/app/test/test.h b/app/test/test.h index 1ce0c31..524e8e4 100644 --- a/app/test/test.h +++ b/app/test/test.h @@ -43,10 +43,6 @@ extern const char *prgname; -#include - -extern cmdline_parse_ctx_t main_ctx[]; - int main(int argc, char **argv); int test_pci(void); diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c index 0cfe36b..3dd1d96 100644 --- a/app/test/test_alarm.c +++ b/app/test/test_alarm.c @@ -34,8 +34,6 @@ #include #include -#include - #include #include #include diff --git a/app/test/test_atomic.c b/app/test/test_atomic.c index e479cb7..c0bbb36 100644 --- a/app/test/test_atomic.c +++ b/app/test/test_atomic.c @@ -36,8 +36,6 @@ #include #include -#include - #include #include #include diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c index 2a6ab96..025de8d 100644 --- a/app/test/test_byteorder.c +++ b/app/test/test_byteorder.c @@ -36,8 +36,6 @@ #include #include -#include - #include #include "test.h" diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c index d6de637..4d85a02 100644 --- a/app/test/test_cmdline.c +++ b/app/test/test_cmdline.c @@ -33,14 +33,13 @@ #include -#include - #include "test.h" #include "test_cmdline.h" int test_cmdline(void) { +#ifdef CONFIG_RTE_LIBRTE_CMDLINE printf("Testind parsing ethernet addresses...\n"); if (test_parse_etheraddr_valid() < 0) return -1; @@ -88,6 +87,9 @@ test_cmdline(void) printf("Testing library functions...\n"); if (test_cmdline_lib() < 0) return -1; +#else + printf("The cmdline library is not included in this build\n"); +#endif return 0; } diff --git a/app/test/test_common.c b/app/test/test_common.c index 1252fdd..071e29d 100644 --- a/app/test/test_common.c +++ b/app/test/test_common.c @@ -36,8 +36,6 @@ #include #include -#include - #include "test.h" #define MAX_NUM 1 << 20 diff --git a/app/test/test_cpuflags.c b/app/test/test_cpuflags.c index c2eaaf0..b5bbeeb 100644 --- a/app/test/test_cpuflags.c +++ b/app/test/test_cpuflags.c @@ -33,7 +33,6 @@ #include -#include #include #include #include diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c index 187b54e..b1a183f 100644 --- a/app/test/test_cycles.c +++ b/app/test/test_cycles.c @@ -34,8 +34,6 @@ #include #include -#include - #include #include diff --git a/app/test/test_debug.c b/app/test/test_debug.c index 0ebb7ab..b731806 100644 --- a/app/test/test_debug.c +++ b/app/test/test_debug.c @@ -36,8 +36,6 @@ #include #include -#include - #include #include #include diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index 8f33aa5..c70bcfa 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -32,8 +32,6 @@ */ #include -#include - #include "test.h" #ifndef RTE_EXEC_ENV_BAREMETAL diff --git a/app/test/test_eal_fs.c b/app/test/test_eal_fs.c index fb60351..c8805ac 100644 --- a/app/test/test_eal_fs.c +++ b/app/test/test_eal_fs.c @@ -31,8 +31,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include - #include "test.h" #ifndef RTE_EXEC_ENV_BAREMETAL #include diff --git a/app/test/test_errno.c b/app/test/test_errno.c index 5cb2e15..36df047 100644 --- a/app/test/test_errno.c +++ b/app/test/test_errno.c @@ -40,8 +40,6 @@ #include #include -#include - #include "test.h" int diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c index 15d4dae..8400ff0 100644 --- a/app/test/test_func_reentrancy.c +++ b/app/test/test_func_reentrancy.c @@ -70,8 +70,6 @@ #include -#include - #include "test.h" typedef int (*case_func_t)(void* arg); diff --git a/app/test/test_hash.c b/app/test/test_hash.c index bf8bdfb..1d562af 100644 --- a/app/test/test_hash.c +++ b/app/test/test_hash.c @@ -49,7 +49,6 @@ #include #include #include -#include #include "test.h" diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c index 0f7d421..fd8eee6 100644 --- a/app/test/test_hash_perf.c +++ b/app/test/test_hash_perf.c @@ -50,7 +50,6 @@ #include #include #include -#include #include "test.h" diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c index 31f3d26..0d5085c 100644 --- a/app/test/test_interrupts.c +++ b/app/test/test_interrupts.c @@ -35,8 +35,6 @@ #include #include -#include - #include #include #include diff --git a/app/test/test_kni.c b/app/test/test_kni.c index 5ed5045..5f48fad 100644 --- a/app/test/test_kni.c +++ b/app/test/test_kni.c @@ -37,8 +37,6 @@ #include #include -#include - #include "test.h" #ifdef RTE_LIBRTE_KNI diff --git a/app/test/test_logs.c b/app/test/test_logs.c index 379579d..ed8ac0f 100644 --- a/app/test/test_logs.c +++ b/app/test/test_logs.c @@ -36,8 +36,6 @@ #include #include -#include - #include #include #include diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c index a62e981..30b04ec 100644 --- a/app/test/test_lpm.c +++ b/app/test/test_lpm.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include diff --git a/app/test/test_lpm6.c b/app/test/test_lpm6.c index 8e21e75..dd8cee9 100644 --- a/app/test/test_lpm6.c +++ b/app/test/test_lpm6.c @@ -36,7 +36,6 @@ #include #include #include -#include #include diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c index 98fe02a..59696b1 100644 --- a/app/test/test_malloc.c +++ b/app/test/test_malloc.c @@ -39,8 +39,6 @@ #include #include -#include - #include #include #include diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 936814c..4ce1713 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -60,8 +60,6 @@ #include #include -#include - #include "test.h" #define MBUF_SIZE 2048 diff --git a/app/test/test_memcpy.c b/app/test/test_memcpy.c index b458ad9..275db4d 100644 --- a/app/test/test_memcpy.c +++ b/app/test/test_memcpy.c @@ -37,7 +37,6 @@ #include #include -#include #include #include #include diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c index 1aa9f0a..f236ad2 100644 --- a/app/test/test_memcpy_perf.c +++ b/app/test/test_memcpy_perf.c @@ -37,7 +37,6 @@ #include #include -#include #include #include #include diff --git a/app/test/test_memory.c b/app/test/test_memory.c index 30e59cd..ffd6ef9 100644 --- a/app/test/test_memory.c +++ b/app/test/test_memory.c @@ -34,8 +34,6 @@ #include #include -#include - #include #include diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c index da8dc5c..ac378f3 100644 --- a/app/test/test_mempool.c +++ b/app/test/test_mempool.c @@ -58,8 +58,6 @@ #include #include -#include - #include "test.h" /* diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c index 96b47cc..f0704de 100644 --- a/app/test/test_mempool_perf.c +++ b/app/test/test_mempool_perf.c @@ -58,8 +58,6 @@ #include #include -#include - #include "test.h" /* diff --git a/app/test/test_memzone.c b/app/test/test_memzone.c index 294c0db..ce04340 100644 --- a/app/test/test_memzone.c +++ b/app/test/test_memzone.c @@ -36,8 +36,6 @@ #include #include -#include - #include #include #include diff --git a/app/test/test_meter.c b/app/test/test_meter.c index 688978d..bbdf4e0 100644 --- a/app/test/test_meter.c +++ b/app/test/test_meter.c @@ -37,8 +37,6 @@ #include #include -#include - #include "test.h" #ifdef RTE_LIBRTE_METER diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c index 19af32c..b1365fc 100644 --- a/app/test/test_mp_secondary.c +++ b/app/test/test_mp_secondary.c @@ -33,8 +33,6 @@ #include -#include - #include "test.h" #ifndef RTE_EXEC_ENV_BAREMETAL diff --git a/app/test/test_pci.c b/app/test/test_pci.c index 7cbbfdd..af1a7b3 100644 --- a/app/test/test_pci.c +++ b/app/test/test_pci.c @@ -36,8 +36,6 @@ #include #include -#include - #include #include diff --git a/app/test/test_per_lcore.c b/app/test/test_per_lcore.c index 2bd56a1..a9e4a21 100644 --- a/app/test/test_per_lcore.c +++ b/app/test/test_per_lcore.c @@ -35,8 +35,6 @@ #include #include -#include - #include #include #include diff --git a/app/test/test_pmac_acl.c b/app/test/test_pmac_acl.c index cc2df09..358e01c 100644 --- a/app/test/test_pmac_acl.c +++ b/app/test/test_pmac_acl.c @@ -34,8 +34,6 @@ #include #include -#include - #include #include diff --git a/app/test/test_power.c b/app/test/test_power.c index 1d0169a..b11a562 100644 --- a/app/test/test_power.c +++ b/app/test/test_power.c @@ -37,8 +37,6 @@ #include #include -#include - #include "test.h" #ifdef RTE_LIBRTE_POWER diff --git a/app/test/test_prefetch.c b/app/test/test_prefetch.c index b10ac7b..813b9a1 100644 --- a/app/test/test_prefetch.c +++ b/app/test/test_prefetch.c @@ -34,8 +34,6 @@ #include #include -#include - #include #include "test.h" diff --git a/app/test/test_red.c b/app/test/test_red.c index 526bfb4..3300e69 100644 --- a/app/test/test_red.c +++ b/app/test/test_red.c @@ -40,7 +40,6 @@ #include #include #include -#include #include "test.h" diff --git a/app/test/test_ring.c b/app/test/test_ring.c index fc50add..a96c3bf 100644 --- a/app/test/test_ring.c +++ b/app/test/test_ring.c @@ -59,8 +59,6 @@ #include #include -#include - #include "test.h" /* diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c index 5c369e9..e35ee88 100644 --- a/app/test/test_ring_perf.c +++ b/app/test/test_ring_perf.c @@ -38,8 +38,6 @@ #include #include -#include - #include "test.h" /* diff --git a/app/test/test_rwlock.c b/app/test/test_rwlock.c index 48b0c59..dd041a7 100644 --- a/app/test/test_rwlock.c +++ b/app/test/test_rwlock.c @@ -36,8 +36,6 @@ #include #include -#include - #include #include #include diff --git a/app/test/test_sched.c b/app/test/test_sched.c index e87a1ca..99da8ed 100644 --- a/app/test/test_sched.c +++ b/app/test/test_sched.c @@ -37,8 +37,6 @@ #include #include -#include - #include "test.h" #if defined(RTE_LIBRTE_SCHED) && defined(RTE_ARCH_X86_64) diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c index 829be8d..c623993 100644 --- a/app/test/test_spinlock.c +++ b/app/test/test_spinlock.c @@ -38,8 +38,6 @@ #include #include -#include - #include #include #include diff --git a/app/test/test_string_fns.c b/app/test/test_string_fns.c index 258ae75..e4389a7 100644 --- a/app/test/test_string_fns.c +++ b/app/test/test_string_fns.c @@ -39,8 +39,6 @@ #include -#include - #include "test.h" #define LOG(...) do {\ diff --git a/app/test/test_tailq.c b/app/test/test_tailq.c index 1cc4c29..c434be7 100644 --- a/app/test/test_tailq.c +++ b/app/test/test_tailq.c @@ -37,8 +37,6 @@ #include #include -#include - #include #include #include diff --git a/app/test/test_timer.c b/app/test/test_timer.c index 026b576..28861fa 100644 --- a/app/test/test_timer.c +++ b/app/test/test_timer.c @@ -121,8 +121,6 @@ #include #include -#include - #include #include #include diff --git a/app/test/test_version.c b/app/test/test_version.c index d078dae..abf5b91 100644 --- a/app/test/test_version.c +++ b/app/test/test_version.c @@ -35,8 +35,6 @@ #include #include -#include - #include #include -- 1.7.10.4