From patchwork Wed Jul 1 08:19:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 50512 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2C013214B3 for ; Wed, 1 Jul 2015 08:22:22 +0000 (UTC) Received: by wgbbj7 with SMTP id bj7sf10970468wgb.2 for ; Wed, 01 Jul 2015 01:22:21 -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=1zKxIc7vl3fn4dU96iFt/t82NxxWcl9cLmwlj4W2BgU=; b=IMWK3cWG+91fcbeKUddbjC8uH2iL5z2t4ZAryladtJOL/GU1MmU9h35zg26DP3G+3b KpwLp/H0VZMKKMv9X03deQMQt6XD/W/ngMuU19gVUonIvhDC/TW7ks/pOoK7Bm/bbcpQ s+bN3+rtt9yzkO985nwwuGxGsyB2vtuX6nWe59Xfp8/Puz7wzExrtPxVzVUqg7AeETDm nhXUjijZjwowiAGaWq9Y1JJA4vQ/H46IKdLVDdaIb2z7iKL7y+aOajAZRuHzXqZcM7wY GKMp/6p4jeZ9Ge0AuA/R6CiaqLDM9/rxXyPFHybrVvkw63IjwuijurWVDLwaYAdHDF1l q6Zg== X-Gm-Message-State: ALoCoQkL2g6bJb9BTkryMC4TXFW6beNiapIStCRXW7+JHiSAGZL3XnK/78bCmaRmb0pXxwDh6oFT X-Received: by 10.152.27.130 with SMTP id t2mr16523187lag.2.1435738941420; Wed, 01 Jul 2015 01:22:21 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.162 with SMTP id n2ls151406laf.82.gmail; Wed, 01 Jul 2015 01:22:21 -0700 (PDT) X-Received: by 10.152.246.37 with SMTP id xt5mr23769603lac.83.1435738941137; Wed, 01 Jul 2015 01:22:21 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id ay4si1066049lab.9.2015.07.01.01.22.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jul 2015 01:22:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbbpo10 with SMTP id po10so8144046lbb.3 for ; Wed, 01 Jul 2015 01:22:20 -0700 (PDT) X-Received: by 10.112.126.101 with SMTP id mx5mr24343414lbb.35.1435738940703; Wed, 01 Jul 2015 01:22:20 -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 hn6csp436834lbb; Wed, 1 Jul 2015 01:22:19 -0700 (PDT) X-Received: by 10.55.23.17 with SMTP id i17mr51978631qkh.39.1435738939290; Wed, 01 Jul 2015 01:22:19 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id x132si1356430qkx.88.2015.07.01.01.22.18; Wed, 01 Jul 2015 01:22:19 -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 7460961D7B; Wed, 1 Jul 2015 08:22:18 +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 20C9361B1C; Wed, 1 Jul 2015 08:20:47 +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 EE8B461848; Wed, 1 Jul 2015 08:20:42 +0000 (UTC) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com [209.85.217.177]) by lists.linaro.org (Postfix) with ESMTPS id 5C78B61E59 for ; Wed, 1 Jul 2015 08:19:53 +0000 (UTC) Received: by lbcui10 with SMTP id ui10so8094898lbc.0 for ; Wed, 01 Jul 2015 01:19:51 -0700 (PDT) X-Received: by 10.152.43.37 with SMTP id t5mr23479871lal.96.1435738791549; Wed, 01 Jul 2015 01:19:51 -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 x4sm286638lag.40.2015.07.01.01.19.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jul 2015 01:19:50 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Wed, 1 Jul 2015 10:19:32 +0200 Message-Id: <1435738773-31515-5-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435738773-31515-1-git-send-email-christophe.milard@linaro.org> References: <1435738773-31515-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 4/5] validation: creating own dir and lib for thread 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.217.179 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 thread 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 | 10 ++++------ test/validation/thread/.gitignore | 2 ++ test/validation/thread/Makefile.am | 8 ++++++++ test/validation/{odp_thread.c => thread/thread.c} | 9 ++------- test/validation/thread/thread.h | 7 +++++++ test/validation/thread/thread_main.c | 12 ++++++++++++ 8 files changed, 36 insertions(+), 14 deletions(-) create mode 100644 test/validation/thread/.gitignore create mode 100644 test/validation/thread/Makefile.am rename test/validation/{odp_thread.c => thread/thread.c} (85%) create mode 100644 test/validation/thread/thread.h create mode 100644 test/validation/thread/thread_main.c diff --git a/configure.ac b/configure.ac index bfe5964..c036040 100644 --- a/configure.ac +++ b/configure.ac @@ -315,6 +315,7 @@ AC_CONFIG_FILES([Makefile test/validation/random/Makefile test/validation/scheduler/Makefile test/validation/system/Makefile + test/validation/thread/Makefile test/miscellaneous/Makefile ]) diff --git a/test/validation/.gitignore b/test/validation/.gitignore index cf48485..b274a79 100644 --- a/test/validation/.gitignore +++ b/test/validation/.gitignore @@ -5,4 +5,3 @@ odp_cpumask odp_shared_memory odp_synchronizers odp_timer -odp_thread diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am index 52dc963..53ba9b6 100644 --- a/test/validation/Makefile.am +++ b/test/validation/Makefile.am @@ -8,11 +8,11 @@ EXECUTABLES = odp_cpumask$(EXEEXT) \ odp_shared_memory$(EXEEXT) \ odp_synchronizers$(EXEEXT) \ odp_timer$(EXEEXT) \ - odp_thread$(EXEEXT) \ odp_ver_abt_log_dbg$(EXEEXT) if test_vald -TESTS = $(EXECUTABLES) +TESTS = $(EXECUTABLES) \ + thread/thread_main endif bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY) @@ -24,9 +24,6 @@ dist_odp_shared_memory_SOURCES = odp_shared_memory.c dist_odp_synchronizers_SOURCES = odp_synchronizers.c dist_odp_timer_SOURCES = odp_timer.c dist_odp_cpumask_SOURCES = odp_cpumask.c -odp_thread_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \ - $(LIB)/libodp.la -dist_odp_thread_SOURCES = odp_thread.c 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 \ @@ -42,6 +39,7 @@ ODP_MODULES = buffer \ pool \ random \ scheduler \ - system + system \ + thread SUBDIRS = common $(ODP_MODULES) diff --git a/test/validation/thread/.gitignore b/test/validation/thread/.gitignore new file mode 100644 index 0000000..3b80ec1 --- /dev/null +++ b/test/validation/thread/.gitignore @@ -0,0 +1,2 @@ +libthread.a +thread_main diff --git a/test/validation/thread/Makefile.am b/test/validation/thread/Makefile.am new file mode 100644 index 0000000..218a810 --- /dev/null +++ b/test/validation/thread/Makefile.am @@ -0,0 +1,8 @@ +include ../Makefile.inc + +noinst_LIBRARIES = libthread.a +libthread_a_SOURCES = thread.c + +bin_PROGRAMS = thread_main$(EXEEXT) +dist_thread_main_SOURCES = thread_main.c +thread_main_LDADD = libthread.a $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/odp_thread.c b/test/validation/thread/thread.c similarity index 85% rename from test/validation/odp_thread.c rename to test/validation/thread/thread.c index afbf46d..d0bd75e 100644 --- a/test/validation/odp_thread.c +++ b/test/validation/thread/thread.c @@ -6,6 +6,7 @@ #include #include +#include "thread.h" /* Helper macro for CU_TestInfo initialization */ #define _CU_TEST_INFO(test_func) {#test_func, test_func} @@ -40,13 +41,7 @@ static CU_SuiteInfo thread_suites[] = { CU_SUITE_INFO_NULL, }; -static int thread_main(void) +int thread_main(void) { return odp_cunit_run(thread_suites); } - -/* the following main function will be separated when lib is created */ -int main(void) -{ - return thread_main(); -} diff --git a/test/validation/thread/thread.h b/test/validation/thread/thread.h new file mode 100644 index 0000000..94c288e --- /dev/null +++ b/test/validation/thread/thread.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +int thread_main(void); diff --git a/test/validation/thread/thread_main.c b/test/validation/thread/thread_main.c new file mode 100644 index 0000000..1751b01 --- /dev/null +++ b/test/validation/thread/thread_main.c @@ -0,0 +1,12 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "thread.h" + +int main(void) +{ + return thread_main(); +}