From patchwork Wed Mar 23 18:37: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: 64260 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp203985lbc; Wed, 23 Mar 2016 11:52:19 -0700 (PDT) X-Received: by 10.50.32.70 with SMTP id g6mr3572950igi.57.1458759139355; Wed, 23 Mar 2016 11:52:19 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id vf8si22715912igb.37.2016.03.23.11.52.18; Wed, 23 Mar 2016 11:52:19 -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 Received: by lists.linaro.org (Postfix, from userid 109) id B0CC461787; Wed, 23 Mar 2016 18:52:18 +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 0D7B9617DA; Wed, 23 Mar 2016 18:46:16 +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 7AB1B61835; Wed, 23 Mar 2016 18:46:09 +0000 (UTC) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176]) by lists.linaro.org (Postfix) with ESMTPS id 03AED617D5 for ; Wed, 23 Mar 2016 18:44:56 +0000 (UTC) Received: by mail-lb0-f176.google.com with SMTP id qe11so15882246lbc.3 for ; Wed, 23 Mar 2016 11:44:55 -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=4jfIqYzMzpW7XMPAtQTQ7O7IgJ4miRIRn/8yQL9sfAc=; b=AWSj5ylU27fbDg6UC2Kj3Huy7gnigYO9VP44pQGQWNVm9Kv9wq6pMa4qnI8b5ZGemU JatDAKEKlLH9IvLfABR46KdiA0C8YWCllvUOav+Lq+25xntmdBqw4fPN24LS7Ip4TAty +pjTgNp/O3pS82pnbwhxMBtWAZcCStX3+SQa/qPyfyMzYKHcBT6lhwKbIzK8pTCG8KRR Z7Z0An2cd9BZUJtAODdlR//pwvVGU9aBL3Z9Ym3SNB4jB+zmmT8GkexXXMRdSkf59bFT a14+oz/dJSTUzi+xQsIfZK463hbFiLNGFXo1f60eYaKqXF4TgYPYgk+Y3ROAojpadDZl 9pBw== X-Gm-Message-State: AD7BkJIJrxySt+nAl4Dtpy2kKAB2zvEC4IISKz+HQUIm5R5Q3kYaoutd7rZX5vYA2/xDiB9psHw= X-Received: by 10.112.151.207 with SMTP id us15mr1586636lbb.28.1458758694852; Wed, 23 Mar 2016 11:44:54 -0700 (PDT) Received: from localhost (c-c82171d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.113.33.200]) by smtp.gmail.com with ESMTPSA id xx7sm577510lbb.19.2016.03.23.11.44.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Mar 2016 11:44:54 -0700 (PDT) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Wed, 23 Mar 2016 19:37:33 +0100 Message-Id: <1458758254-4703-10-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1458758254-4703-1-git-send-email-anders.roxell@linaro.org> References: <1458758254-4703-1-git-send-email-anders.roxell@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 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 1a47e01..1738e73 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([dpdk_support], [test x$dpdk_support = xyes ]) @@ -141,6 +130,8 @@ AM_CONDITIONAL([netmap_support], [test x$netmap_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