From patchwork Fri Nov 13 11:15:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 56499 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp972603lbb; Fri, 13 Nov 2015 03:17:25 -0800 (PST) X-Received: by 10.50.30.101 with SMTP id r5mr2850395igh.35.1447413445277; Fri, 13 Nov 2015 03:17:25 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id k14si4850888igt.17.2015.11.13.03.17.24; Fri, 13 Nov 2015 03:17:25 -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 BBCEE61A4F; Fri, 13 Nov 2015 11:17:24 +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 7A67661FCF; Fri, 13 Nov 2015 11:16:25 +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 632E261A4F; Fri, 13 Nov 2015 11:16:07 +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 A0FF5610E1 for ; Fri, 13 Nov 2015 11:16:00 +0000 (UTC) Received: by wmww144 with SMTP id w144so25965992wmw.0 for ; Fri, 13 Nov 2015 03:15:59 -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=rURikI2Z0/lBML5CndtwbcdA42DqxLabBi8HwNEb+ms=; b=KwpeNmW/aUjDypro/aS/ROcAbWLdPmXlM/Sd32F+jMBC3bjtB7kDqolo/KvzrVqvNA 6gldHOqn01QyZmUtesDpdUxac+M0MefYFJxygr6uWaI0eLKuoSWEMrRY3T3vjOEIB/Md ZOGpoMqeEJMifIHmUhh4kaHoGFQ7tjQ3O0j/DYcOnQw1B1/vLBx9b0V8C4lLWUT4uK9E qiUew+OrtPYI2rT7ZmeM2GVgQvQeC4JtFzx95T4g44hTkW1VziXgvdBUFJUN4mlbGd/q 4moEb67IZZkjgyPvC+zpQ3TQFFZ+Ucmv2tv7ttG3SUR6aoLpeAjUgNF5rYe+2cXsxS+i Vk3Q== 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=rURikI2Z0/lBML5CndtwbcdA42DqxLabBi8HwNEb+ms=; b=VsamxcDC6mGFNisKTLDHTA3y2e4hht5wySafu+ruQyoVauIJDmngYX4fk7FIJ4tz9/ joFePnXzY3Fd5KJLf4NvGUGioL+ZsoTSWE3WbFBKagss2iRDMWT+CNk8UmtJZ0DX+6H5 GtgQ4SxKdHUOzSlPEFWjk2M0dyJkZrf7Tg0yboRrx9ZKnI+J4Fz1mAdPk1pGQDA6S3cs Dp2/GKNYxlEhBV462k0oRIlzaxioT53mkRuFrayvbl3nkjuxT3rpcyMSQPwINHwLMiHA uL9qzV6FtUV77Jln7NYThmL4HuAFz+osuHwYzcdQA2j2Oj+ZCYHdBA/Z/+hPj67Isn2j Fa3w== X-Gm-Message-State: ALoCoQmcufaADcpuRY849mMHBzfeR7TiUCLx1vYZOz/Bq0/Myzm15D3ceNWCP6vPdVoG1gzPQXLv X-Received: by 10.194.21.170 with SMTP id w10mr21376022wje.29.1447413359790; Fri, 13 Nov 2015 03:15:59 -0800 (PST) Received: from e106441.emea.arm.com ([2001:41d0:a:3cb4::abcd]) by smtp.gmail.com with ESMTPSA id lx4sm11075646wjb.5.2015.11.13.03.15.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Nov 2015 03:15:58 -0800 (PST) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Fri, 13 Nov 2015 11:15:12 +0000 Message-Id: <1447413314-24174-1-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 X-Topics: patch Subject: [lng-odp] [PATCH 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 05054df..6f814f4 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 @@ -361,6 +378,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)