From patchwork Wed Jun 24 16:51:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 50292 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8362021575 for ; Wed, 24 Jun 2015 16:52:30 +0000 (UTC) Received: by laer2 with SMTP id r2sf12519541lae.3 for ; Wed, 24 Jun 2015 09:52:29 -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=EsfrPt1ZinuMYceRvfUlQ7d5ESZ+ALwAswRmfzVKdv0=; b=Jgm4LwP72xuSTGazzi0cdZhzeGQQrmWVWJi9h42XfeLlJF3og/8O743mjj8AKS2iVm lEfyDqVskNGgqr9xXJrhLNcfCaG3qbEHuW0aOzUIQqpZl3ZErPLcPJpehwfJB+aV/dnf wYMVHRhJQoYYLh+q1e8ZrdRL5nTgb1qSU0Id3BdGev3TVmKUiz5btwisUS8H1VkOV5l5 cfwlgC+YOCrtxblaPBRP2DiQzC9UvV5oI4/4YzRk1BmTEZ175JJCrpxkYBUfbzbY0zrY eP5Rvi3TDe42e7ace4S25PfL5+tjEf77qNinDcqYQbRvHG6Vrfk4aSRkN0PrLCsgqJzQ I4Sg== X-Gm-Message-State: ALoCoQmU4StOLqt9MIYUu2JFqonzwH+6PtWTACL0z4jJE26NuAWF908LJxiog2HjvpeKAAIT9Mwe X-Received: by 10.152.115.147 with SMTP id jo19mr1754156lab.7.1435164749558; Wed, 24 Jun 2015 09:52:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.164 with SMTP id az4ls222441lab.16.gmail; Wed, 24 Jun 2015 09:52:29 -0700 (PDT) X-Received: by 10.112.52.2 with SMTP id p2mr40951836lbo.8.1435164749409; Wed, 24 Jun 2015 09:52:29 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id of3si22451797lbb.110.2015.06.24.09.52.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jun 2015 09:52:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by lagi2 with SMTP id i2so29805889lag.2 for ; Wed, 24 Jun 2015 09:52:29 -0700 (PDT) X-Received: by 10.152.42.177 with SMTP id p17mr19379822lal.29.1435164749317; Wed, 24 Jun 2015 09:52:29 -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 hn6csp34740lbb; Wed, 24 Jun 2015 09:52:28 -0700 (PDT) X-Received: by 10.140.151.6 with SMTP id 6mr56296184qhx.89.1435164747974; Wed, 24 Jun 2015 09:52:27 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f64si11351474qkf.8.2015.06.24.09.52.24; Wed, 24 Jun 2015 09:52:27 -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 CE27362050; Wed, 24 Jun 2015 16:52:24 +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 9946061F00; Wed, 24 Jun 2015 16:52:19 +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 A6CE76203F; Wed, 24 Jun 2015 16:52:15 +0000 (UTC) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com [209.85.215.45]) by lists.linaro.org (Postfix) with ESMTPS id 5A50F6203F for ; Wed, 24 Jun 2015 16:51:47 +0000 (UTC) Received: by lacny3 with SMTP id ny3so29675267lac.3 for ; Wed, 24 Jun 2015 09:51:45 -0700 (PDT) X-Received: by 10.152.6.69 with SMTP id y5mr40425179lay.72.1435164705812; Wed, 24 Jun 2015 09:51: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 k9sm3638444lbp.13.2015.06.24.09.51.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Jun 2015 09:51:44 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Wed, 24 Jun 2015 18:51:28 +0200 Message-Id: <1435164691-6714-2-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435164691-6714-1-git-send-email-christophe.milard@linaro.org> References: <1435164691-6714-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 1/4] validation: own main in init 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.47 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 The 3 init test executables, odp_init.c, odp_init_abort.c, odp_init_log.c, now provides their own main. Signed-off-by: Christophe Milard --- test/validation/Makefile.am | 7 +++++++ test/validation/init/odp_init.c | 15 +++++++++++++-- test/validation/init/odp_init_abort.c | 15 +++++++++++++-- test/validation/init/odp_init_log.c | 15 +++++++++++++-- 4 files changed, 46 insertions(+), 6 deletions(-) diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am index 1db0e91..bccc886 100644 --- a/test/validation/Makefile.am +++ b/test/validation/Makefile.am @@ -30,8 +30,15 @@ ODP_CU_COMMON=common/odp_cunit_common.c odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer dist_odp_buffer_SOURCES = odp_buffer.c odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto +odp_init_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \ + $(LIB)/libodp.la dist_odp_init_SOURCES = init/odp_init.c +odp_init_abort_LDADD = \ + $(top_builddir)/test/validation/common/libcunit_common.a \ + $(LIB)/libodp.la dist_odp_init_abort_SOURCES = init/odp_init_abort.c +odp_init_log_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \ + $(LIB)/libodp.la 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 \ diff --git a/test/validation/init/odp_init.c b/test/validation/init/odp_init.c index 082e7c2..8a5b606 100644 --- a/test/validation/init/odp_init.c +++ b/test/validation/init/odp_init.c @@ -35,12 +35,23 @@ static void test_odp_init_global(void) CU_ASSERT(status == 0); } -CU_TestInfo test_odp_init[] = { +static CU_TestInfo test_odp_init[] = { {"test_odp_init_global", test_odp_init_global}, CU_TEST_INFO_NULL, }; -CU_SuiteInfo odp_testsuites[] = { +static CU_SuiteInfo init_suites_ok[] = { {"Init", NULL, NULL, NULL, NULL, test_odp_init}, CU_SUITE_INFO_NULL, }; + +static int init_main_ok(void) +{ + return odp_cunit_run(init_suites_ok); +} + +/* the following main function will be separated when lib is created */ +int main(void) +{ + return init_main_ok(); +} diff --git a/test/validation/init/odp_init_abort.c b/test/validation/init/odp_init_abort.c index c83c8d3..2304499 100644 --- a/test/validation/init/odp_init_abort.c +++ b/test/validation/init/odp_init_abort.c @@ -40,12 +40,12 @@ static void test_odp_init_global_replace_abort(void) CU_ASSERT(status == 0); } -CU_TestInfo test_odp_init[] = { +static CU_TestInfo test_odp_init[] = { {"replace abort", test_odp_init_global_replace_abort}, CU_TEST_INFO_NULL, }; -CU_SuiteInfo odp_testsuites[] = { +static CU_SuiteInfo init_suites_abort[] = { {"Init", NULL, NULL, NULL, NULL, test_odp_init}, CU_SUITE_INFO_NULL, }; @@ -54,3 +54,14 @@ void odp_init_abort(void) { abort(); } + +static int init_main_abort(void) +{ + return odp_cunit_run(init_suites_abort); +} + +/* the following main function will be separated when lib is created */ +int main(void) +{ + return init_main_abort(); +} diff --git a/test/validation/init/odp_init_log.c b/test/validation/init/odp_init_log.c index fe1be71..ce7a628 100644 --- a/test/validation/init/odp_init_log.c +++ b/test/validation/init/odp_init_log.c @@ -45,12 +45,12 @@ static void test_odp_init_global_replace_log(void) CU_ASSERT(status == 0); } -CU_TestInfo test_odp_init[] = { +static CU_TestInfo test_odp_init[] = { {"replace log", test_odp_init_global_replace_log}, CU_TEST_INFO_NULL, }; -CU_SuiteInfo odp_testsuites[] = { +static CU_SuiteInfo init_suites_log[] = { {"Init", NULL, NULL, NULL, NULL, test_odp_init}, CU_SUITE_INFO_NULL, }; @@ -70,3 +70,14 @@ int odp_init_log(odp_log_level_e level __attribute__((unused)), return r; } + +static int init_main_log(void) +{ + return odp_cunit_run(init_suites_log); +} + +/* the following main function will be separated when lib is created */ +int main(void) +{ + return init_main_log(); +}