From patchwork Wed Jul 8 14:11:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 50885 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 31ABA213FD for ; Wed, 8 Jul 2015 14:14:53 +0000 (UTC) Received: by laer2 with SMTP id r2sf66852059lae.3 for ; Wed, 08 Jul 2015 07:14:51 -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=4DLQNyPfzq2g+hYEfZhFcvmTpsnrLbnfuMwuPSHDCkA=; b=mKkoXTcJqJvYGvXLg3JjVqu03tSwkGzV3TlTpZgnG1+gGJ9tATUVJjkCFENHTfsv03 MZYJrVk8oTLI666Gkn8HO3+XsVtFd18HSz2ToSkKs/2g9YN3hTHV2GjaRh7AKwRjPyGH tRBdXa5fvzV8R1CaRAl68jRzUJFLew6oGCjYP7Sh00/7fYX0DcmpS5HPELH5QKlh2jQh wkdFzIyP5Rn6ZGsqbSKLp+BpkxDo0XHi9dTY2FZV14zBRL76Ibw03+Pc0gTUMqP4hhht cYrBxqMmo/1sKIQOEZBIatIZbbVwHn3ncxMHIiiZ2c8Gs1/wldz3w/UyUHCVd8QF9/5O G0UA== X-Gm-Message-State: ALoCoQkGYEVCB0aLByL+sECAZk4Izk2ez10lVtDXzSLMkr81mjV9/FrM4YdE5LIaLhYq+gColAUz X-Received: by 10.112.28.111 with SMTP id a15mr4933788lbh.21.1436364891940; Wed, 08 Jul 2015 07:14:51 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.235 with SMTP id r11ls389755lal.108.gmail; Wed, 08 Jul 2015 07:14:51 -0700 (PDT) X-Received: by 10.112.55.70 with SMTP id q6mr8734733lbp.99.1436364891744; Wed, 08 Jul 2015 07:14:51 -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 bd7si1786091lab.39.2015.07.08.07.14.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2015 07:14:51 -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 lbnk3 with SMTP id k3so57028615lbn.1 for ; Wed, 08 Jul 2015 07:14:51 -0700 (PDT) X-Received: by 10.152.22.99 with SMTP id c3mr10019802laf.32.1436364891588; Wed, 08 Jul 2015 07:14:51 -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 hn6csp3130016lbb; Wed, 8 Jul 2015 07:14:50 -0700 (PDT) X-Received: by 10.55.31.164 with SMTP id n36mr16263448qkh.76.1436364890259; Wed, 08 Jul 2015 07:14:50 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 199si2809421qhw.116.2015.07.08.07.14.48; Wed, 08 Jul 2015 07:14:50 -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 1776561DD5; Wed, 8 Jul 2015 14:14:48 +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 8B2DF61DB9; Wed, 8 Jul 2015 14:12:20 +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 7A51B61E6C; Wed, 8 Jul 2015 14:12:16 +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 E295461D8D for ; Wed, 8 Jul 2015 14:11:57 +0000 (UTC) Received: by lbnk3 with SMTP id k3so56971408lbn.1 for ; Wed, 08 Jul 2015 07:11:56 -0700 (PDT) X-Received: by 10.153.7.133 with SMTP id dc5mr9700639lad.17.1436364716355; Wed, 08 Jul 2015 07:11:56 -0700 (PDT) Received: from erachmi-VirtualBox.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id zf3sm667823lbb.2.2015.07.08.07.11.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jul 2015 07:11:55 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Wed, 8 Jul 2015 16:11:40 +0200 Message-Id: <1436364701-27420-5-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436364701-27420-1-git-send-email-christophe.milard@linaro.org> References: <1436364701-27420-1-git-send-email-christophe.milard@linaro.org> X-Topics: timers patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv2 4/5] validation: creating own dir and lib for timer 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 Signed-off-by: Christophe Milard --- configure.ac | 1 + test/validation/.gitignore | 1 - test/validation/Makefile.am | 12 ++---------- test/validation/timer/.gitignore | 2 ++ test/validation/timer/Makefile.am | 8 ++++++++ test/validation/{odp_timer.c => timer/timer.c} | 9 ++------- test/validation/timer/timer.h | 7 +++++++ test/validation/timer/timer_main.c | 12 ++++++++++++ 8 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 test/validation/timer/.gitignore create mode 100644 test/validation/timer/Makefile.am rename test/validation/{odp_timer.c => timer/timer.c} (99%) create mode 100644 test/validation/timer/timer.h create mode 100644 test/validation/timer/timer_main.c diff --git a/configure.ac b/configure.ac index 05719a2..e32a6fa 100644 --- a/configure.ac +++ b/configure.ac @@ -319,6 +319,7 @@ AC_CONFIG_FILES([Makefile test/validation/synchronizers/Makefile test/validation/thread/Makefile test/validation/time/Makefile + test/validation/timer/Makefile test/validation/shmem/Makefile test/validation/system/Makefile test/miscellaneous/Makefile diff --git a/test/validation/.gitignore b/test/validation/.gitignore index 1a5eb04..7e563b8 100644 --- a/test/validation/.gitignore +++ b/test/validation/.gitignore @@ -1,3 +1,2 @@ *.log *.trs -odp_timer diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am index 470350c..f79f9f1 100644 --- a/test/validation/Makefile.am +++ b/test/validation/Makefile.am @@ -1,23 +1,14 @@ -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 -EXECUTABLES = odp_timer$(EXEEXT) - if test_vald -TESTS = $(EXECUTABLES) +TESTS = timer/timer_main endif -bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY) ODP_CU_COMMON=common/odp_cunit_common.c odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto -odp_timer_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \ - $(LIB)/libodp.la -dist_odp_timer_SOURCES = odp_timer.c ODP_MODULES = buffer \ classification \ @@ -34,6 +25,7 @@ ODP_MODULES = buffer \ synchronizers \ thread \ time \ + timer \ shmem \ system diff --git a/test/validation/timer/.gitignore b/test/validation/timer/.gitignore new file mode 100644 index 0000000..56792c4 --- /dev/null +++ b/test/validation/timer/.gitignore @@ -0,0 +1,2 @@ +timer_main +libtimer.a diff --git a/test/validation/timer/Makefile.am b/test/validation/timer/Makefile.am new file mode 100644 index 0000000..0db4986 --- /dev/null +++ b/test/validation/timer/Makefile.am @@ -0,0 +1,8 @@ +include ../Makefile.inc + +noinst_LIBRARIES = libtimer.a +libtimer_a_SOURCES = timer.c + +bin_PROGRAMS = timer_main$(EXEEXT) +dist_timer_main_SOURCES = timer_main.c +timer_main_LDADD = libtimer.a $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/odp_timer.c b/test/validation/timer/timer.c similarity index 99% rename from test/validation/odp_timer.c rename to test/validation/timer/timer.c index 754bc1e..492d52f 100644 --- a/test/validation/odp_timer.c +++ b/test/validation/timer/timer.c @@ -14,6 +14,7 @@ #include #include "odp_cunit_common.h" #include "test_debug.h" +#include "timer.h" /** @private Timeout range in milliseconds (ms) */ #define RANGE_MS 2000 @@ -541,13 +542,7 @@ static CU_SuiteInfo timer_suites[] = { CU_SUITE_INFO_NULL, }; -static int timer_main(void) +int timer_main(void) { return odp_cunit_run(timer_suites); } - -/* the following main function will be separated when lib is created */ -int main(void) -{ - return timer_main(); -} diff --git a/test/validation/timer/timer.h b/test/validation/timer/timer.h new file mode 100644 index 0000000..b18af80 --- /dev/null +++ b/test/validation/timer/timer.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +int timer_main(void); diff --git a/test/validation/timer/timer_main.c b/test/validation/timer/timer_main.c new file mode 100644 index 0000000..24eb77b --- /dev/null +++ b/test/validation/timer/timer_main.c @@ -0,0 +1,12 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "timer.h" + +int main(void) +{ + return timer_main(); +}