From patchwork Thu May 19 16:26:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 68133 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp3269806qge; Thu, 19 May 2016 08:32:17 -0700 (PDT) X-Received: by 10.140.25.193 with SMTP id 59mr14574358qgt.77.1463671937779; Thu, 19 May 2016 08:32:17 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z11si9996657qhc.104.2016.05.19.08.32.17; Thu, 19 May 2016 08:32:17 -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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 689F1618D0; Thu, 19 May 2016 15:32:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 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 [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 7F9F56182D; Thu, 19 May 2016 15:29:02 +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 892F66181B; Thu, 19 May 2016 15:28:57 +0000 (UTC) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) by lists.linaro.org (Postfix) with ESMTPS id BE317617EC for ; Thu, 19 May 2016 15:28:31 +0000 (UTC) Received: by mail-lb0-f173.google.com with SMTP id n11so25933589lbh.1 for ; Thu, 19 May 2016 08:28:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2WBKNbcwM6RLJWltXijT615NQIqTgiNM21Yl5jRU39Y=; b=dU/QCOsODXkrjQgovbWZsuG3xv3Sg/f6oPhv9xjKgMl2hW4he97lfRpqpE/xYwDHrX oDT8ra3zzdNbb3KYIq5vcd4uvKOo21QNZ/cXyahpKyjQPqZw1ppiQKc9lMcmoptGw5S1 LZJepaaDVqkoAiGtChOGeNJ19SZeVvbOz/g8Sp0aOkTuAp4nQsBdFsCWFhe2ijmfVYJ+ KlxXJS4DZ4PttQGyyGdKMr7PZVNLjUaS2PzVS5iTjJKR8P12RNMI2JWaxdOy8tDRfzxg pm3tWiuPVQII9VgxQ4Fj2AqxQgQ20LjUKK/uxA/PAHqgAxB2t+09WtYz/rjfqiW/eTFY FKMw== X-Gm-Message-State: AOPr4FUj56P90XYCem1cmHPoaWww60xzGQJIXFfUY40GxLXgcW8Xg/bF+T4o+ZO3Hcrskzd6tus= X-Received: by 10.112.149.234 with SMTP id ud10mr3016742lbb.132.1463671710695; Thu, 19 May 2016 08:28:30 -0700 (PDT) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id cv11sm2366290lbb.49.2016.05.19.08.28.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 May 2016 08:28:30 -0700 (PDT) From: Christophe Milard To: brian.brooks@linaro.org, maxim.uvarov@linaro.com, lng-odp@lists.linaro.org Date: Thu, 19 May 2016 18:26:42 +0200 Message-Id: <1463675234-6739-4-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1463675234-6739-1-git-send-email-christophe.milard@linaro.org> References: <1463675234-6739-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv8 03/35] validation: shmem: adding command line argument parsing X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" 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" As the test itself does not have specific args, it just calls the cunit_common parsing function to pick up cunit_common and helpers arguments. Signed-off-by: Christophe Milard --- test/validation/shmem/shmem.c | 10 ++++++++-- test/validation/shmem/shmem.h | 2 +- test/validation/shmem/shmem_main.c | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/test/validation/shmem/shmem.c b/test/validation/shmem/shmem.c index 0bf38d2..b4c6847 100644 --- a/test/validation/shmem/shmem.c +++ b/test/validation/shmem/shmem.c @@ -91,9 +91,15 @@ odp_suiteinfo_t shmem_suites[] = { ODP_SUITE_INFO_NULL, }; -int shmem_main(void) +int shmem_main(int argc, char *argv[]) { - int ret = odp_cunit_register(shmem_suites); + int ret; + + /* parse common options: */ + if (odp_cunit_parse_options(argc, argv)) + return -1; + + ret = odp_cunit_register(shmem_suites); if (ret == 0) ret = odp_cunit_run(); diff --git a/test/validation/shmem/shmem.h b/test/validation/shmem/shmem.h index d60cf64..a5893d9 100644 --- a/test/validation/shmem/shmem.h +++ b/test/validation/shmem/shmem.h @@ -19,6 +19,6 @@ extern odp_testinfo_t shmem_suite[]; extern odp_suiteinfo_t shmem_suites[]; /* main test program: */ -int shmem_main(void); +int shmem_main(int argc, char *argv[]); #endif diff --git a/test/validation/shmem/shmem_main.c b/test/validation/shmem/shmem_main.c index 445fbf1..4c69130 100644 --- a/test/validation/shmem/shmem_main.c +++ b/test/validation/shmem/shmem_main.c @@ -6,7 +6,7 @@ #include "shmem.h" -int main(void) +int main(int argc, char *argv[]) { - return shmem_main(); + return shmem_main(argc, argv); }