|
1 |
| -.PHONY: all cprover.dir jprover.dir testing-utils.dir java-testing-utils.dir test |
| 1 | +.PHONY: all jprover.dir test |
2 | 2 |
|
3 | 3 | # Source files for test utilities
|
4 | 4 | SRC = $(CPROVER_DIR)/unit/unit_tests.cpp \
|
@@ -64,16 +64,13 @@ include ../src/config.inc
|
64 | 64 | include $(CPROVER_DIR)/src/config.inc
|
65 | 65 | include $(CPROVER_DIR)/src/common
|
66 | 66 |
|
67 |
| -cprover.dir: |
68 |
| - $(MAKE) $(MAKEARGS) -C $(CPROVER_DIR)/src |
69 |
| - |
70 | 67 | jprover.dir:
|
71 | 68 | $(MAKE) $(MAKEARGS) -C ../src
|
72 | 69 |
|
73 |
| -cprover-testing-utils.dir: |
| 70 | +$(CPROVER_DIR)/unit/testing-utils/testing-utils$(LIBEXT): jprover.dir |
74 | 71 | $(MAKE) $(MAKEARGS) -C $(CPROVER_DIR)/unit/testing-utils
|
75 | 72 |
|
76 |
| -java-testing-utils.dir: |
| 73 | +java-testing-utils/java-testing-utils$(LIBEXT): jprover.dir |
77 | 74 | $(MAKE) $(MAKEARGS) -C java-testing-utils
|
78 | 75 |
|
79 | 76 | # We need to link bmc.o to the unit test, so here's everything it depends on...
|
@@ -126,16 +123,19 @@ OBJ += $(CPROVER_LIBS) \
|
126 | 123 | $(CPROVER_DIR)/unit/testing-utils/testing-utils$(LIBEXT) \
|
127 | 124 | java-testing-utils/java-testing-utils$(LIBEXT)
|
128 | 125 |
|
129 |
| -TESTS = unit_tests$(EXEEXT) \ |
130 |
| - # Empty last line |
| 126 | +CATCH_TEST = unit_tests$(EXEEXT) |
| 127 | +N_CATCH_TESTS = 84 |
| 128 | + |
| 129 | +CLEANFILES = $(CATCH_TEST) java-testing-utils/java-testing-utils$(LIBEXT) |
131 | 130 |
|
132 |
| -CLEANFILES = $(TESTS) |
| 131 | +$(CPROVER_LIBS): jprover.dir |
133 | 132 |
|
134 |
| -all: cprover.dir cprover-testing-utils.dir jprover.dir java-testing-utils.dir |
135 |
| - $(MAKE) $(MAKEARGS) $(TESTS) |
| 133 | +all: $(CATCH_TEST) |
136 | 134 |
|
137 |
| -test: all |
138 |
| - $(foreach test,$(TESTS), (echo Running: $(test); ./$(test)) &&) true |
| 135 | +test: $(CATCH_TEST) |
| 136 | + if ! ./$(CATCH_TEST) -l | grep -q "^$(N_CATCH_TESTS) test cases$$" ; then \ |
| 137 | + ./$(CATCH_TEST) -l ; fi |
| 138 | + ./$(CATCH_TEST) |
139 | 139 |
|
140 | 140 |
|
141 | 141 | ###############################################################################
|
|
0 commit comments