[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/09: Allow test suite to test multiple targets.
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/09: Allow test suite to test multiple targets. |
Date: |
Wed, 24 Apr 2019 10:04:20 -0400 (EDT) |
wingo pushed a commit to branch lightening
in repository guile.
commit e6ac66a3487822beaffdb0e8259ea91c01b5bf6e
Author: Andy Wingo <address@hidden>
Date: Fri Apr 5 16:07:01 2019 +0200
Allow test suite to test multiple targets.
* tests/Makefile: Allow for testing multiple targets.
---
tests/Makefile | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
index e94c6fd..8527065 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,24 +1,29 @@
TESTS=$(sort $(basename $(wildcard *.c)))
+TARGETS=native
CC = gcc
CFLAGS = -Wall -O0 -g
-all: $(addprefix test-,$(TESTS))
+all: $(foreach TARGET,$(TARGETS),$(addprefix test-$(TARGET)-,$(TESTS)))
-check: all
+check: $(addprefix test-$(TARGET),$(TARGETS))
+
+test-%: $(addprefix test-%-,$(TESTS))
@echo "Running unit tests..."
- @set -e; for test in $(TESTS); do \
+ @set -e; for test in $?; do \
echo "Testing: $$test"; \
- ./test-$$test; \
+ ./$$test; \
done
@echo "Success."
+.PHONY: test check
+
lightening.o: ../lightening.h ../lightening/*.c
$(CC) $(CFLAGS) $(CPPFLAGS) -I.. -o lightening.o -c
../lightening/lightening.c
-test-%: %.c lightening.o test.h
+test-native-%: %.c lightening.o test.h
$(CC) $(CFLAGS) $(CPPFLAGS) -I.. -o $@ lightening.o $<
clean:
- rm -f $(addprefix test-,$(TESTS))
+ rm -f $(foreach TARGET,$(TARGETS),$(addprefix test-$(TARGET)-,$(TESTS)))
rm -f lightening.o
- [Guile-commits] branch lightening updated (b35662f -> 9a32b4b), Andy Wingo, 2019/04/24
- [Guile-commits] 02/09: Add support for "make test-ia32" in tests/, Andy Wingo, 2019/04/24
- [Guile-commits] 08/09: Merge from upstream lightening, Andy Wingo, 2019/04/24
- [Guile-commits] 07/09: Add support for operand addends, Andy Wingo, 2019/04/24
- [Guile-commits] 05/09: Merge from upstream lightening, Andy Wingo, 2019/04/24
- [Guile-commits] 01/09: Allow test suite to test multiple targets.,
Andy Wingo <=
- [Guile-commits] 09/09: Adapt to new lightening call API, Andy Wingo, 2019/04/24
- [Guile-commits] 03/09: Fix lightening name, Andy Wingo, 2019/04/24
- [Guile-commits] 06/09: Add proper parallel-moves solver, Andy Wingo, 2019/04/24
- [Guile-commits] 04/09: Simplify API for loading call arguments, Andy Wingo, 2019/04/24