summaryrefslogtreecommitdiff
path: root/tests/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/Makefile b/tests/Makefile
index d6f5b5d..56455bd 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -156,7 +156,9 @@ clang: CFLAGS+=-I/usr/include/x86_64-linux-musl
156clang: CFLAGS+=-I../x86_64-linux-musl-native/include/ 156clang: CFLAGS+=-I../x86_64-linux-musl-native/include/
157clang: CFLAGS+=-Ix86_64-linux-musl-native/include/ 157clang: CFLAGS+=-Ix86_64-linux-musl-native/include/
158clang: CFLAGS+=-nostdinc 158clang: CFLAGS+=-nostdinc
159clang: comptime $(RUNTIME_TARGETS) 159clang: CXX=clang++
160clang: CXXFLAGS=$(CFLAGS)
161clang: comptime $(RUNTIME_TARGETS) cpp
160 162
161coverage: CFLAGS += -fprofile-arcs -ftest-coverage 163coverage: CFLAGS += -fprofile-arcs -ftest-coverage
162coverage: CC=../x86_64-linux-musl-native/bin/gcc 164coverage: CC=../x86_64-linux-musl-native/bin/gcc
@@ -173,6 +175,10 @@ all: gcc
173$(RUNTIME_TARGETS): %: %.c 175$(RUNTIME_TARGETS): %: %.c
174 $(CC) $(CFLAGS) -o $@ $< 176 $(CC) $(CFLAGS) -o $@ $<
175 177
178cpp: test_compile.cc
179 $(CXX) $(CXXFLAGS) test_compile.cc -o ./test_compile_cc
180 timeout 1s ./test_compile_cc 1234567890 2 3 4 5 6 7 8 9 0 >/dev/null && echo "$(EXE) OK" || echo "$(EXE) FAIL"; \
181
176run: $(RUNTIME_TARGETS) 182run: $(RUNTIME_TARGETS)
177 $(foreach EXE, $(RUNTIME_TARGETS), \ 183 $(foreach EXE, $(RUNTIME_TARGETS), \
178 timeout 1s ./$(EXE) 1234567890 2 3 4 5 6 7 8 9 0 >/dev/null && echo "$(EXE) OK" || echo "$(EXE) FAIL"; \ 184 timeout 1s ./$(EXE) 1234567890 2 3 4 5 6 7 8 9 0 >/dev/null && echo "$(EXE) OK" || echo "$(EXE) FAIL"; \
@@ -187,5 +193,6 @@ clean:
187 $(foreach EXE, $(RUNTIME_TARGETS) $(COMPTIME_TARGETS), \ 193 $(foreach EXE, $(RUNTIME_TARGETS) $(COMPTIME_TARGETS), \
188 rm -f ./$(EXE) \ 194 rm -f ./$(EXE) \
189 ) 195 )
196 rm -f ./test_compile_cc
190 rm -rf ./*.gcno ./*.gcda ./*.gcov ./coverage.info ./coverage 197 rm -rf ./*.gcno ./*.gcda ./*.gcov ./coverage.info ./coverage
191 198