Selaa lähdekoodia

gcc: Disable the test suite when the CPU back-end is unavailable.

* configure.ac: Warn about the inability to run the test suite when
  `--disable-cpu'.

* gcc-plugin/tests/Makefile.am (TESTS): Conditionalize on
  `STARPU_USE_CPU'.
Ludovic Courtès 13 vuotta sitten
vanhempi
commit
9613a3dd84
2 muutettua tiedostoa jossa 13 lisäystä ja 2 poistoa
  1. 7 2
      configure.ac
  2. 6 0
      gcc-plugin/tests/Makefile.am

+ 7 - 2
configure.ac

@@ -1209,10 +1209,15 @@ fi
 if test "x$ac_cv_have_gcc_plugins" = "xyes" ; then
 if test "x$ac_cv_have_gcc_plugins" = "xyes" ; then
     build_gcc_plugin="yes"
     build_gcc_plugin="yes"
 
 
-   # GNU Guile 1.8/2.0 is used to run the test suite.
+    # GNU Guile 1.8/2.0 is used to run the test suite.
     AC_PATH_PROG([GUILE], [guile])
     AC_PATH_PROG([GUILE], [guile])
     if test "x$GUILE" != "x"; then
     if test "x$GUILE" != "x"; then
-	run_gcc_plugin_test_suite="yes"
+        if test "x$enable_cpu" = "xyes"; then
+	   run_gcc_plugin_test_suite="yes"
+	else
+	   AC_MSG_WARN([CPU back-end disabled; GCC plug-in test suite will not be run])
+	   run_gcc_plugin_test_suite="no"
+	fi
     else
     else
 	run_gcc_plugin_test_suite="no"
 	run_gcc_plugin_test_suite="no"
     fi
     fi

+ 6 - 0
gcc-plugin/tests/Makefile.am

@@ -56,7 +56,13 @@ EXTRA_DIST = ./run-test.in			\
   my-lib.h my-lib.c				\
   my-lib.h my-lib.c				\
   $(gcc_tests)
   $(gcc_tests)
 
 
+# The test suite assumes that the CPU back-end is available.
+if STARPU_USE_CPU
+
 TESTS = $(gcc_tests)
 TESTS = $(gcc_tests)
+
+endif
+
 TESTS_ENVIRONMENT = ./run-test
 TESTS_ENVIRONMENT = ./run-test
 
 
 if !HAVE_GUILE
 if !HAVE_GUILE