diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2012-12-07 17:31:02 -0500 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2012-12-08 09:36:19 -0500 |
commit | 984d9e7352ece4e3dd75b4272074cf6a298b5eea (patch) | |
tree | b399613abe33168d6813670b373506ed1048dbf3 /test/Makefile.am | |
parent | 5d0d0b56d1383f1ad4027d8e6dc739c12cacced8 (diff) |
Fix bug 476: when CxxTest is not found, make the error less fatal-looking
Diffstat (limited to 'test/Makefile.am')
-rw-r--r-- | test/Makefile.am | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 014aecc43..6cccca05c 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -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='[0;32m'; \ lgn='[1;32m'; \ blu='[1;34m'; \ + mag='[1;35m'; \ std='[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; \ |