diff mbox

[v4] configure.ac: performance: add tests to make check

Message ID 1421983439-10753-1-git-send-email-mike.holmes@linaro.org
State Accepted
Commit e11e595854d8f0afff3cd3268043b14f929f6d02
Headers show

Commit Message

Mike Holmes Jan. 23, 2015, 3:23 a.m. UTC
Allow the test/performance directory to be optionally included when make
check is run

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
v5 remove accidential comments left in

 configure.ac                 | 37 ++++++++++++++++++++++++++++++++-----
 test/Makefile.am             |  6 +++++-
 test/performance/.gitignore  |  2 ++
 test/performance/Makefile.am |  5 +++++
 test/validation/Makefile.am  |  5 +++--
 5 files changed, 47 insertions(+), 8 deletions(-)

Comments

Maxim Uvarov Jan. 23, 2015, 9:37 a.m. UTC | #1
v4 looks good for me now. I think if only my comment was solved from 
prev version this patch can go in today
to be in next release.

Maxim.

On 01/23/2015 06:23 AM, Mike Holmes wrote:
> Allow the test/performance directory to be optionally included when make
> check is run
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
> v5 remove accidential comments left in
that is v4, I think you pressed wrong button when added changes.
>
>   configure.ac                 | 37 ++++++++++++++++++++++++++++++++-----
>   test/Makefile.am             |  6 +++++-
>   test/performance/.gitignore  |  2 ++
>   test/performance/Makefile.am |  5 +++++
>   test/validation/Makefile.am  |  5 +++--
>   5 files changed, 47 insertions(+), 8 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 39610ee..2934791 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -65,21 +65,47 @@ AC_SUBST(SDK_INSTALL_PATH)
>   
>   AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"])
>   
> +##########################################################################
> +# 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])
> +
>   
>   ##########################################################################
>   # Enable/disable Unit tests
>   ##########################################################################
> -AC_ARG_ENABLE([cunit],
> -    [  --enable-cunit         Enable/disable cunit],
> +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 ])
> +
> +##########################################################################
> +# Enable/disable test-perf
> +##########################################################################
> +test_perf=no
> +AC_ARG_ENABLE([test-perf],
> +    [  --enable-test-perf      run test in test/performance],
> +    [if test "x$enableval" = "xyes"; then
> +        test_perf=yes
> +    fi])
> +
> +AM_CONDITIONAL([test_perf], [test x$test_perf = xyes ])
> +
>   ##########################################################################
>   # Set optional CUnit path
>   ##########################################################################
>   AC_ARG_WITH([cunit-path],
> -AC_HELP_STRING([--with-cunit-path=DIR Path to Cunit libs and headers],
> +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"
> @@ -162,7 +188,7 @@ else
>       cunit_support=no
>   fi
>   
> -AM_CONDITIONAL([ODP_CUNIT_ENABLED], [test x$cunit_support = xyes ])
> +AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ])
>   
>   ##########################################################################
>   # Check for OpenSSL availability
> @@ -226,7 +252,6 @@ AC_SUBST([LDFLAGS])
>   AC_OUTPUT
>   AC_MSG_RESULT([
>   	$PACKAGE $VERSION
> -	========
>   
>   	with_platform:		${with_platform}
>   	prefix:			${prefix}
> @@ -243,4 +268,6 @@ AC_MSG_RESULT([
>   	am_ldflags:		${AM_LDFLAGS}
>   	libs:			${LIBS}
>   	cunit:			${cunit_support}
> +	test_vald:		${test_vald}
> +	test_perf:		${test_perf}
>   ])
> diff --git a/test/Makefile.am b/test/Makefile.am
> index afaa1d0..ec2b248 100644
> --- a/test/Makefile.am
> +++ b/test/Makefile.am
> @@ -1 +1,5 @@
> -SUBDIRS = api_test validation performance
> +SUBDIRS = api_test performance
> +
> +if cunit_support
> +    SUBDIRS += validation
> +endif
> diff --git a/test/performance/.gitignore b/test/performance/.gitignore
> index a229e10..9ccb102 100644
> --- a/test/performance/.gitignore
> +++ b/test/performance/.gitignore
> @@ -1 +1,3 @@
> +*.log
> +*.trs
>   odp_scheduling
> diff --git a/test/performance/Makefile.am b/test/performance/Makefile.am
> index 359c4f0..8b2e0e2 100644
> --- a/test/performance/Makefile.am
> +++ b/test/performance/Makefile.am
> @@ -1,5 +1,10 @@
>   include $(top_srcdir)/test/Makefile.inc
>   
> +if test_perf
> +TESTS = odp_scheduling
> +check_PROGRAMS = ${bin_PROGRAMS}
> +endif
> +
>   bin_PROGRAMS = odp_scheduling
>   odp_scheduling_LDFLAGS = $(AM_LDFLAGS) -static
>   odp_scheduling_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
> diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
> index 400d758..0f5799c 100644
> --- a/test/validation/Makefile.am
> +++ b/test/validation/Makefile.am
> @@ -5,13 +5,14 @@ AM_LDFLAGS += -static
>   
>   TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
>   
> -if ODP_CUNIT_ENABLED
> +if test_vald
>   TESTS = odp_init odp_queue odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer odp_system odp_timer odp_time odp_synchronizers
>   check_PROGRAMS = ${bin_PROGRAMS}
> +endif
> +
>   bin_PROGRAMS = odp_init odp_queue odp_crypto odp_shm odp_schedule odp_pktio odp_buffer odp_system odp_timer odp_time odp_synchronizers
>   odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
>   odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer
> -endif
>   
>   dist_odp_init_SOURCES = odp_init.c
>   dist_odp_pktio_SOURCES = odp_pktio.c common/odp_cunit_common.c
Maxim Uvarov Jan. 23, 2015, 3:59 p.m. UTC | #2
Merged.

Maxim.

On 01/23/2015 06:23 AM, Mike Holmes wrote:
> Allow the test/performance directory to be optionally included when make
> check is run
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
> v5 remove accidential comments left in
>
>   configure.ac                 | 37 ++++++++++++++++++++++++++++++++-----
>   test/Makefile.am             |  6 +++++-
>   test/performance/.gitignore  |  2 ++
>   test/performance/Makefile.am |  5 +++++
>   test/validation/Makefile.am  |  5 +++--
>   5 files changed, 47 insertions(+), 8 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 39610ee..2934791 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -65,21 +65,47 @@ AC_SUBST(SDK_INSTALL_PATH)
>   
>   AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"])
>   
> +##########################################################################
> +# 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])
> +
>   
>   ##########################################################################
>   # Enable/disable Unit tests
>   ##########################################################################
> -AC_ARG_ENABLE([cunit],
> -    [  --enable-cunit         Enable/disable cunit],
> +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 ])
> +
> +##########################################################################
> +# Enable/disable test-perf
> +##########################################################################
> +test_perf=no
> +AC_ARG_ENABLE([test-perf],
> +    [  --enable-test-perf      run test in test/performance],
> +    [if test "x$enableval" = "xyes"; then
> +        test_perf=yes
> +    fi])
> +
> +AM_CONDITIONAL([test_perf], [test x$test_perf = xyes ])
> +
>   ##########################################################################
>   # Set optional CUnit path
>   ##########################################################################
>   AC_ARG_WITH([cunit-path],
> -AC_HELP_STRING([--with-cunit-path=DIR Path to Cunit libs and headers],
> +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"
> @@ -162,7 +188,7 @@ else
>       cunit_support=no
>   fi
>   
> -AM_CONDITIONAL([ODP_CUNIT_ENABLED], [test x$cunit_support = xyes ])
> +AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ])
>   
>   ##########################################################################
>   # Check for OpenSSL availability
> @@ -226,7 +252,6 @@ AC_SUBST([LDFLAGS])
>   AC_OUTPUT
>   AC_MSG_RESULT([
>   	$PACKAGE $VERSION
> -	========
>   
>   	with_platform:		${with_platform}
>   	prefix:			${prefix}
> @@ -243,4 +268,6 @@ AC_MSG_RESULT([
>   	am_ldflags:		${AM_LDFLAGS}
>   	libs:			${LIBS}
>   	cunit:			${cunit_support}
> +	test_vald:		${test_vald}
> +	test_perf:		${test_perf}
>   ])
> diff --git a/test/Makefile.am b/test/Makefile.am
> index afaa1d0..ec2b248 100644
> --- a/test/Makefile.am
> +++ b/test/Makefile.am
> @@ -1 +1,5 @@
> -SUBDIRS = api_test validation performance
> +SUBDIRS = api_test performance
> +
> +if cunit_support
> +    SUBDIRS += validation
> +endif
> diff --git a/test/performance/.gitignore b/test/performance/.gitignore
> index a229e10..9ccb102 100644
> --- a/test/performance/.gitignore
> +++ b/test/performance/.gitignore
> @@ -1 +1,3 @@
> +*.log
> +*.trs
>   odp_scheduling
> diff --git a/test/performance/Makefile.am b/test/performance/Makefile.am
> index 359c4f0..8b2e0e2 100644
> --- a/test/performance/Makefile.am
> +++ b/test/performance/Makefile.am
> @@ -1,5 +1,10 @@
>   include $(top_srcdir)/test/Makefile.inc
>   
> +if test_perf
> +TESTS = odp_scheduling
> +check_PROGRAMS = ${bin_PROGRAMS}
> +endif
> +
>   bin_PROGRAMS = odp_scheduling
>   odp_scheduling_LDFLAGS = $(AM_LDFLAGS) -static
>   odp_scheduling_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
> diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
> index 400d758..0f5799c 100644
> --- a/test/validation/Makefile.am
> +++ b/test/validation/Makefile.am
> @@ -5,13 +5,14 @@ AM_LDFLAGS += -static
>   
>   TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
>   
> -if ODP_CUNIT_ENABLED
> +if test_vald
>   TESTS = odp_init odp_queue odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer odp_system odp_timer odp_time odp_synchronizers
>   check_PROGRAMS = ${bin_PROGRAMS}
> +endif
> +
>   bin_PROGRAMS = odp_init odp_queue odp_crypto odp_shm odp_schedule odp_pktio odp_buffer odp_system odp_timer odp_time odp_synchronizers
>   odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
>   odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer
> -endif
>   
>   dist_odp_init_SOURCES = odp_init.c
>   dist_odp_pktio_SOURCES = odp_pktio.c common/odp_cunit_common.c
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 39610ee..2934791 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,21 +65,47 @@  AC_SUBST(SDK_INSTALL_PATH)
 
 AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"])
 
+##########################################################################
+# 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])
+
 
 ##########################################################################
 # Enable/disable Unit tests
 ##########################################################################
-AC_ARG_ENABLE([cunit],
-    [  --enable-cunit         Enable/disable cunit],
+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 ])
+
+##########################################################################
+# Enable/disable test-perf
+##########################################################################
+test_perf=no
+AC_ARG_ENABLE([test-perf],
+    [  --enable-test-perf      run test in test/performance],
+    [if test "x$enableval" = "xyes"; then
+        test_perf=yes
+    fi])
+
+AM_CONDITIONAL([test_perf], [test x$test_perf = xyes ])
+
 ##########################################################################
 # Set optional CUnit path
 ##########################################################################
 AC_ARG_WITH([cunit-path],
-AC_HELP_STRING([--with-cunit-path=DIR Path to Cunit libs and headers],
+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"
@@ -162,7 +188,7 @@  else
     cunit_support=no
 fi
 
-AM_CONDITIONAL([ODP_CUNIT_ENABLED], [test x$cunit_support = xyes ])
+AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ])
 
 ##########################################################################
 # Check for OpenSSL availability
@@ -226,7 +252,6 @@  AC_SUBST([LDFLAGS])
 AC_OUTPUT
 AC_MSG_RESULT([
 	$PACKAGE $VERSION
-	========
 
 	with_platform:		${with_platform}
 	prefix:			${prefix}
@@ -243,4 +268,6 @@  AC_MSG_RESULT([
 	am_ldflags:		${AM_LDFLAGS}
 	libs:			${LIBS}
 	cunit:			${cunit_support}
+	test_vald:		${test_vald}
+	test_perf:		${test_perf}
 ])
diff --git a/test/Makefile.am b/test/Makefile.am
index afaa1d0..ec2b248 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1 +1,5 @@ 
-SUBDIRS = api_test validation performance
+SUBDIRS = api_test performance
+
+if cunit_support
+    SUBDIRS += validation
+endif
diff --git a/test/performance/.gitignore b/test/performance/.gitignore
index a229e10..9ccb102 100644
--- a/test/performance/.gitignore
+++ b/test/performance/.gitignore
@@ -1 +1,3 @@ 
+*.log
+*.trs
 odp_scheduling
diff --git a/test/performance/Makefile.am b/test/performance/Makefile.am
index 359c4f0..8b2e0e2 100644
--- a/test/performance/Makefile.am
+++ b/test/performance/Makefile.am
@@ -1,5 +1,10 @@ 
 include $(top_srcdir)/test/Makefile.inc
 
+if test_perf
+TESTS = odp_scheduling
+check_PROGRAMS = ${bin_PROGRAMS}
+endif
+
 bin_PROGRAMS = odp_scheduling
 odp_scheduling_LDFLAGS = $(AM_LDFLAGS) -static
 odp_scheduling_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
index 400d758..0f5799c 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -5,13 +5,14 @@  AM_LDFLAGS += -static
 
 TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
 
-if ODP_CUNIT_ENABLED
+if test_vald
 TESTS = odp_init odp_queue odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer odp_system odp_timer odp_time odp_synchronizers
 check_PROGRAMS = ${bin_PROGRAMS}
+endif
+
 bin_PROGRAMS = odp_init odp_queue odp_crypto odp_shm odp_schedule odp_pktio odp_buffer odp_system odp_timer odp_time odp_synchronizers
 odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
 odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer
-endif
 
 dist_odp_init_SOURCES = odp_init.c
 dist_odp_pktio_SOURCES = odp_pktio.c common/odp_cunit_common.c