From patchwork Thu Nov 19 12:25:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 56989 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp3147868lbb; Thu, 19 Nov 2015 04:26:50 -0800 (PST) X-Received: by 10.55.18.40 with SMTP id c40mr6426672qkh.99.1447936010270; Thu, 19 Nov 2015 04:26:50 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id a62si6474335qka.76.2015.11.19.04.26.49; Thu, 19 Nov 2015 04:26:50 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: by lists.linaro.org (Postfix, from userid 109) id C73DB61A32; Thu, 19 Nov 2015 12:26:49 +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=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID,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 0956961A2B; Thu, 19 Nov 2015 12:25:50 +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 0E0CF61B1F; Thu, 19 Nov 2015 12:25:32 +0000 (UTC) Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by lists.linaro.org (Postfix) with ESMTPS id 760126193B for ; Thu, 19 Nov 2015 12:25:25 +0000 (UTC) Received: by wmww144 with SMTP id w144so236318201wmw.1 for ; Thu, 19 Nov 2015 04:25:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=dvw0ZF+bxLIyy5Qmdo+aGnUJC5LusYDJVFbV+ryVUn4=; b=FGUlqVR8a8g8Pbc8yv7h8VifWd2HEEQr6rzyLz1PVEZExTl0MpE8+JXa38vJW6/A7k XSCYfIGGHZaOadDjXpLjYcUVR6TkDvHJlVEF20Ew+vSV1tnlxTlQLh3yiwQPjIne0tyE UQBgWWGTLYIajaUzvIlSJEY3MEKVOnmbTbLYzdU0dgF0eMpM2hPv3BQjqYE+ytoW3N6v FsC9Ae6DGV2VVqnteW+mreEQgSYdlAJFU2FAAjMRq+g+jE45M9MHDFiXRIj4jQQmIUaO JAYeBR2e0RGg9yJWU9ljD8AwCTyVhCRkYhYuo8Zj4dFIyECpBiJzSqf1i4CQmoxaELfM pgOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=dvw0ZF+bxLIyy5Qmdo+aGnUJC5LusYDJVFbV+ryVUn4=; b=JNolbVqtHJmcMOYoTIZBXdLsk+tJO5xv+TIQmwXZMbtpK7HKR7vNASmQaWlbaBzW4G aFwa4KqMJQueE66XeXof8pYESgQvYVIzQQ28yM1GHYMU0vAE7dC+PG+RTsFIhOXy8Py8 gyTvM2c5A+Z8HKUqtdzBCFDwa+9DUI95Ww/UN6cBITFFEdYLOF/iwQTQMiesJ1DLM9jk Cq2QdAqu/WrIp09YaiHMeUFBFcmzNJ3NDz/1fjra33X52+36JDu27g+QhmW5U4ClGOAD jOiEaDOmjo2xrbUj33WV7wUxO0xPZwc1RkwSCAgrRkY9kjQ4ZctQljDpPESbUYWGd/yf ODKA== X-Gm-Message-State: ALoCoQnD5dAPGOfXHV9433ymyFBSoZSLQgJZ3+yHcatgfNP3cOOUYEQxKTyA+i06OsrxK+VoF/v8 X-Received: by 10.28.133.4 with SMTP id h4mr9660936wmd.59.1447935924648; Thu, 19 Nov 2015 04:25:24 -0800 (PST) Received: from e106441.emea.arm.com ([2001:41d0:a:3cb4::abcd]) by smtp.gmail.com with ESMTPSA id he3sm7693662wjc.25.2015.11.19.04.25.23 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Nov 2015 04:25:24 -0800 (PST) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Thu, 19 Nov 2015 12:25:08 +0000 Message-Id: <1447935910-5961-1-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 X-Topics: patch Subject: [lng-odp] [PATCHv2 1/3] validation: ability to specify test install directory 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" Previously if a build had been configured with validation tests enabled (--enable-test-vald) a subsequent "make install" would install the test binaries and scripts into /usr/local/bin without any way of separating them from the rest of the installed artefacts. This patch changes the default behaviour to not install test binaries or scripts and adds a configure parameter (--with-testdir) to explicitly enable installation. These changes are required in order to be able to package the tests separately (e.g. in OpenEmbedded) and also to enable post-install testing. Signed-off-by: Stuart Haslam --- configure.ac | 18 ++++++++++++++++++ platform/linux-generic/test/pktio/Makefile.am | 8 +++++--- test/validation/buffer/Makefile.am | 2 +- test/validation/classification/Makefile.am | 2 +- test/validation/cpumask/Makefile.am | 2 +- test/validation/crypto/Makefile.am | 2 +- test/validation/errno/Makefile.am | 2 +- test/validation/init/Makefile.am | 2 +- test/validation/packet/Makefile.am | 2 +- test/validation/pktio/Makefile.am | 2 +- test/validation/pool/Makefile.am | 2 +- test/validation/queue/Makefile.am | 2 +- test/validation/random/Makefile.am | 2 +- test/validation/scheduler/Makefile.am | 2 +- test/validation/shmem/Makefile.am | 2 +- test/validation/synchronizers/Makefile.am | 2 +- test/validation/system/Makefile.am | 2 +- test/validation/thread/Makefile.am | 2 +- test/validation/time/Makefile.am | 2 +- test/validation/timer/Makefile.am | 2 +- 20 files changed, 41 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index be21eaf..f658c07 100644 --- a/configure.ac +++ b/configure.ac @@ -113,6 +113,23 @@ AC_SUBST(SDK_INSTALL_PATH) AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"]) ########################################################################## +# Set the install directory for test binaries/scripts +########################################################################## +AC_ARG_WITH([testdir], + AC_HELP_STRING([--with-testdir=DIR installation directory for tests]), + [if test "$withval" = "yes"; then + if test "$prefix" = "NONE"; then + testdir=$ac_default_prefix/lib/odp/tests + else + testdir=$prefix/lib/odp/tests + fi + else + testdir=$withval + fi], []) +AC_SUBST([testdir]) +AM_CONDITIONAL([test_installdir], [test "$testdir" != ""]) + +########################################################################## # Enable/disable Unit tests ########################################################################## cunit_support=no @@ -383,6 +400,7 @@ AC_MSG_RESULT([ sysconfdir: ${sysconfdir} libdir: ${libdir} includedir: ${includedir} + testdir: ${testdir} cc: ${CC} cppflags: ${CPPFLAGS} diff --git a/platform/linux-generic/test/pktio/Makefile.am b/platform/linux-generic/test/pktio/Makefile.am index 6fe2013..4d39372 100644 --- a/platform/linux-generic/test/pktio/Makefile.am +++ b/platform/linux-generic/test/pktio/Makefile.am @@ -1,6 +1,8 @@ -dist_bin_SCRIPTS = pktio_env \ - pktio_run +dist_check_SCRIPTS = pktio_env \ + pktio_run if HAVE_PCAP -dist_bin_SCRIPTS += pktio_run_pcap +dist_check_SCRIPTS += pktio_run_pcap endif + +test_SCRIPTS = $(dist_check_SCRIPTS) diff --git a/test/validation/buffer/Makefile.am b/test/validation/buffer/Makefile.am index 3f92c3e..add2a34 100644 --- a/test/validation/buffer/Makefile.am +++ b/test/validation/buffer/Makefile.am @@ -3,7 +3,7 @@ include ../Makefile.inc noinst_LTLIBRARIES = libtestbuffer.la libtestbuffer_la_SOURCES = buffer.c -bin_PROGRAMS = buffer_main$(EXEEXT) +test_PROGRAMS = buffer_main$(EXEEXT) dist_buffer_main_SOURCES = buffer_main.c buffer_main_LDADD = libtestbuffer.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/classification/Makefile.am b/test/validation/classification/Makefile.am index 4235309..df382c5 100644 --- a/test/validation/classification/Makefile.am +++ b/test/validation/classification/Makefile.am @@ -7,7 +7,7 @@ libtestclassification_la_SOURCES = odp_classification_basic.c \ odp_classification_common.c \ classification.c -bin_PROGRAMS = classification_main$(EXEEXT) +test_PROGRAMS = classification_main$(EXEEXT) dist_classification_main_SOURCES = classification_main.c classification_main_LDADD = libtestclassification.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/cpumask/Makefile.am b/test/validation/cpumask/Makefile.am index 7a9c560..ec5fce3 100644 --- a/test/validation/cpumask/Makefile.am +++ b/test/validation/cpumask/Makefile.am @@ -4,7 +4,7 @@ noinst_LTLIBRARIES = libtestcpumask.la libtestcpumask_la_SOURCES = cpumask.c libtestcpumask_la_LIBADD = $(LIBCPUMASK_COMMON) -bin_PROGRAMS = cpumask_main$(EXEEXT) +test_PROGRAMS = cpumask_main$(EXEEXT) dist_cpumask_main_SOURCES = cpumask_main.c cpumask_main_LDADD = libtestcpumask.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/crypto/Makefile.am b/test/validation/crypto/Makefile.am index a555ee2..3ea41b4 100644 --- a/test/validation/crypto/Makefile.am +++ b/test/validation/crypto/Makefile.am @@ -4,7 +4,7 @@ noinst_LTLIBRARIES = libtestcrypto.la libtestcrypto_la_SOURCES = crypto.c \ odp_crypto_test_inp.c -bin_PROGRAMS = crypto_main$(EXEEXT) +test_PROGRAMS = crypto_main$(EXEEXT) dist_crypto_main_SOURCES = crypto_main.c crypto_main_LDADD = libtestcrypto.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/errno/Makefile.am b/test/validation/errno/Makefile.am index f86b673..a24275d 100644 --- a/test/validation/errno/Makefile.am +++ b/test/validation/errno/Makefile.am @@ -3,7 +3,7 @@ include ../Makefile.inc noinst_LTLIBRARIES = libtesterrno.la libtesterrno_la_SOURCES = errno.c -bin_PROGRAMS = errno_main$(EXEEXT) +test_PROGRAMS = errno_main$(EXEEXT) dist_errno_main_SOURCES = errno_main.c errno_main_LDADD = libtesterrno.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/init/Makefile.am b/test/validation/init/Makefile.am index a030aa0..0793e64 100644 --- a/test/validation/init/Makefile.am +++ b/test/validation/init/Makefile.am @@ -5,7 +5,7 @@ libtestinit_la_SOURCES = init.c # most platforms are expected not to support multiple ODP inits # following each other: therefore 3 separate binaries are # created, each containing its ODP init test. -bin_PROGRAMS = init_main_abort$(EXEEXT) init_main_log$(EXEEXT) init_main_ok$(EXEEXT) +test_PROGRAMS = init_main_abort$(EXEEXT) init_main_log$(EXEEXT) init_main_ok$(EXEEXT) dist_init_main_abort_SOURCES = init_main_abort.c dist_init_main_log_SOURCES = init_main_log.c dist_init_main_ok_SOURCES = init_main_ok.c diff --git a/test/validation/packet/Makefile.am b/test/validation/packet/Makefile.am index 3d6e3c0..d8ebc1a 100644 --- a/test/validation/packet/Makefile.am +++ b/test/validation/packet/Makefile.am @@ -3,7 +3,7 @@ include ../Makefile.inc noinst_LTLIBRARIES = libtestpacket.la libtestpacket_la_SOURCES = packet.c -bin_PROGRAMS = packet_main$(EXEEXT) +test_PROGRAMS = packet_main$(EXEEXT) dist_packet_main_SOURCES = packet_main.c packet_main_LDADD = libtestpacket.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/pktio/Makefile.am b/test/validation/pktio/Makefile.am index 9fbf456..466d690 100644 --- a/test/validation/pktio/Makefile.am +++ b/test/validation/pktio/Makefile.am @@ -3,7 +3,7 @@ include ../Makefile.inc noinst_LTLIBRARIES = libtestpktio.la libtestpktio_la_SOURCES = pktio.c -bin_PROGRAMS = pktio_main$(EXEEXT) +test_PROGRAMS = pktio_main$(EXEEXT) dist_pktio_main_SOURCES = pktio_main.c pktio_main_LDADD = libtestpktio.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/pool/Makefile.am b/test/validation/pool/Makefile.am index 4f434e9..1eb8d71 100644 --- a/test/validation/pool/Makefile.am +++ b/test/validation/pool/Makefile.am @@ -3,7 +3,7 @@ include ../Makefile.inc noinst_LTLIBRARIES = libtestpool.la libtestpool_la_SOURCES = pool.c -bin_PROGRAMS = pool_main$(EXEEXT) +test_PROGRAMS = pool_main$(EXEEXT) dist_pool_main_SOURCES = pool_main.c pool_main_LDADD = libtestpool.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/queue/Makefile.am b/test/validation/queue/Makefile.am index af01b70..a477e3c 100644 --- a/test/validation/queue/Makefile.am +++ b/test/validation/queue/Makefile.am @@ -3,7 +3,7 @@ include ../Makefile.inc noinst_LTLIBRARIES = libtestqueue.la libtestqueue_la_SOURCES = queue.c -bin_PROGRAMS = queue_main$(EXEEXT) +test_PROGRAMS = queue_main$(EXEEXT) dist_queue_main_SOURCES = queue_main.c queue_main_LDADD = libtestqueue.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/random/Makefile.am b/test/validation/random/Makefile.am index 3037e7a..69259a4 100644 --- a/test/validation/random/Makefile.am +++ b/test/validation/random/Makefile.am @@ -3,7 +3,7 @@ include ../Makefile.inc noinst_LTLIBRARIES = libtestrandom.la libtestrandom_la_SOURCES = random.c -bin_PROGRAMS = random_main$(EXEEXT) +test_PROGRAMS = random_main$(EXEEXT) dist_random_main_SOURCES = random_main.c random_main_LDADD = libtestrandom.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/scheduler/Makefile.am b/test/validation/scheduler/Makefile.am index a180fc3..2555cab 100644 --- a/test/validation/scheduler/Makefile.am +++ b/test/validation/scheduler/Makefile.am @@ -3,7 +3,7 @@ include ../Makefile.inc noinst_LTLIBRARIES = libtestscheduler.la libtestscheduler_la_SOURCES = scheduler.c -bin_PROGRAMS = scheduler_main$(EXEEXT) +test_PROGRAMS = scheduler_main$(EXEEXT) dist_scheduler_main_SOURCES = scheduler_main.c scheduler_main_LDADD = libtestscheduler.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/shmem/Makefile.am b/test/validation/shmem/Makefile.am index 6d1f324..da88af6 100644 --- a/test/validation/shmem/Makefile.am +++ b/test/validation/shmem/Makefile.am @@ -3,7 +3,7 @@ include ../Makefile.inc noinst_LTLIBRARIES = libtestshmem.la libtestshmem_la_SOURCES = shmem.c -bin_PROGRAMS = shmem_main$(EXEEXT) +test_PROGRAMS = shmem_main$(EXEEXT) dist_shmem_main_SOURCES = shmem_main.c shmem_main_LDADD = libtestshmem.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/synchronizers/Makefile.am b/test/validation/synchronizers/Makefile.am index 96f98b5..dd504d5 100644 --- a/test/validation/synchronizers/Makefile.am +++ b/test/validation/synchronizers/Makefile.am @@ -3,7 +3,7 @@ include ../Makefile.inc noinst_LTLIBRARIES = libtestsynchronizers.la libtestsynchronizers_la_SOURCES = synchronizers.c -bin_PROGRAMS = synchronizers_main$(EXEEXT) +test_PROGRAMS = synchronizers_main$(EXEEXT) dist_synchronizers_main_SOURCES = synchronizers_main.c synchronizers_main_LDADD = libtestsynchronizers.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/system/Makefile.am b/test/validation/system/Makefile.am index 110d049..3789c36 100644 --- a/test/validation/system/Makefile.am +++ b/test/validation/system/Makefile.am @@ -3,7 +3,7 @@ include ../Makefile.inc noinst_LTLIBRARIES = libtestsystem.la libtestsystem_la_SOURCES = system.c -bin_PROGRAMS = system_main$(EXEEXT) +test_PROGRAMS = system_main$(EXEEXT) dist_system_main_SOURCES = system_main.c system_main_LDADD = libtestsystem.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/thread/Makefile.am b/test/validation/thread/Makefile.am index afe2828..eaf680c 100644 --- a/test/validation/thread/Makefile.am +++ b/test/validation/thread/Makefile.am @@ -5,7 +5,7 @@ libtestthread_la_SOURCES = thread.c libtestthread_la_CFLAGS = $(AM_CFLAGS) -DTEST_THRMASK libtestthread_la_LIBADD = $(LIBTHRMASK_COMMON) -bin_PROGRAMS = thread_main$(EXEEXT) +test_PROGRAMS = thread_main$(EXEEXT) dist_thread_main_SOURCES = thread_main.c thread_main_LDADD = libtestthread.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/time/Makefile.am b/test/validation/time/Makefile.am index da6c13b..bf2d026 100644 --- a/test/validation/time/Makefile.am +++ b/test/validation/time/Makefile.am @@ -3,7 +3,7 @@ include ../Makefile.inc noinst_LTLIBRARIES = libtesttime.la libtesttime_la_SOURCES = time.c -bin_PROGRAMS = time_main$(EXEEXT) +test_PROGRAMS = time_main$(EXEEXT) dist_time_main_SOURCES = time_main.c time_main_LDADD = libtesttime.la $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/timer/Makefile.am b/test/validation/timer/Makefile.am index 78bbc9f..fe6872f 100644 --- a/test/validation/timer/Makefile.am +++ b/test/validation/timer/Makefile.am @@ -3,7 +3,7 @@ include ../Makefile.inc noinst_LTLIBRARIES = libtesttimer.la libtesttimer_la_SOURCES = timer.c -bin_PROGRAMS = timer_main$(EXEEXT) +test_PROGRAMS = timer_main$(EXEEXT) dist_timer_main_SOURCES = timer_main.c timer_main_LDADD = libtesttimer.la $(LIBCUNIT_COMMON) $(LIBODP)