From patchwork Mon May 11 10:48:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 48236 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4B78A21550 for ; Mon, 11 May 2015 10:50:37 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf37589790lbb.0 for ; Mon, 11 May 2015 03:50:36 -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=fCvO3fwTf6/DpDhmtM8a9OLQjRcx4Hp/j//8xlaWay4=; b=g+c0zQIdUOA0pksHOErYb9SLkiQzDXoPBUy1GDtiON1s9jPT18N3Of3KL2qiG87LEC tr9bCOYZdXbiCM43CnhXHkD/889ojZKFJPIEGOAwtfF/9Vn1JuPnqtDB9hxZhrmQKYYT 1Xxo1NGH0xvLSSsvSW81n0T2fPc3k8c3p4dIYiYVIzsY5aibgB5FUwiXEoEhI3PpQv3v umEoTmlWDsyLlW0Y+HCCiTmK6TOjZKyT2ePcFbOFdJ04zONV57ZE+HjJ73aJutgs3vAO S0cRlRsENlGuTFeXYPGIe84xtu/w//I1bS42ulpqVruw3C28wFHlBGjq7vx9fNLSxlwm Un/A== X-Gm-Message-State: ALoCoQmgMcYvAZzCVy2gG5cY7bh3JSz1Aw2i695MJ6dpyPeySzDDdwk8oZ2w1hBHye3OINswZMp5 X-Received: by 10.180.74.197 with SMTP id w5mr7606410wiv.5.1431341436248; Mon, 11 May 2015 03:50:36 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.1 with SMTP id n1ls519587laa.87.gmail; Mon, 11 May 2015 03:50:36 -0700 (PDT) X-Received: by 10.152.22.34 with SMTP id a2mr7721759laf.59.1431341436087; Mon, 11 May 2015 03:50:36 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id am2si8130629lac.130.2015.05.11.03.50.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 May 2015 03:50:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by laat2 with SMTP id t2so90236690laa.1 for ; Mon, 11 May 2015 03:50:36 -0700 (PDT) X-Received: by 10.112.222.133 with SMTP id qm5mr7641600lbc.86.1431341435978; Mon, 11 May 2015 03:50:35 -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 hn6csp1430988lbb; Mon, 11 May 2015 03:50:35 -0700 (PDT) X-Received: by 10.140.149.20 with SMTP id 20mr13150288qhv.38.1431341432498; Mon, 11 May 2015 03:50:32 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i84si12586437qkh.113.2015.05.11.03.50.31; Mon, 11 May 2015 03:50:32 -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 8CBCB61B45; Mon, 11 May 2015 10:50:31 +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 6CF2861B30; Mon, 11 May 2015 10:49:42 +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 6F0ED61800; Mon, 11 May 2015 10:49:36 +0000 (UTC) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174]) by lists.linaro.org (Postfix) with ESMTPS id E2AFA61B30 for ; Mon, 11 May 2015 10:48:46 +0000 (UTC) Received: by lbbzk7 with SMTP id zk7so90889540lbb.0 for ; Mon, 11 May 2015 03:48:45 -0700 (PDT) X-Received: by 10.112.218.67 with SMTP id pe3mr7223977lbc.53.1431341325705; Mon, 11 May 2015 03:48:45 -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 x2sm2969919laj.8.2015.05.11.03.48.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 May 2015 03:48:44 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Mon, 11 May 2015 12:48:27 +0200 Message-Id: <1431341307-9933-4-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431341307-9933-1-git-send-email-christophe.milard@linaro.org> References: <1431341307-9933-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 3/3] validation: creating own dir and lib for random 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.46 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 Module random now gets its own directory and create its own lib (currentely only containing its executable) Signed-off-by: Christophe Milard --- configure.ac | 1 + test/validation/.gitignore | 1 - test/validation/Makefile.am | 9 +++++---- test/validation/random/.gitignore | 4 ++++ test/validation/random/Makefile.am | 12 ++++++++++++ test/validation/{odp_random.c => random/random.c} | 9 ++------- test/validation/random/random.h | 7 +++++++ test/validation/random/random_main.c | 12 ++++++++++++ 8 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 test/validation/random/.gitignore create mode 100644 test/validation/random/Makefile.am rename test/validation/{odp_random.c => random/random.c} (82%) create mode 100644 test/validation/random/random.h create mode 100644 test/validation/random/random_main.c diff --git a/configure.ac b/configure.ac index d20bad2..60b6ec7 100644 --- a/configure.ac +++ b/configure.ac @@ -284,6 +284,7 @@ AC_CONFIG_FILES([Makefile test/api_test/Makefile test/performance/Makefile test/validation/Makefile + test/validation/random/Makefile test/miscellaneous/Makefile ]) diff --git a/test/validation/.gitignore b/test/validation/.gitignore index 34ea143..881790c 100644 --- a/test/validation/.gitignore +++ b/test/validation/.gitignore @@ -12,7 +12,6 @@ odp_packet odp_pktio odp_pool odp_queue -odp_random odp_scheduler odp_shared_memory odp_synchronizers diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am index 6ddda79..70e4706 100644 --- a/test/validation/Makefile.am +++ b/test/validation/Makefile.am @@ -15,7 +15,6 @@ EXECUTABLES = odp_buffer \ odp_packet \ odp_pool \ odp_queue \ - odp_random \ odp_scheduler \ odp_shared_memory \ odp_synchronizers \ @@ -29,7 +28,8 @@ COMPILE_ONLY = odp_pktio TESTSCRIPTS = odp_pktio_run if test_vald -TESTS = $(EXECUTABLES) $(TESTSCRIPTS) +TESTS = random/random_main \ + $(EXECUTABLES) $(TESTSCRIPTS) endif dist_bin_SCRIPTS = odp_pktio_run @@ -51,8 +51,6 @@ dist_odp_init_SOURCES = odp_init.c dist_odp_init_abort_SOURCES = odp_init_abort.c dist_odp_init_log_SOURCES = odp_init_log.c dist_odp_queue_SOURCES = odp_queue.c $(ODP_CU_COMMON) -odp_random_CFLAGS = $(AM_CFLAGS) -DMODULE_HAS_OWN_MAIN -dist_odp_random_SOURCES = odp_random.c $(ODP_CU_COMMON) dist_odp_scheduler_SOURCES = odp_scheduler.c $(ODP_CU_COMMON) dist_odp_shared_memory_SOURCES = odp_shared_memory.c $(ODP_CU_COMMON) dist_odp_synchronizers_SOURCES = odp_synchronizers.c $(ODP_CU_COMMON) @@ -67,3 +65,6 @@ odp_ver_abt_log_dbg_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/ver_abt_log_dbg dist_odp_ver_abt_log_dbg_SOURCES = ver_abt_log_dbg/odp_system.c \ ver_abt_log_dbg/odp_errno.c \ ver_abt_log_dbg/odp_ver_abt_log_dbg.c $(ODP_CU_COMMON) + +ODP_MODULES = random +SUBDIRS = $(ODP_MODULES) diff --git a/test/validation/random/.gitignore b/test/validation/random/.gitignore new file mode 100644 index 0000000..085c44a --- /dev/null +++ b/test/validation/random/.gitignore @@ -0,0 +1,4 @@ +*.log +*.trs +librandom.a +random_main diff --git a/test/validation/random/Makefile.am b/test/validation/random/Makefile.am new file mode 100644 index 0000000..37895d8 --- /dev/null +++ b/test/validation/random/Makefile.am @@ -0,0 +1,12 @@ +include $(top_srcdir)/test/Makefile.inc + +AM_CFLAGS += -I$(top_srcdir)/test/validation/common +AM_LDFLAGS += -static + +noinst_LIBRARIES = librandom.a +librandom_a_CFLAGS = $(AM_CFLAGS) -DMODULE_HAS_OWN_MAIN +librandom_a_SOURCES = random.c ../common/odp_cunit_common.c + +check_PROGRAMS = random_main +dist_random_main_SOURCES = random_main.c +random_main_LDADD = librandom.a $(LIB)/libodp.la diff --git a/test/validation/odp_random.c b/test/validation/random/random.c similarity index 82% rename from test/validation/odp_random.c rename to test/validation/random/random.c index cefc52d..a42523f 100644 --- a/test/validation/odp_random.c +++ b/test/validation/random/random.c @@ -6,6 +6,7 @@ #include #include +#include "random.h" /* Helper macro for CU_TestInfo initialization */ #define _CU_TEST_INFO(test_func) {#test_func, test_func} @@ -29,13 +30,7 @@ static CU_SuiteInfo random_suites[] = { CU_SUITE_INFO_NULL, }; -static int random_main(void) +int random_main(void) { return odp_cunit_run(random_suites); } - -/* the following main function will be seperated when lib is created */ -int main(void) -{ - return random_main(); -} diff --git a/test/validation/random/random.h b/test/validation/random/random.h new file mode 100644 index 0000000..c40ee1f --- /dev/null +++ b/test/validation/random/random.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +int random_main(void); diff --git a/test/validation/random/random_main.c b/test/validation/random/random_main.c new file mode 100644 index 0000000..36b32f7 --- /dev/null +++ b/test/validation/random/random_main.c @@ -0,0 +1,12 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "random.h" + +int main(void) +{ + return random_main(); +}