From patchwork Tue Sep 19 17:00:09 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: 113049 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp5147105qgf; Tue, 19 Sep 2017 10:00:33 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAIvYioazcKncl+jCOmSDYIc+gUAKT9KVzBM6F1mTIwvsUQqn8V35dJ7FhdU5hdhO+kh+JG X-Received: by 10.200.44.14 with SMTP id d14mr3079045qta.175.1505840433061; Tue, 19 Sep 2017 10:00:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505840433; cv=none; d=google.com; s=arc-20160816; b=quH5hW6CRYDlSTs4OyZ2JmnpzMUQLL9QaD4JGZfsDXMfAeQeW5BeGFVJFRQldlekVq K6e4jhbZptlz2vOGtaeOMvEE+cUnRXcm7w+XqucOFlQ+Ri0Bp3BSFpJnEtgIAwWxcPUn hOJQkY8PdsJ4slLc1zuSgltseoMUBFIiXxkoyODMSkksz6kWHD6ucpglIRgaEE2IuI4H fA8ercuRi+kEYFfcby/WFWEqJ0cAxEMy6hCKXKFAB/yq3Xtsdyfhc69WcLwWoA+d3x3R kooi5wyUcMjpmNX05qe+Frf/ZRA8KyivWg88gHlTW8wbTHDP7bExTd1i3PqgaCNZaYRg 3ZQQ== 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=Y21Uu6NOjCYKObhM0JsYRRN54HyxtNIBEicwQFMzYOs=; b=yPcZqyrHLEaYXt9sEBylwHBoOqWdos0Aiv/6etcK8dTh158O1Qy/nuQ3WJnGMWwqWW xJUvmuR4FwlkhpzuUZFfYoxfOvB5i69oyLhb45yiIAMWHUt9YDvUgPLAE6HZ9eZ9+4H1 wn2gfhbJaqyVTKsTe0fKgAqjhbjNJEP3WhnkZ02EbMG2oSrMSuMyXMq4/pY7HmdeahVD NK7uHcZhk53lH4mwuHt1g/zRg0lZWo0uuePKCd6KxryofM3YlAplqbVLYWzIIRZqdMmk YTZtfruGKNeBNXrmvwBwkWVuSeA6PxVxELCXwfyv8P2VjasFcpHXEWBsSAdNNHxHtumN TXag== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z13si9296288qka.4.2017.09.19.10.00.32; Tue, 19 Sep 2017 10:00:32 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 1080A62CFA; Tue, 19 Sep 2017 17:00:32 +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,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 E47A061E1A; Tue, 19 Sep 2017 17:00:24 +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 C63DC62C62; Tue, 19 Sep 2017 17:00:17 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id 4F43A61DD5 for ; Tue, 19 Sep 2017 17:00:14 +0000 (UTC) Received: from mxback10g.mail.yandex.net (mxback10g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:171]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 4330E1344887 for ; Tue, 19 Sep 2017 20:00:13 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback10g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 6eSDIsrrMD-0Dam9QTV; Tue, 19 Sep 2017 20:00:13 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 50ZOU68LSM-0C5SmICv; Tue, 19 Sep 2017 20:00:12 +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: Tue, 19 Sep 2017 20:00:09 +0300 Message-Id: <1505840409-31804-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505840409-31804-1-git-send-email-odpbot@yandex.ru> References: <1505840409-31804-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 183 Subject: [lng-odp] [PATCH v1 1/1] configure: "best effort" approach for CUnit and validation tests 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: Dmitry Eremin-Solenikov Allow configure to succeed (by disabling validation testsuite), if CUnit library was not found or if user did not specify --enable-test-vald explicitly). Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 183 (lumag:fix-cunit) ** https://github.com/Linaro/odp/pull/183 ** Patch: https://github.com/Linaro/odp/pull/183.patch ** Base sha: e1c46f8e296a730ed27141a33189185bb7dfd1b1 ** Merge commit sha: 90dc2a2f23d0bfde192756bd2e73e247e7fed511 **/ configure.ac | 1 - test/common_plat/m4/validation.m4 | 24 ++++++++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 4af2c7c72..f7da75ec4 100644 --- a/configure.ac +++ b/configure.ac @@ -214,7 +214,6 @@ AM_CONDITIONAL([test_installdir], [test "x$testdir" != "xno"]) # Set conditionals as computed within platform specific files ########################################################################## AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"]) -AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"]) AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ]) AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"]) diff --git a/test/common_plat/m4/validation.m4 b/test/common_plat/m4/validation.m4 index 78c4ec03a..bf849aa3f 100644 --- a/test/common_plat/m4/validation.m4 +++ b/test/common_plat/m4/validation.m4 @@ -4,21 +4,29 @@ AC_ARG_ENABLE([test_vald], [AS_HELP_STRING([--enable-test-vald], [run test in test/validation])], [test_vald=$enableval], - [test_vald=yes]) -AM_CONDITIONAL([test_vald], [test x$test_vald = xyes ]) + [test_vald=check]) ########################################################################## # Check for CUnit availability ########################################################################## cunit_support=$test_vald -AS_IF([test "x$cunit_support" = "xyes"], - [PKG_CHECK_MODULES([CUNIT], [cunit], [], +AS_IF([test "x$cunit_support" != "xno"], + [PKG_CHECK_MODULES([CUNIT], [cunit], [cunit_support=yes], [AC_MSG_WARN([pkg-config could not find CUnit, guessing]) - AC_CHECK_HEADERS([CUnit/Basic.h], [], - [AC_MSG_ERROR(["can't find CUnit headers"])]) - AC_CHECK_LIB([cunit],[CU_get_error], [CUNIT_LIBS="-lcunit"], - [AC_MSG_ERROR([CUnit libraries required])]) + cunit_support=yes + AC_CHECK_HEADERS([CUnit/Basic.h], [], [cunit_support=no]) + AC_CHECK_LIB([cunit], [CU_get_error], [CUNIT_LIBS="-lcunit"], + [cunit_support=no]) ])]) +AS_IF([test "x$test_vald" = "xyes" -a "x$cunit_support" = "xno"], + [AC_MSG_ERROR([Validation testsuite requested, but CUnit was not found])], + [test "x$test_vald" = "xcheck" -a "x$cunit_support" = "xno"], + [AC_MSG_WARN([CUnit was not found, disabling validation testsuite]) + test_vald=no]) + +AM_CONDITIONAL([cunit_support], [test "x$cunit_support" = "xyes"]) +AM_CONDITIONAL([test_vald], [test "x$test_vald" = "xyes"]) + AC_SUBST([CUNIT_CFLAGS]) AC_SUBST([CUNIT_LIBS])