diff mbox

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

Message ID 1420742059-7699-2-git-send-email-mike.holmes@linaro.org
State Superseded
Headers show

Commit Message

Mike Holmes Jan. 8, 2015, 6:34 p.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>
---
 configure.ac                 | 37 ++++++++++++++++++++++++++++++++-----
 test/performance/.gitignore  |  2 ++
 test/performance/Makefile.am |  5 +++++
 test/validation/Makefile.am  |  5 ++++-
 4 files changed, 43 insertions(+), 6 deletions(-)

Comments

Mike Holmes Jan. 12, 2015, 9:16 p.m. UTC | #1
Ping

On 8 January 2015 at 13:34, Mike Holmes <mike.holmes@linaro.org> wrote:

> Allow the test/performance directory to be optionally included when make
> check is run
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>  configure.ac                 | 37 ++++++++++++++++++++++++++++++++-----
>  test/performance/.gitignore  |  2 ++
>  test/performance/Makefile.am |  5 +++++
>  test/validation/Makefile.am  |  5 ++++-
>  4 files changed, 43 insertions(+), 6 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 440cc63..dbabb20 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -60,21 +60,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_val=no
> +AC_ARG_ENABLE([test_val],
> +    [  --enable-test-val       run test in test/validation],
>      [if test x$enableval = xyes; then
> +        test_val=yes
>          cunit_support=yes
>      fi])
>
> +AM_CONDITIONAL([test_val], [test x$test_val = 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"
> @@ -157,7 +183,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_val:               ${test_val}
> +       test_perf:              ${test_perf}
>  ])
> 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 c0545b7..cb9db7d 100644
> --- a/test/validation/Makefile.am
> +++ b/test/validation/Makefile.am
> @@ -5,9 +5,12 @@ AM_LDFLAGS += -static
>
>  TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
>
> -if ODP_CUNIT_ENABLED
> +if test_val
>  TESTS = odp_init odp_queue odp_crypto odp_shm odp_schedule odp_pktio_run
> odp_buffer odp_system
>  check_PROGRAMS = ${bin_PROGRAMS}
> +endif
> +
> +if cunit_support
>  bin_PROGRAMS = odp_init odp_queue odp_crypto odp_shm odp_schedule
> odp_pktio odp_buffer odp_system
>  odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
>  odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer
> --
> 2.1.0
>
>
Mike Holmes Jan. 13, 2015, 1:40 p.m. UTC | #2
On 13 January 2015 at 05:07, Stuart Haslam <stuart.haslam@arm.com> wrote:

> On Thu, Jan 08, 2015 at 06:34:19PM +0000, 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>
> > ---
> >  configure.ac                 | 37 ++++++++++++++++++++++++++++++++-----
> >  test/performance/.gitignore  |  2 ++
> >  test/performance/Makefile.am |  5 +++++
> >  test/validation/Makefile.am  |  5 ++++-
> >  4 files changed, 43 insertions(+), 6 deletions(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 440cc63..dbabb20 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -60,21 +60,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],
>
> Shouldn't this be --enable-cunit-support? No other options have
> underscores.
>

Thanks - will fix


>
> Other than that it looks OK.
>
> --
> Stuart.
>
>
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 440cc63..dbabb20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,21 +60,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_val=no
+AC_ARG_ENABLE([test_val],
+    [  --enable-test-val       run test in test/validation],
     [if test x$enableval = xyes; then
+        test_val=yes
         cunit_support=yes
     fi])
 
+AM_CONDITIONAL([test_val], [test x$test_val = 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"
@@ -157,7 +183,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_val:		${test_val}
+	test_perf:		${test_perf}
 ])
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 c0545b7..cb9db7d 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -5,9 +5,12 @@  AM_LDFLAGS += -static
 
 TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
 
-if ODP_CUNIT_ENABLED
+if test_val
 TESTS = odp_init odp_queue odp_crypto odp_shm odp_schedule odp_pktio_run odp_buffer odp_system
 check_PROGRAMS = ${bin_PROGRAMS}
+endif
+
+if cunit_support
 bin_PROGRAMS = odp_init odp_queue odp_crypto odp_shm odp_schedule odp_pktio odp_buffer odp_system
 odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
 odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer