From patchwork Fri Dec 8 14:00:20 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: 121166 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp701999qgn; Fri, 8 Dec 2017 06:06:47 -0800 (PST) X-Google-Smtp-Source: AGs4zMbAHZ3s4LS/3MEihBjJVZBV1Leru4X8uGFqWOGydg9M7uyy/oy+NSAxLgsoDFgW9UZSpJBF X-Received: by 10.55.19.206 with SMTP id 75mr33232738qkt.33.1512742007560; Fri, 08 Dec 2017 06:06:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512742007; cv=none; d=google.com; s=arc-20160816; b=BEo5DH0GKoMhb3tMv7mIMMWLNAzCa69fyeOySPh807rq+6JQhH81yeL6iaIumEHW4t SOudjkubKDwdQYasekiK7kDnTaY+sCElwFyzcVKyl/2k4guGoKnyUmyDq+wz8fbbxzYk ejrlAhNPmZQGE4BJvKNkpWK9at4D+Cn36VRpWMqDdjwY9KhFv5V50NI1GX1zl0d9zAgN fC0nWSdQpRMEpzfkvXXLBf0+ZyZhGJSOzVawW2U2VBapAQCEHQaZlxL/gN8Bze76Qd0t V+Das/BbfDDE4kP9edKjzrxUfQP+qEPlec26gVEB1VIbMUDTy5ZG8RqvEXhZRILxknWQ OuzA== 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=9cNoNWxL3xncizJq4XuVSC8YIx2Rt5veZwlOrO3Virg=; b=XBgfoeEjb5UKyNqrfbFZ+jzXd/5BKh7scB5TZU6S5PbytPhUtD/KpCQVTxYHPtCJNy Ci3udlqb0J+nD1NnCDJkiPYCxULP7/UiB3zdCp8EEGPF351i9ikxfq5+2Y1h2D/kvdT8 JXwF+Xy9w3WYX7EoK7xHg21K+9SLgXGVj+DwwuRIYIdEIwA32g9x/6oDF805meatH9aO UWufEIN/fnTS5vXu9YURfpMpeG3MeyIvhuNWG6MIiU9azP/fJmiQrkzBHK+9g3LvfLJm ONh1mLDse+QYE5R7eU4q29r7YLvFG1QIzL02YT/U1boPeQkO6C1hvPncTunsxuSCqdVc NMTw== 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 j4si5495160qtd.241.2017.12.08.06.06.47; Fri, 08 Dec 2017 06:06:47 -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 30EC6609B5; Fri, 8 Dec 2017 14:06:47 +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_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 07D7660A07; Fri, 8 Dec 2017 14:02: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 71E8C609EF; Fri, 8 Dec 2017 14:02:14 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id 2EE7A609A2 for ; Fri, 8 Dec 2017 14:00:26 +0000 (UTC) Received: from mxback14j.mail.yandex.net (mxback14j.mail.yandex.net [IPv6:2a02:6b8:0:1619::90]) by forward103j.mail.yandex.net (Yandex) with ESMTP id E970134C20BB for ; Fri, 8 Dec 2017 17:00:24 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback14j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id hC2i9aT98e-0OsuOl8x; Fri, 08 Dec 2017 17:00:24 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Em6w1yWDhQ-0OP8418N; Fri, 08 Dec 2017 17: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: Fri, 8 Dec 2017 17:00:20 +0300 Message-Id: <1512741623-12503-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512741623-12503-1-git-send-email-odpbot@yandex.ru> References: <1512741623-12503-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 309 Subject: [lng-odp] [PATCH v6 1/4] 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: c15a810b7a47f2e07200f83aa534163ca06e2b16 ** Merge commit sha: 0cdabd14b0d18093820a34f184f68afe04aa851e **/ .gitignore | 3 +++ configure.ac | 1 + doc/.gitignore | 1 + test/common/odp_cunit_common.c | 9 +++++++++ test/common/odp_cunit_common.h | 3 +++ test/m4/validation.m4 | 11 +++++++++++ 6 files changed, 28 insertions(+) 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/configure.ac b/configure.ac index 95e316026..c4ce56e20 100644 --- a/configure.ac +++ b/configure.ac @@ -383,6 +383,7 @@ AC_MSG_RESULT([ Deprecated APIs: ${deprecated} debug: ${enable_debug} cunit: ${cunit_support} + cunit xml output: ${cunit_out_xml} test_vald: ${test_vald} test_perf: ${test_perf} test_perf_proc: ${test_perf_proc} 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..7ed343745 100644 --- a/test/common/odp_cunit_common.c +++ b/test/common/odp_cunit_common.c @@ -1,3 +1,4 @@ + /* Copyright (c) 2014, Linaro Limited * All rights reserved. * @@ -7,12 +8,14 @@ #include "config.h" #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()); +#if TEST_CUNIT_XML + CU_set_output_filename(progname); + CU_automated_run_tests(); +#else CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); +#endif 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..1497a33c7 100644 --- a/test/common/odp_cunit_common.h +++ b/test/common/odp_cunit_common.h @@ -17,6 +17,9 @@ #include #include "CUnit/Basic.h" #include "CUnit/TestDB.h" +#if TEST_CUNIT_XML +#include +#endif #include #define MAX_WORKERS 32 /**< Maximum number of work threads */ diff --git a/test/m4/validation.m4 b/test/m4/validation.m4 index 65ba2aa2e..216510a76 100644 --- a/test/m4/validation.m4 +++ b/test/m4/validation.m4 @@ -31,3 +31,14 @@ AM_CONDITIONAL([test_vald], [test "x$test_vald" = "xyes"]) AC_SUBST([CUNIT_CFLAGS]) AC_SUBST([CUNIT_LIBS]) + +AC_ARG_ENABLE([cunit_out_xml], + [AS_HELP_STRING([--enable-cunit_out_xml], + [output to xml] + [(output test results to xml instead of plain text)])], + cunit_out_xml=yes, cunit_out_xml=no) +AS_IF([test "x$cunit_out_xml" == "xyes"], [TEST_CUNIT_XML=1], + [TEST_CUNIT_XML=0]) +AC_DEFINE_UNQUOTED([TEST_CUNIT_XML], [$TEST_CUNIT_XML], + [Define to 1 to output to xml]) +AM_CONDITIONAL([cunit_out_xml], [test "x$cunit_out_xml" = "xyes"])