From patchwork Wed Dec 20 16:00:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 122480 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5764986qgn; Wed, 20 Dec 2017 08:02:51 -0800 (PST) X-Google-Smtp-Source: ACJfBosfjX8UL6amNabwDEZO9vMP7HZYZg7fLLS7axgRlXB7EVrx1ihelQQOQOaX0bD1r3ZzW0EC X-Received: by 10.37.197.140 with SMTP id v134mr5603811ybe.286.1513785771308; Wed, 20 Dec 2017 08:02:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513785771; cv=none; d=google.com; s=arc-20160816; b=wAS0mwxDLpa+UEDvHQBZa/sfcAnL2dT7iIjxKcFiQ1JOoTIN7GkSbFbjzxvwJSBCF6 o2buKehu8vPkchtNnjFJmZzQeStLikvhVsNBVCaWpX7j9ygam4rm4MEQR7Ffov8maY1a acUnPfglJxklhwMduYe/yiZQs0OUp2izTgT4/SW82mibGgBkemP2KQO7YF1LJw9GPeo9 DOAAdgC+ou07dM1j8ePklordJOGyz+DMqAt6r1/ntqPveGvBB15frFrOeXcwnX8zDhHu cUPF75jrOae2/eI5WF2JcTH5h/1TUr3e/9eG4rLXsLn2LT0ql/XYgwOuQ6GL5Z6zO6tL m+lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=PJk/4TVuNXJLNLrfyUr72vxxE2rWkJZ5tUzhYHindp4=; b=bxLmfLXWNS8MTQJYvVsF9aW7pcMIgSiA1f9gpFDwLaPt7PbYnqZLrCbGL6RL3DO6iZ tc7NRcEX0/fpxNm5c8l0JnZgO7wcR+FUMLaiOg79uZbcThFw2ITq4kvNMTOuKIjro1MK BSnEXva7GK1ltFZ3Lam1F3HqqCpSOUhP1IMr2n+0IpCEo00wJoAAsJsvhwanh/lw/5m0 0eevWWriOZdMv8jBZW653F92Skn+WOed7YtLqMTbCXUjVOf/4VeJGkdXG61WA+G1EbKV mKMBSCkTMI2fg4/h20HNJI6wuinqqYaR3ghGR0Yvr2m0N/vUeogT6Fiz1CKc9GcHyCGo n5Wg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id u2si2248826qkf.183.2017.12.20.08.02.50; Wed, 20 Dec 2017 08:02:51 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 50828608FC; Wed, 20 Dec 2017 16:02:50 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 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 C54F460922; Wed, 20 Dec 2017 16:00: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 04A98608ED; Wed, 20 Dec 2017 16:00:30 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id 6F89D608E7 for ; Wed, 20 Dec 2017 16:00:27 +0000 (UTC) Received: from mxback7j.mail.yandex.net (mxback7j.mail.yandex.net [IPv6:2a02:6b8:0:1619::110]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 8B59B4303E9B for ; Wed, 20 Dec 2017 19:00:25 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback7j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Em8JLISq7H-0PNirIKt; Wed, 20 Dec 2017 19:00:25 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id SwIUpkrZYA-0O5qRaDq; Wed, 20 Dec 2017 19:00:24 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 20 Dec 2017 19:00:19 +0300 Message-Id: <1513785623-30862-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513785623-30862-1-git-send-email-odpbot@yandex.ru> References: <1513785623-30862-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 309 Subject: [lng-odp] [PATCH v12 1/5] test: build: enable cunit output to xml 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov Signed-off-by: Maxim Uvarov --- /** Email created from pull request 309 (muvarov:devel/master_shippable2) ** https://github.com/Linaro/odp/pull/309 ** Patch: https://github.com/Linaro/odp/pull/309.patch ** Base sha: 6b5cdc77eb9759a2349b10372a964648559bc92c ** Merge commit sha: 170d41370418d3dd8da3808c800f2894f36cf9ae **/ .gitignore | 3 +++ doc/.gitignore | 1 + test/common/odp_cunit_common.c | 13 +++++++++++-- test/common/odp_cunit_common.h | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 doc/.gitignore diff --git a/.gitignore b/.gitignore index 93ab63a31..4653f8976 100644 --- a/.gitignore +++ b/.gitignore @@ -2,13 +2,16 @@ *.gcda *.gcno *.gcov +*.trs *.la *.lo +*.log *.o *.orig *.patch *.rej *.swp +*.xml *~ .deps/ .dirstamp diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 000000000..d7ec32eaf --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1 @@ +!*.xml diff --git a/test/common/odp_cunit_common.c b/test/common/odp_cunit_common.c index 08bf1f264..55a39d910 100644 --- a/test/common/odp_cunit_common.c +++ b/test/common/odp_cunit_common.c @@ -6,13 +6,16 @@ #include "config.h" +#include #include +#include #include #include "odp_cunit_common.h" #include /* Globals */ static odph_odpthread_t thread_tbl[MAX_WORKERS]; static odp_instance_t instance; +static char *progname; /* * global init/term functions which may be registered @@ -296,8 +299,13 @@ int odp_cunit_run(void) printf("\tODP implementation name: %s\n", odp_version_impl_name()); printf("\tODP implementation version: %s\n", odp_version_impl_str()); - CU_basic_set_mode(CU_BRM_VERBOSE); - CU_basic_run_tests(); + if (getenv("ODP_TEST_OUT_XML")) { + CU_set_output_filename(progname); + CU_automated_run_tests(); + } else { + CU_basic_set_mode(CU_BRM_VERBOSE); + CU_basic_run_tests(); + } ret = CU_get_number_of_failure_records(); @@ -371,5 +379,6 @@ int odp_cunit_register(odp_suiteinfo_t testsuites[]) */ int odp_cunit_parse_options(int argc, char *argv[]) { + progname = argv[0]; return odph_parse_options(argc, argv, NULL, NULL); } diff --git a/test/common/odp_cunit_common.h b/test/common/odp_cunit_common.h index 486a5ec51..ef4385398 100644 --- a/test/common/odp_cunit_common.h +++ b/test/common/odp_cunit_common.h @@ -17,6 +17,7 @@ #include #include "CUnit/Basic.h" #include "CUnit/TestDB.h" +#include #include #define MAX_WORKERS 32 /**< Maximum number of work threads */