diff mbox

configure.ac: performance: add tests to unit

Message ID 1419946868-26787-1-git-send-email-mike.holmes@linaro.org
State Superseded
Headers show

Commit Message

Mike Holmes Dec. 30, 2014, 1:41 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                 | 17 +++++++++++++++++
 test/performance/.gitignore  |  2 ++
 test/performance/Makefile.am |  4 ++++
 3 files changed, 23 insertions(+)

Comments

Mike Holmes Jan. 7, 2015, 11:41 a.m. UTC | #1
On 7 January 2015 at 05:48, Stuart Haslam <stuart.haslam@arm.com> wrote:

> On Tue, Dec 30, 2014 at 01:41:08PM +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                 | 17 +++++++++++++++++
> >  test/performance/.gitignore  |  2 ++
> >  test/performance/Makefile.am |  4 ++++
> >  3 files changed, 23 insertions(+)
> >
> > diff --git a/configure.ac b/configure.ac
> > index f0ce7e0..30bd4de 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -104,6 +104,22 @@ AC_ARG_ENABLE([debug],
> >  ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"
> >
> >
> ##########################################################################
> > +# Enable/disable unit-perf
> >
> +##########################################################################
> > +if test x$cunit_support = xyes
> > +then
> > +AC_ARG_ENABLE([unit-perf],
> > +    [  --enable-unit-perf      Enable/disable unit-perf],
>
> +    [if test "x$enableval" = "xyes"; then
> > +        unit_perf=yes
> > +    fi])
> > +else
> > +    unit_perf=no
> > +fi
>
> Is there a reason this needs to depend on having cunit enabled too?
>
> Also the name doesn't seem right as these are performance a tests not
> unit tests. How about;
>
>  --enable-test-unit     (rename of what's currently --enable-cunit)
>

Will do


>  --enable-test-perf
>

Will do


>
> Other than those nits, looks good and works for me.
>
> --
> Stuart.
>
>
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index f0ce7e0..30bd4de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -104,6 +104,22 @@  AC_ARG_ENABLE([debug],
 ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"
 
 ##########################################################################
+# Enable/disable unit-perf
+##########################################################################
+if test x$cunit_support = xyes
+then
+AC_ARG_ENABLE([unit-perf],
+    [  --enable-unit-perf      Enable/disable unit-perf],
+    [if test "x$enableval" = "xyes"; then
+        unit_perf=yes
+    fi])
+else
+    unit_perf=no
+fi
+
+AM_CONDITIONAL([unit_perf], [test x$unit_perf = xyes ])
+
+##########################################################################
 # Check for pthreads availability
 ##########################################################################
 
@@ -243,4 +259,5 @@  AC_MSG_RESULT([
 	am_ldflags:		${AM_LDFLAGS}
 	libs:			${LIBS}
 	cunit:			${cunit_support}
+	unit_perf:		${unit_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..a4afd36 100644
--- a/test/performance/Makefile.am
+++ b/test/performance/Makefile.am
@@ -1,5 +1,9 @@ 
 include $(top_srcdir)/test/Makefile.inc
 
+if unit_perf
+TESTS = odp_scheduling
+endif
+
 bin_PROGRAMS = odp_scheduling
 odp_scheduling_LDFLAGS = $(AM_LDFLAGS) -static
 odp_scheduling_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test