From patchwork Tue Jun 23 12:42:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 50223 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 05D11216E1 for ; Tue, 23 Jun 2015 12:44:49 +0000 (UTC) Received: by wgbhy7 with SMTP id hy7sf2618931wgb.3 for ; Tue, 23 Jun 2015 05:44:48 -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=70Sl6NWtMJweRJnR7Vdyh2JNke9L7+IEeF0xYYC3giA=; b=R1biVoJXERFMoHS+k+q2ZVumUXgcTUCP66mdDbrlfuUI8hNt3UIlmgMWTNrDb4NPwh kyRW7s6rDFiqD/XwvFop0h9MVpCUwslOJbfp0glNz4jzscRUAiVUxOOn8Hp6X2EK7dbU AWqVKhCwbDvVKaG5iC5RbdUA9Hlof56Lw+lLUe7SYTc3GI99zK22LY/epvPe9YXXjJTJ /+QqfS+4DjmygnDWZqmIzCuhcPYuNCt/L/NoavOlIuaRfK5XzBfKyuvnbwFO0WZhBfNE kdCZRA2Dgzb4sbmmv2aNU88n+FmOi8TUz/1rtCYl1IBzks5n4L1A92FOEGCucgBhRU5A vbsQ== X-Gm-Message-State: ALoCoQls3F5a1xnd1EyxF8S6Lb0LF7FHJSDdQUrT+VJ7bEYiv+ByIOoito2LH9M/ViVUlfnWaMAH X-Received: by 10.180.35.162 with SMTP id i2mr1222504wij.6.1435063488372; Tue, 23 Jun 2015 05:44:48 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.131 with SMTP id o3ls46068lal.101.gmail; Tue, 23 Jun 2015 05:44:48 -0700 (PDT) X-Received: by 10.112.147.201 with SMTP id tm9mr35104007lbb.40.1435063488167; Tue, 23 Jun 2015 05:44:48 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id uh5si19201495lac.168.2015.06.23.05.44.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jun 2015 05:44:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lacny3 with SMTP id ny3so5721398lac.3 for ; Tue, 23 Jun 2015 05:44:47 -0700 (PDT) X-Received: by 10.112.209.106 with SMTP id ml10mr34458949lbc.112.1435063487911; Tue, 23 Jun 2015 05:44:47 -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 hn6csp3049439lbb; Tue, 23 Jun 2015 05:44:46 -0700 (PDT) X-Received: by 10.55.23.23 with SMTP id i23mr73402695qkh.23.1435063486179; Tue, 23 Jun 2015 05:44:46 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id r76si21989356qha.128.2015.06.23.05.44.45; Tue, 23 Jun 2015 05:44:46 -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 5EC7B61E18; Tue, 23 Jun 2015 12:44: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 9116E61EB9; Tue, 23 Jun 2015 12:43:17 +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 F115561DBD; Tue, 23 Jun 2015 12:43:03 +0000 (UTC) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com [209.85.217.178]) by lists.linaro.org (Postfix) with ESMTPS id 432A461E12 for ; Tue, 23 Jun 2015 12:42:41 +0000 (UTC) Received: by lbnk3 with SMTP id k3so5827762lbn.1 for ; Tue, 23 Jun 2015 05:42:40 -0700 (PDT) X-Received: by 10.152.37.136 with SMTP id y8mr31379642laj.21.1435063360228; Tue, 23 Jun 2015 05:42:40 -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 bn2sm5527992lbc.47.2015.06.23.05.42.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Jun 2015 05:42:39 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Tue, 23 Jun 2015 14:42:22 +0200 Message-Id: <1435063343-16657-4-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435063343-16657-1-git-send-email-christophe.milard@linaro.org> References: <1435063343-16657-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 3/4] 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.45 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 | 6 +++--- test/validation/random/.gitignore | 2 ++ test/validation/random/Makefile.am | 8 ++++++++ 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, 35 insertions(+), 11 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 d845cb0..68b65d5 100644 --- a/configure.ac +++ b/configure.ac @@ -307,6 +307,7 @@ AC_CONFIG_FILES([Makefile test/validation/common/Makefile test/validation/crypto/Makefile test/validation/pktio/Makefile + test/validation/random/Makefile test/validation/system/Makefile test/miscellaneous/Makefile ]) diff --git a/test/validation/.gitignore b/test/validation/.gitignore index 47bf0a9..8f78055 100644 --- a/test/validation/.gitignore +++ b/test/validation/.gitignore @@ -9,7 +9,6 @@ odp_init_log odp_packet 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 d3fd184..8695c5a 100644 --- a/test/validation/Makefile.am +++ b/test/validation/Makefile.am @@ -12,7 +12,6 @@ EXECUTABLES = odp_buffer \ odp_packet \ odp_pool \ odp_queue \ - odp_random \ odp_scheduler \ odp_shared_memory \ odp_synchronizers \ @@ -21,7 +20,8 @@ EXECUTABLES = odp_buffer \ odp_ver_abt_log_dbg if test_vald -TESTS = $(EXECUTABLES) +TESTS = $(EXECUTABLES) \ + random/random_main endif bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY) @@ -37,7 +37,6 @@ dist_odp_init_log_SOURCES = init/odp_init_log.c dist_odp_queue_SOURCES = odp_queue.c odp_random_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \ $(LIB)/libodp.la -dist_odp_random_SOURCES = odp_random.c dist_odp_scheduler_SOURCES = odp_scheduler.c dist_odp_shared_memory_SOURCES = odp_shared_memory.c dist_odp_synchronizers_SOURCES = odp_synchronizers.c @@ -54,6 +53,7 @@ dist_odp_ver_abt_log_dbg_SOURCES = ver_abt_log_dbg/odp_system.c \ ODP_MODULES = classification \ crypto \ pktio \ + random \ system SUBDIRS = common $(ODP_MODULES) diff --git a/test/validation/random/.gitignore b/test/validation/random/.gitignore new file mode 100644 index 0000000..5ae7ebf --- /dev/null +++ b/test/validation/random/.gitignore @@ -0,0 +1,2 @@ +random_main +librandom.a diff --git a/test/validation/random/Makefile.am b/test/validation/random/Makefile.am new file mode 100644 index 0000000..648bc2f --- /dev/null +++ b/test/validation/random/Makefile.am @@ -0,0 +1,8 @@ +include ../Makefile.inc + +noinst_LIBRARIES = librandom.a +librandom_a_SOURCES = random.c + +bin_PROGRAMS = random_main +dist_random_main_SOURCES = random_main.c +random_main_LDADD = librandom.a $(LIBCUNIT_COMMON) $(LIBODP) 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 428af78..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 separated 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(); +}