From patchwork Tue Mar 29 18:23:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 64619 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2181291lbc; Tue, 29 Mar 2016 11:36:35 -0700 (PDT) X-Received: by 10.140.180.2 with SMTP id b2mr5013806qha.66.1459276594630; Tue, 29 Mar 2016 11:36:34 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z203si34510qka.44.2016.03.29.11.36.34; Tue, 29 Mar 2016 11:36:34 -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 438C761885; Tue, 29 Mar 2016 18:36:34 +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_H2, 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 8FD97618D2; Tue, 29 Mar 2016 18:32:21 +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 0502361879; Tue, 29 Mar 2016 18:31:19 +0000 (UTC) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) by lists.linaro.org (Postfix) with ESMTPS id 2A7CC618CA for ; Tue, 29 Mar 2016 18:31:02 +0000 (UTC) Received: by mail-lb0-f172.google.com with SMTP id vo2so16669709lbb.1 for ; Tue, 29 Mar 2016 11:31:02 -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=HWcNjQAomj4tGM/IfrDCyYNicndVL5uV90qh/WeQL7U=; b=Y6nFhqtqzyl3ZSfGtAQYuEDZyi2Ui3cwMmkI535U1TU8GyYjtyif/4EKgmiKXsC3CG 1XLWaDsjO6Yf5VcaLAdswGq6ZLZPlIJnkCaaTT6/gHTFkisN0ZCMS2BeqVXIq+7Z6Syc u7yly4TC1KC14NiTpQZIbSR1fAx08Hu5IMNC53Jwj/hgUulNaW0e8DMSfuCx12/1vLEP OIIL1ojvcehHqeeXPD2FiZvJbmP1xq0P80gkSj/MCX72TRGBR/6+rOIJouEILe/jBz+d fUPIcrWCm/HqgMOcud1yfY51nADhFeVHzx3K5TARZl+JrfF/iyZaRAY8hJC9cJeYJiJx RDLQ== X-Gm-Message-State: AD7BkJKedskdGNa/vX/tdkozll75TB6XjTBUyHXXNhZAMmnKl54fNr5w8QL8M1B9X6OWlMnZNDI= X-Received: by 10.112.235.5 with SMTP id ui5mr1860714lbc.111.1459276261068; Tue, 29 Mar 2016 11:31:01 -0700 (PDT) Received: from localhost (c-c82171d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.113.33.200]) by smtp.gmail.com with ESMTPSA id j2sm4679831lfb.25.2016.03.29.11.31.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Mar 2016 11:31:00 -0700 (PDT) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Tue, 29 Mar 2016 20:23:33 +0200 Message-Id: <1459275814-19876-10-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1459275814-19876-1-git-send-email-anders.roxell@linaro.org> References: <1459275814-19876-1-git-send-email-anders.roxell@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 09/10] configure: move test_vald to its own m4 file 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" Signed-off-by: Anders Roxell --- configure.ac | 51 ++------------------------------------------------- test/m4/configure.m4 | 1 + test/m4/validation.m4 | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 49 deletions(-) create mode 100644 test/m4/validation.m4 diff --git a/configure.ac b/configure.ac index e25c7a4..b7879eb 100644 --- a/configure.ac +++ b/configure.ac @@ -123,17 +123,6 @@ AC_ARG_WITH([testdir], AC_SUBST([testdir]) ########################################################################## -# Enable/disable Unit tests -########################################################################## -cunit_support=no -AC_ARG_ENABLE([cunit_support], - [ --enable-cunit-support include cunit infrastructure], - [if test x$enableval = xyes; then - cunit_support=yes - fi]) - - -########################################################################## # Set conditionals as computed within platform specific files ########################################################################## AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ]) @@ -141,6 +130,8 @@ AM_CONDITIONAL([PKTIO_DPDK], [test x$pktio_dpdk_support = xyes ]) AM_CONDITIONAL([HAVE_PCAP], [test $have_pcap = yes]) AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"]) AM_CONDITIONAL([test_installdir], [test "$testdir" != ""]) +AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ]) +AM_CONDITIONAL([test_vald], [test x$test_vald = xyes ]) AM_CONDITIONAL([test_perf], [test x$test_perf = xyes ]) AM_CONDITIONAL([test_cpp], [test x$test_cpp = xyes ]) AM_CONDITIONAL([test_helper], [test x$test_helper = xyes ]) @@ -155,29 +146,6 @@ DX_HTML_FEATURE(ON) DX_PDF_FEATURE(OFF) DX_PS_FEATURE(OFF) DX_INIT_DOXYGEN($PACKAGE_NAME, ${srcdir}/doc/application-api-guide/doxygen.cfg, ${builddir}/doc/application-api-guide/output) -########################################################################## -# Enable/disable Unit tests -########################################################################## -test_vald=no -AC_ARG_ENABLE([test_vald], - [ --enable-test-vald run test in test/validation], - [if test x$enableval = xyes; then - test_vald=yes - cunit_support=yes - fi]) - -AM_CONDITIONAL([test_vald], [test x$test_vald = xyes ]) - -########################################################################## -# Set optional CUnit path -########################################################################## -AC_ARG_WITH([cunit-path], -AC_HELP_STRING([--with-cunit-path=DIR path to CUnit libs and headers], - [(or in the default path if not specified).]), - [CUNIT_PATH=$withval - AM_CPPFLAGS="$AM_CPPFLAGS -I$CUNIT_PATH/include" - AM_LDFLAGS="$AM_LDFLAGS -L$CUNIT_PATH/lib" - cunit_support=yes],[]) ########################################################################## # Enable/disable ODP_DEBUG_PRINT @@ -210,21 +178,6 @@ LDFLAGS="$AM_LDFLAGS $LDFLAGS" CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS" ########################################################################## -# Check for CUnit availability -########################################################################## -if test x$cunit_support = xyes -then - AC_CHECK_LIB([cunit],[CU_get_error], [], - [AC_MSG_ERROR([CUnit libraries required])]) - AC_CHECK_HEADERS([CUnit/Basic.h], [], - [AC_MSG_FAILURE(["can't find cunit headers"])]) -else - cunit_support=no -fi - -AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ]) - -########################################################################## # Restore old saved variables ########################################################################## LDFLAGS=$OLD_LDFLAGS diff --git a/test/m4/configure.m4 b/test/m4/configure.m4 index 4e16b82..e5b291a 100644 --- a/test/m4/configure.m4 +++ b/test/m4/configure.m4 @@ -1,5 +1,6 @@ m4_include([test/m4/miscellaneous.m4]) m4_include([test/m4/performance.m4]) +m4_include([test/m4/validation.m4]) AC_CONFIG_FILES([test/Makefile test/miscellaneous/Makefile diff --git a/test/m4/validation.m4 b/test/m4/validation.m4 new file mode 100644 index 0000000..b137118 --- /dev/null +++ b/test/m4/validation.m4 @@ -0,0 +1,44 @@ +########################################################################## +# Enable/disable Unit tests +########################################################################## +cunit_support=no +test_vald=no +AC_ARG_ENABLE([test_vald], + [ --enable-test-vald run test in test/validation], + [if test x$enableval = xyes; then + test_vald=yes + cunit_support=yes + fi]) + +########################################################################## +# Enable/disable Unit tests +########################################################################## +AC_ARG_ENABLE([cunit_support], + [ --enable-cunit-support include cunit infrastructure], + [if test x$enableval = xyes; then + cunit_support=yes + fi]) + +########################################################################## +# Set optional CUnit path +########################################################################## +AC_ARG_WITH([cunit-path], +AC_HELP_STRING([--with-cunit-path=DIR path to CUnit libs and headers], + [(or in the default path if not specified).]), + [CUNIT_PATH=$withval + AM_CPPFLAGS="$AM_CPPFLAGS -I$CUNIT_PATH/include" + AM_LDFLAGS="$AM_LDFLAGS -L$CUNIT_PATH/lib" + cunit_support=yes],[]) + +########################################################################## +# Check for CUnit availability +########################################################################## +if test x$cunit_support = xyes +then + AC_CHECK_LIB([cunit],[CU_get_error], [], + [AC_MSG_ERROR([CUnit libraries required])]) + AC_CHECK_HEADERS([CUnit/Basic.h], [], + [AC_MSG_FAILURE(["can't find cunit headers"])]) +else + cunit_support=no +fi