From patchwork Tue Nov 24 13:34:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 57237 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp2091614lbb; Tue, 24 Nov 2015 05:36:29 -0800 (PST) X-Received: by 10.140.136.134 with SMTP id 128mr5346073qhi.16.1448372189212; Tue, 24 Nov 2015 05:36:29 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id b85si15806109qkb.51.2015.11.24.05.36.28; Tue, 24 Nov 2015 05:36:29 -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 B635961D3B; Tue, 24 Nov 2015 13:36:28 +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 09FFD61D37; Tue, 24 Nov 2015 13:35:51 +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 1349661D40; Tue, 24 Nov 2015 13:35:35 +0000 (UTC) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by lists.linaro.org (Postfix) with ESMTPS id 4C5A061CBC for ; Tue, 24 Nov 2015 13:35:27 +0000 (UTC) Received: by wmww144 with SMTP id w144so26659125wmw.0 for ; Tue, 24 Nov 2015 05:35:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=xvsPsv4ltq3ncDYfxxXUOjWKU9+2+sAWx94Voy1oO90=; b=tw9VT/GbJV/n1lbLxxZFJXXhp9CHhrIuuJiL1l4kuCSN0OqULlAZVuKMAxxHikrLBO NTIi6mWgTFiPswADvprjiRvlaXPBZnrKVRZkjeCI5RS+fDmsqnI5RnNIPh5RIL24gvgq 76XpbQWtkw2bULGojhj+rB2KhmTC5QkH1RIEdE9Y9i9P7sHQVc1WgHQ2fPjI6A7iPHXJ /WLc6aWo6FPAkNNljIsilpcELDad39vHICTjLQBOWrZNhdo19FcTWpwFtDABGXhaYmQr Q+c56TYb6sHDfi+d/LverhlW7leLNpE4JbNZyegJTdA21oUlBrXolSLd0fvtgL6WLndD ibOA== 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; bh=xvsPsv4ltq3ncDYfxxXUOjWKU9+2+sAWx94Voy1oO90=; b=BPXOzqZuiPRhDdcLYBP+Ug559EVMkQD1Bq8Qum7T3n85RKmrJOjtg/5lLdXZtbQXo2 mxifNO0JzQTQ9+1doAzppX7CLpYOlbyqUMFTTzyLVtiS4rRD0UDxB15Kx/V34/bIbdNI EWY+JFQ4hTbjiWkaksZfuhxbbgkkxB9fKipgSIK5KYlByFFmlhepkpkg7YZ47o5S0ep8 NcWNzL/NyZkdHWE1zZZ5NkrU2kFKH8kBqon5hjvYNu1sDATdQ9gn1oUSrS9OpyT/pAeO 7lmu40HWTOTpvUs1Ndy805lHJUGmnatSWvTHlFMj+LDlvVqJXU6IIUbdisyZpXUeV1OX tjig== X-Gm-Message-State: ALoCoQkhmt6/Avv6S300UsgXDpgPUgEg+ODJ3oNSy7eUqYjqpWLG1op4XzRz9eL5Ogz2/Hz9ZLCe X-Received: by 10.28.128.210 with SMTP id b201mr24341136wmd.69.1448372126377; Tue, 24 Nov 2015 05:35:26 -0800 (PST) Received: from e106441.emea.arm.com ([2001:41d0:a:3cb4::abcd]) by smtp.gmail.com with ESMTPSA id cw3sm18266738wjb.26.2015.11.24.05.35.25 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Nov 2015 05:35:25 -0800 (PST) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Tue, 24 Nov 2015 13:34:59 +0000 Message-Id: <1448372101-27580-1-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 X-Topics: patch Subject: [lng-odp] [PATCHv3 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 Reviewed-by: Anders Roxell --- Change since v2 - fix default testdir path on RPM based systems. configure.ac | 14 ++++++++++++++ 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, 37 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index be21eaf..bcddacb 100644 --- a/configure.ac +++ b/configure.ac @@ -113,6 +113,19 @@ 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 + testdir=$libdir/odp/tests + else + testdir=$withval + fi], []) +AC_SUBST([testdir]) +AM_CONDITIONAL([test_installdir], [test "$testdir" != ""]) + +########################################################################## # Enable/disable Unit tests ########################################################################## cunit_support=no @@ -383,6 +396,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)