浏览代码

Make some tests optional.

  The tests in the sub-directory are included in the unit tests only if --enable-optional-tests is given to configure
Nathalie Furmento 14 年之前
父节点
当前提交
d2aeac86df
共有 6 个文件被更改,包括 58 次插入13 次删除
  1. 4 1
      Makefile.am
  2. 10 0
      configure.ac
  3. 44 0
      opt/Makefile.am
  4. 0 0
      opt/datawizard/wt_broadcast.c
  5. 0 0
      opt/datawizard/wt_host.c
  6. 0 12
      tests/Makefile.am

+ 4 - 1
Makefile.am

@@ -18,10 +18,13 @@ ACLOCAL_AMFLAGS=-I m4
 CLEANFILES = *.gcno *.gcda *.linkinfo
 
 SUBDIRS = src
+SUBDIRS += tools examples tests doc
 if USE_MPI
 SUBDIRS += mpi
 endif
-SUBDIRS += tools examples tests doc
+if COND_OPT
+SUBDIRS += opt
+endif
 
 if BUILD_GCC_PLUGIN
 SUBDIRS += gcc-plugin

+ 10 - 0
configure.ac

@@ -1175,6 +1175,15 @@ if test x$have_f77_h = xyes; then
         AC_DEFINE([STARPU_HAVE_F77_H], [1], [Define to 1 if you have the <f77.h> header file.])
 fi
 
+# Do we want to run optional tests
+AC_MSG_CHECKING(whether optional tests should be run)
+AC_ARG_ENABLE(optional_tests, [AS_HELP_STRING([--optional-tests],
+			[run optional tests])],
+			want_optional_tests=$enableval, want_optional_tests=no)
+AC_MSG_RESULT($want_optional_tests)
+AM_CONDITIONAL([COND_OPT], [test "$want_optional_tests" = yes])
+
+# File configuration
 AC_CONFIG_COMMANDS([executable-scripts], [chmod +x ]tests/regression/regression.sh)
 AC_CONFIG_FILES(tests/regression/regression.sh tests/regression/profiles tests/regression/profiles.build.only)
 AC_CONFIG_HEADER(src/common/config.h include/starpu_config.h)
@@ -1193,6 +1202,7 @@ AC_OUTPUT([
 	examples/starpufft/Makefile
 	examples/stencil/Makefile
 	tests/Makefile
+        opt/Makefile
 	doc/Makefile
 	mpi/Makefile
 ])

+ 44 - 0
opt/Makefile.am

@@ -0,0 +1,44 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2009, 2010, 2011  Université de Bordeaux 1
+# Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+# Copyright (C) 2010  Institut National de Recherche en Informatique et Automatique
+#
+# StarPU is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# StarPU is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# See the GNU Lesser General Public License in COPYING.LGPL for more details.
+
+AM_CFLAGS = $(HWLOC_CFLAGS) -Wall
+LIBS = $(top_builddir)/src/libstarpu.la $(HWLOC_LIBS) @LIBS@
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/src/
+
+optbindir = $(libdir)/starpu/tests
+optbin_PROGRAMS =
+
+SUBDIRS =
+
+TESTS = $(check_PROGRAMS)
+
+check_PROGRAMS =
+
+check_PROGRAMS += 				\
+	datawizard/wt_host			\
+	datawizard/wt_broadcast
+
+optbin_PROGRAMS +=				\
+	datawizard/wt_host
+datawizard_wt_host_SOURCES =			\
+	datawizard/wt_host.c
+
+optbin_PROGRAMS +=				\
+	datawizard/wt_broadcast
+datawizard_wt_broadcast_SOURCES =		\
+	datawizard/wt_broadcast.c
+

tests/datawizard/wt_broadcast.c → opt/datawizard/wt_broadcast.c


tests/datawizard/wt_host.c → opt/datawizard/wt_host.c


+ 0 - 12
tests/Makefile.am

@@ -131,8 +131,6 @@ check_PROGRAMS += 				\
 	datawizard/mpi_like			\
 	datawizard/mpi_like_async		\
 	datawizard/critical_section_with_void_interface\
-	datawizard/wt_host			\
-	datawizard/wt_broadcast			\
 	datawizard/increment_redux		\
 	datawizard/increment_redux_v2		\
 	errorcheck/starpu_init_noworker		\
@@ -385,16 +383,6 @@ datawizard_critical_section_with_void_interface_SOURCES =	\
 	datawizard/critical_section_with_void_interface.c
 
 testbin_PROGRAMS +=				\
-	datawizard/wt_host
-datawizard_wt_host_SOURCES =			\
-	datawizard/wt_host.c
-
-testbin_PROGRAMS +=				\
-	datawizard/wt_broadcast
-datawizard_wt_broadcast_SOURCES =		\
-	datawizard/wt_broadcast.c
-
-testbin_PROGRAMS +=				\
 	datawizard/increment_redux
 
 datawizard_increment_redux_SOURCES =		\