Fix bug 476: when CxxTest is not found, make the error less fatal-looking
authorMorgan Deters <mdeters@cs.nyu.edu>
Fri, 7 Dec 2012 22:31:02 +0000 (17:31 -0500)
committerMorgan Deters <mdeters@cs.nyu.edu>
Sat, 8 Dec 2012 14:36:19 +0000 (09:36 -0500)
config/.gitignore
test/Makefile.am
test/unit/no_cxxtest

index dfeb8c222714b7bf51288732e3eef9e7e30ddbed..c1e3d2423fd102e0c14f3ca11a138c7d85204e70 100644 (file)
@@ -9,3 +9,4 @@
 /missing
 /ltoptions.m4
 /install-sh
+/test-driver
index 014aecc43bcf9c819fc3ab3315c5a0e6eb4a551c..6cccca05c93d3ef0b673273add47561d2825c165 100644 (file)
@@ -15,7 +15,7 @@ units systemtests regress regress0 regress1 regress2 regress3:
 test: check
 
 am__tty_colors = \
-red=; grn=; lgn=; blu=; std=; \
+red=; grn=; lgn=; blu=; mag=; std=; \
 test "X$(AM_COLOR_TESTS)" != Xno \
 && test "X$$TERM" != Xdumb \
 && { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \
@@ -24,6 +24,7 @@ test "X$(AM_COLOR_TESTS)" != Xno \
   grn='\e[0;32m'; \
   lgn='\e[1;32m'; \
   blu='\e[1;34m'; \
+  mag='\e[1;35m'; \
   std='\e[m'; \
 }
 
@@ -61,14 +62,23 @@ check-recursive: check-pre
 check-pre:
        @rm -f $(subdirs_to_check:=/test-suite.log)
 
+if HAVE_CXXTESTGEN
+HANDLE_UNIT_TEST_SUMMARY = \
+       if test -s "unit/test-suite.log"; then :; else \
+               echo "$${red}Unit tests did not run; maybe there were compilation problems ?$$std"; \
+       fi
+else
+HANDLE_UNIT_TEST_SUMMARY = \
+       echo "$${mag}Unit tests not supported, since CxxTest wasn't found$$std"; \
+       rm -f "unit/test-suite.log"
+endif
+
 if AUTOMAKE_1_11
 # automake 1.11 version
 check-local:
        @$(am__tty_colors); \
        echo $${blu}===============================  TESTING SUMMARY  =============================$$std; \
-       if test -s "unit/test-suite.log"; then :; else \
-               echo "$${red}Unit tests did not run; maybe there were compilation problems ?$$std"; \
-       fi; \
+       $(HANDLE_UNIT_TEST_SUMMARY); \
        if test -s "system/test-suite.log"; then :; else \
                echo "$${red}System tests did not run; maybe there were compilation problems ?$$std"; \
        fi; \
@@ -90,9 +100,7 @@ else
 check-local:
        @$(am__tty_colors); \
        echo $${blu}===============================  TESTING SUMMARY  =============================$$std; \
-       if test -s "unit/test-suite.log"; then :; else \
-               echo "$${red}Unit tests did not run; maybe there were compilation problems ?$$std"; \
-       fi; \
+       $(HANDLE_UNIT_TEST_SUMMARY); \
        if test -s "system/test-suite.log"; then :; else \
                echo "$${red}System tests did not run; maybe there were compilation problems ?$$std"; \
        fi; \
index cf8b8d7292fee48e7032ff90cfd114647d84f4f0..57e5064d908c6bf58a54587908b00bbb203c7daf 100755 (executable)
@@ -3,10 +3,10 @@
 echo
 echo '***************************************************************************'
 echo '*                                                                         *'
-echo '*  ERROR:  CxxTest was not found at configure-time; tests cannot be run.  *'
+echo '*   WARNING:  CxxTest not found at configure time; tests cannot be run.   *'
 echo '*                                                                         *'
 echo '***************************************************************************'
 echo
 
-exit 1
-
+# skip this test, rather than reporting an error
+exit 77