From patchwork Wed Jun 3 16:44:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 49487 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F2F2924612 for ; Wed, 3 Jun 2015 16:48:09 +0000 (UTC) Received: by lbbti3 with SMTP id ti3sf4175322lbb.1 for ; Wed, 03 Jun 2015 09:48:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=l6HAaamWE33LlLViG/PYm1CbK6ghx9PODJV9d35Gqb8=; b=jctzQ+D5u/Hj6loXNFOnfOjWY++Sub6jePSxHM2HKsO/771UZ/DxhppYY9bryCtUWc AxiAb3+N3n7qoHF4IyIGNiPmq8w088wCjTVNnYBHlaZ32BFrvPx6up16MUSTFrXvIaBM nHYT6ZHy8E/jsk8HBSybvWbHjMCndrmmI4/QTiije2boVE2hU9aOitlcrZW6PV6B9Xy/ eCJ1sPrpQvWFkaS+vb/CSXrP63i4DWbrDlxvCrTO09ZMaiUO7rWdh2yfR5z23q+ESMeW KgPLJJeu1IbaJWbU9BgVWhqlZ4O1pDBsSfBYsIT+6UIh/Qnvlnpd521LQDPAxx6fzvfJ djdg== X-Gm-Message-State: ALoCoQmK4gtVACqHuG5JYjd/eIJ7hv5SC97pc2sbkslBI4XqWnyRyDn0mvsB5P4NWgNG8zhp4p4T X-Received: by 10.152.203.233 with SMTP id kt9mr31466914lac.7.1433350088462; Wed, 03 Jun 2015 09:48:08 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.178.195 with SMTP id da3ls91702lac.43.gmail; Wed, 03 Jun 2015 09:48:08 -0700 (PDT) X-Received: by 10.112.72.132 with SMTP id d4mr32939871lbv.1.1433350088239; Wed, 03 Jun 2015 09:48:08 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id lm6si18482467lac.29.2015.06.03.09.48.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2015 09:48:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by laew7 with SMTP id w7so12897608lae.1 for ; Wed, 03 Jun 2015 09:48:08 -0700 (PDT) X-Received: by 10.112.150.167 with SMTP id uj7mr25351317lbb.112.1433350088109; Wed, 03 Jun 2015 09:48:08 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp4001594lbb; Wed, 3 Jun 2015 09:48:06 -0700 (PDT) X-Received: by 10.140.97.136 with SMTP id m8mr36843848qge.32.1433350086110; Wed, 03 Jun 2015 09:48:06 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u82si1157154qhd.11.2015.06.03.09.47.45; Wed, 03 Jun 2015 09:48:06 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id D2D2061F37; Wed, 3 Jun 2015 16:47:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id E822A61F97; Wed, 3 Jun 2015 16:46:18 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 3378B61F9C; Wed, 3 Jun 2015 16:46:10 +0000 (UTC) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) by lists.linaro.org (Postfix) with ESMTPS id 7B49261834 for ; Wed, 3 Jun 2015 16:45:07 +0000 (UTC) Received: by lbbuc2 with SMTP id uc2so11012964lbb.2 for ; Wed, 03 Jun 2015 09:45:06 -0700 (PDT) X-Received: by 10.112.16.227 with SMTP id j3mr32958182lbd.43.1433349906191; Wed, 03 Jun 2015 09:45:06 -0700 (PDT) Received: from erachmi-VirtualBox.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by mx.google.com with ESMTPSA id yq5sm5950159lab.32.2015.06.03.09.45.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Jun 2015 09:45:05 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Wed, 3 Jun 2015 18:44:45 +0200 Message-Id: <1433349890-2903-3-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433349890-2903-1-git-send-email-christophe.milard@linaro.org> References: <1433349890-2903-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv2 2/7] validation: own main in odp_pktio.c X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christophe.milard@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Christophe Milard --- test/Makefile.inc | 7 ++++++- test/validation/Makefile.am | 8 +++----- test/validation/odp_pktio.c | 15 +++++++++++++-- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/test/Makefile.inc b/test/Makefile.inc index e20a848..27b966f 100644 --- a/test/Makefile.inc +++ b/test/Makefile.inc @@ -1,7 +1,12 @@ include $(top_srcdir)/Makefile.inc include $(top_srcdir)/platform/@with_platform@/Makefile.inc LIB = $(top_builddir)/lib -LDADD = $(LIB)/libodp.la + +#in the following line, the libs using the symbols should come before +#the libs using them! The includer is given a chance to add things before libodp +#by setting PRE_LDADD before the inclusion. +LDADD = $(PRE_LDADD) $(LIB)/libodp.la + INCFLAGS = -I$(srcdir) \ -I$(top_srcdir)/test \ -I$(top_srcdir)/platform/@with_platform@/include \ diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am index 965f603..d4bbdb5 100644 --- a/test/validation/Makefile.am +++ b/test/validation/Makefile.am @@ -1,13 +1,9 @@ +PRE_LDADD = $(top_builddir)/test/validation/common/libcunit_common_as_main.a include $(top_srcdir)/test/Makefile.inc AM_CFLAGS += -I$(srcdir)/common AM_LDFLAGS += -static -#warning: in the following line, the libs using the symbols should come before -#the libs using them! -LDADD = $(top_builddir)/test/validation/common/libcunit_common_as_main.a \ - $(LIB)/libodp.la - TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform} TEST_DIR=${builddir} EXECUTABLES = odp_buffer \ @@ -62,6 +58,8 @@ dist_odp_shared_memory_SOURCES = odp_shared_memory.c dist_odp_synchronizers_SOURCES = odp_synchronizers.c dist_odp_time_SOURCES = odp_time.c dist_odp_timer_SOURCES = odp_timer.c +odp_pktio_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \ + $(LIB)/libodp.la dist_odp_pktio_SOURCES = odp_pktio.c dist_odp_packet_SOURCES = odp_packet.c dist_odp_pool_SOURCES = odp_pool.c diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c index 7c1a666..592136f 100644 --- a/test/validation/odp_pktio.c +++ b/test/validation/odp_pktio.c @@ -688,7 +688,7 @@ static int term_pktio_suite(void) return ret; } -CU_TestInfo pktio_tests[] = { +static CU_TestInfo pktio_tests[] = { {"pktio open", test_odp_pktio_open}, {"pktio lookup", test_odp_pktio_lookup}, {"pktio inq", test_odp_pktio_inq}, @@ -704,8 +704,19 @@ CU_TestInfo pktio_tests[] = { CU_TEST_INFO_NULL }; -CU_SuiteInfo odp_testsuites[] = { +static CU_SuiteInfo pktio_suites[] = { {"Packet I/O", init_pktio_suite, term_pktio_suite, NULL, NULL, pktio_tests}, CU_SUITE_INFO_NULL }; + +static int pktio_main(void) +{ + return odp_cunit_run(pktio_suites); +} + +/* the following main function will be separated when lib is created */ +int main(void) +{ + return pktio_main(); +}