From patchwork Mon Jun 29 15:10:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 50419 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 942E0228D9 for ; Mon, 29 Jun 2015 15:13:28 +0000 (UTC) Received: by wiwz6 with SMTP id z6sf2334957wiw.0 for ; Mon, 29 Jun 2015 08:13:27 -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=R5Bt5ccVFPREY84zCeHkEce7X+Q//Dco5AH48oAyT9g=; b=MM6Rg/ijeOICSchVafg8nT3jHG7RF2hfL/CHIcX9DDWjflAPwlZFeZCqnNNBpq2uch 63wDb3qRYAXbM2icJIHayAhKfmBXIPQ9d8RA9DQU+osFeZPDrYJRfwXZujYzeJD1bdrR iTuAJTJVMNTtFJkQKgmQGniKKoHOluL6jdnc2qmreOUuZED14wgCUAQKBHCXo/BOD8e5 3Zj90Yaz8CF6+9+3AG5kxMeU7Kz/kewIbQyh5DR1rTRhYGXhsuyTGFjCbcVapnCom8sm v6YFKbuyL/ZCz2q/JOOKxHl9YpZvDyF+yG1Xq3H8jRFUtYSjK4TWrevYynqincjBQ4cr rdqA== X-Gm-Message-State: ALoCoQnTcjpHb3k39oMf4YAVTzkPry/dnjsaPp8B9Qf8mf2nS7b4ET+Ny5JXEqeZT8khK6KEFq5c X-Received: by 10.180.216.12 with SMTP id om12mr8899560wic.1.1435590807929; Mon, 29 Jun 2015 08:13:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.168 with SMTP id w8ls797896lae.41.gmail; Mon, 29 Jun 2015 08:13:27 -0700 (PDT) X-Received: by 10.152.42.177 with SMTP id p17mr14547120lal.29.1435590807763; Mon, 29 Jun 2015 08:13:27 -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 u4si35292629lbk.78.2015.06.29.08.13.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Jun 2015 08:13:27 -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 laar3 with SMTP id r3so67499944laa.0 for ; Mon, 29 Jun 2015 08:13:27 -0700 (PDT) X-Received: by 10.152.206.75 with SMTP id lm11mr14264217lac.41.1435590807640; Mon, 29 Jun 2015 08:13:27 -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 hn6csp1773392lbb; Mon, 29 Jun 2015 08:13:26 -0700 (PDT) X-Received: by 10.55.27.70 with SMTP id b67mr32428823qkb.86.1435590806266; Mon, 29 Jun 2015 08:13:26 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e207si41969828qhc.3.2015.06.29.08.13.25; Mon, 29 Jun 2015 08:13:26 -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 7648661E04; Mon, 29 Jun 2015 15:13:25 +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 717CF61D4C; Mon, 29 Jun 2015 15:11:53 +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 C4ED561E12; Mon, 29 Jun 2015 15:11:47 +0000 (UTC) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by lists.linaro.org (Postfix) with ESMTPS id DB09361B62 for ; Mon, 29 Jun 2015 15:11:16 +0000 (UTC) Received: by lagc2 with SMTP id c2so13767426lag.3 for ; Mon, 29 Jun 2015 08:11:15 -0700 (PDT) X-Received: by 10.152.170.165 with SMTP id an5mr14773050lac.100.1435590675805; Mon, 29 Jun 2015 08:11:15 -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 qe6sm6568757lbb.6.2015.06.29.08.11.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Jun 2015 08:11:14 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Mon, 29 Jun 2015 17:10:53 +0200 Message-Id: <1435590654-2527-4-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435590654-2527-1-git-send-email-christophe.milard@linaro.org> References: <1435590654-2527-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv2 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 Reviewed-by: Stuart Haslam --- configure.ac | 1 + test/validation/.gitignore | 1 - test/validation/Makefile.am | 8 +++----- 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(+), 13 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..6beb6b5 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) @@ -35,9 +35,6 @@ dist_odp_init_SOURCES = init/odp_init.c dist_odp_init_abort_SOURCES = init/odp_init_abort.c 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 +51,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(); +}