From patchwork Thu Dec 14 15:00:42 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: 121967 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6921914qgn; Thu, 14 Dec 2017 07:04:34 -0800 (PST) X-Google-Smtp-Source: ACJfBotx3tk9Km/nyogO7L38KOtAXm7RHipmqxh8xxZCPBfb1rrSmVqWk07Ct5HGgCqccY2dRyb3 X-Received: by 10.200.27.116 with SMTP id p49mr17153662qtk.118.1513263873905; Thu, 14 Dec 2017 07:04:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513263873; cv=none; d=google.com; s=arc-20160816; b=yFU8ODz1Rc6lDvitFq06ov2q2gpeit0J/XFD76xs5EuU0CqhiL/r8O+f5fcQbm70vH 4kD9T7PTdVICMUYy4DdEWXSiG28eOYyPNwzRXhfhiUiddtgr9RBnCe9quAbss570X42M IPcNHCncWvS9Olh7WCG4GOZmS+ajw+C7kxSTkoCQxwkpXrBzQHGy6qdqWjeC09P9vHqY iK6+WIwfZkWqoB3ISD6iFw3tu+oUGxzn1rRJ9q3Qfgu1E5z/L5tZNUhgfu1GZjyNGzQ0 cbIwy2ZGRu2ma5tdXQNrNBIaoE1VoGelBTtrZOzLCbJDo6TSHVpkMCNVhv8G+hL6HLI+ +e2w== 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=/A1iEupFgxIbsya+CRi6MQVWE6/pwOWtAfjGeZnU7lg=; b=jSWghJ455rshcWZrY5hx4fdRRqFXa0dyvFx/VpJD8xW9jozfFXLiE3+qpsRTbTCfrT t6RZOHAwklN1efV4Q4WFJjIEK6si36YlEbFa3fG4Oc+LemCZPkekaIEuJyp0RFPBKI3x 1+uSbCI1iBUN9vrshvZzVIDcUetY6XThUhIYUfk6yzNBpz8ZfyDuf0hZjL3Gy4DX2xTv dwPx2aI7r20bDdZMRWd3Ir+31GpOry6f4hRjZJTWGyH1C5RsA6ZZ4VOULO5DKI/Gikkh gwojnNloh/RXthHkpa9ywi0R/urTxgLtcygi+zeCIni8zRacZsyBGo17eFTKccJSSOCf yreA== 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 144si1611367qki.207.2017.12.14.07.04.33; Thu, 14 Dec 2017 07:04:33 -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 50F1660902; Thu, 14 Dec 2017 15:04:33 +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 58AD760928; Thu, 14 Dec 2017 15:03:18 +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 F36AC6090A; Thu, 14 Dec 2017 15:03:08 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id 3293E60928 for ; Thu, 14 Dec 2017 15:01:50 +0000 (UTC) Received: from mxback1j.mail.yandex.net (mxback1j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10a]) by forward106j.mail.yandex.net (Yandex) with ESMTP id CC21D18038F3 for ; Thu, 14 Dec 2017 18:01:16 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback1j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id XFSGG9rDyZ-1GTW0gQI; Thu, 14 Dec 2017 18:01:16 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id U5bGnNkZ2k-1AxiXeIJ; Thu, 14 Dec 2017 18:01:10 +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: Thu, 14 Dec 2017 18:00:42 +0300 Message-Id: <1513263646-26300-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513263646-26300-1-git-send-email-odpbot@yandex.ru> References: <1513263646-26300-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 309 Subject: [lng-odp] [PATCH v10 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: b6dece7bd634cbe00c04cb730888d4600936a592 **/ .gitignore | 3 +++ configure.ac | 1 + doc/.gitignore | 1 + test/common/odp_cunit_common.c | 9 +++++++++ test/common/odp_cunit_common.h | 1 + test/m4/validation.m4 | 10 ++++++++++ 6 files changed, 25 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..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 */ diff --git a/test/m4/validation.m4 b/test/m4/validation.m4 index 65ba2aa2e..8aca65ef8 100644 --- a/test/m4/validation.m4 +++ b/test/m4/validation.m4 @@ -31,3 +31,13 @@ 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])