From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <bricha3@ecsmtp.ir.intel.com>
Received: from mga09.intel.com (mga09.intel.com [134.134.136.24])
 by dpdk.org (Postfix) with ESMTP id 161975A0A
 for <dev@dpdk.org>; Fri,  6 May 2016 14:51:42 +0200 (CEST)
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by orsmga102.jf.intel.com with ESMTP; 06 May 2016 05:51:43 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.24,587,1455004800"; d="scan'208";a="947580446"
Received: from irvmail001.ir.intel.com ([163.33.26.43])
 by orsmga001.jf.intel.com with ESMTP; 06 May 2016 05:51:41 -0700
Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com
 [10.237.217.45])
 by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id
 u46Cpeq1016226; Fri, 6 May 2016 13:51:40 +0100
Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1])
 by sivswdev01.ir.intel.com with ESMTP id u46Cpev8024435;
 Fri, 6 May 2016 13:51:40 +0100
Received: (from bricha3@localhost)
 by sivswdev01.ir.intel.com with  id u46CpeSJ024431;
 Fri, 6 May 2016 13:51:40 +0100
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri,  6 May 2016 13:51:29 +0100
Message-Id: <1462539092-24389-2-git-send-email-bruce.richardson@intel.com>
X-Mailer: git-send-email 1.7.4.1
In-Reply-To: <1462539092-24389-1-git-send-email-bruce.richardson@intel.com>
References: <1462539092-24389-1-git-send-email-bruce.richardson@intel.com>
Subject: [dpdk-dev] [RFC PATCH 1/4] test: add lpm routes as a linked resource
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 06 May 2016 12:51:43 -0000

Since we now have the ability to store resource data directly inside
the test binary, take the test_lpm_routes.h header file and make it a
test resource. Later commits will then switch the test C file over to use
this rather than including it directly.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/Makefile   | 1 +
 app/test/test_lpm.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/app/test/Makefile b/app/test/Makefile
index 90acd63..94ba990 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -125,6 +125,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_perf.c
 SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_functions.c
 SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_scaling.c
 
+$(eval $(call resource,test_lpm_data,test_lpm_routes.h))
 SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm.c
 SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm6.c
 
diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c
index 40fbbc6..d2aa5de 100644
--- a/app/test/test_lpm.c
+++ b/app/test/test_lpm.c
@@ -46,11 +46,14 @@
 #include <time.h>
 
 #include "test.h"
+#include "resource.h"
 
 #include "rte_lpm.h"
 #include "test_lpm_routes.h"
 #include "test_xmmt_ops.h"
 
+REGISTER_LINKED_RESOURCE(test_lpm_data)
+
 #define TEST_LPM_ASSERT(cond) do {                                            \
 	if (!(cond)) {                                                        \
 		printf("Error at line %d: \n", __LINE__);                     \
-- 
2.5.5