diff --git a/.gitignore b/.gitignore index 90d354408..d2a82cf1f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,41 +1,4 @@ *.o +* /lightning.info -/tests/test-addr -/tests/test-addi -/tests/test-addr_d -/tests/test-addr_f -/tests/test-addx -/tests/test-mulr -/tests/test-mulr_d -/tests/test-mulr_f -/tests/test-subr -/tests/test-subr_d -/tests/test-subr_f -/tests/test-subx -/tests/test-qmulr -/tests/test-qmulr_u -/tests/test-divr -/tests/test-divr_u -/tests/test-divr_d -/tests/test-divr_f -/tests/test-qdivr -/tests/test-qdivr_u -/tests/test-remr -/tests/test-remr_u -/tests/test-andi -/tests/test-andr -/tests/test-ori -/tests/test-orr -/tests/test-xori -/tests/test-xorr -/tests/test-lshi -/tests/test-lshr -/tests/test-rshi -/tests/test-rshr -/tests/test-rshr_u -/tests/test-rshi_u -/tests/test-comr -/tests/test-negr -/tests/test-negr_d -/tests/test-negr_f +/tests/test-* diff --git a/tests/Makefile b/tests/Makefile index 2dbad2f9a..0257f5837 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,4 +1,4 @@ -TESTS=$(sort $(patsubst test-%.c,%,$(wildcard test-*.c))) +TESTS=$(sort $(basename $(wildcard *.c))) CC = gcc CFLAGS = -Wall -O0 -g @@ -16,7 +16,7 @@ check: all jit.o: ../jit.h ../jit/*.c $(CC) $(CFLAGS) $(CPPFLAGS) -flto -I.. -o jit.o -c ../jit/jit.c -test-%: test-%.c jit.o test.h +test-%: %.c jit.o test.h $(CC) $(CFLAGS) $(CPPFLAGS) -flto -I.. -o $@ jit.o $< clean: diff --git a/tests/test-addi.c b/tests/addi.c similarity index 100% rename from tests/test-addi.c rename to tests/addi.c diff --git a/tests/test-addr.c b/tests/addr.c similarity index 100% rename from tests/test-addr.c rename to tests/addr.c diff --git a/tests/test-addr_d.c b/tests/addr_d.c similarity index 100% rename from tests/test-addr_d.c rename to tests/addr_d.c diff --git a/tests/test-addr_f.c b/tests/addr_f.c similarity index 100% rename from tests/test-addr_f.c rename to tests/addr_f.c diff --git a/tests/test-addx.c b/tests/addx.c similarity index 100% rename from tests/test-addx.c rename to tests/addx.c diff --git a/tests/test-andi.c b/tests/andi.c similarity index 100% rename from tests/test-andi.c rename to tests/andi.c diff --git a/tests/test-andr.c b/tests/andr.c similarity index 100% rename from tests/test-andr.c rename to tests/andr.c diff --git a/tests/test-comr.c b/tests/comr.c similarity index 100% rename from tests/test-comr.c rename to tests/comr.c diff --git a/tests/test-divr.c b/tests/divr.c similarity index 100% rename from tests/test-divr.c rename to tests/divr.c diff --git a/tests/test-divr_d.c b/tests/divr_d.c similarity index 100% rename from tests/test-divr_d.c rename to tests/divr_d.c diff --git a/tests/test-divr_f.c b/tests/divr_f.c similarity index 100% rename from tests/test-divr_f.c rename to tests/divr_f.c diff --git a/tests/test-divr_u.c b/tests/divr_u.c similarity index 100% rename from tests/test-divr_u.c rename to tests/divr_u.c diff --git a/tests/test-lshi.c b/tests/lshi.c similarity index 100% rename from tests/test-lshi.c rename to tests/lshi.c diff --git a/tests/test-lshr.c b/tests/lshr.c similarity index 100% rename from tests/test-lshr.c rename to tests/lshr.c diff --git a/tests/test-mulr.c b/tests/mulr.c similarity index 100% rename from tests/test-mulr.c rename to tests/mulr.c diff --git a/tests/test-mulr_d.c b/tests/mulr_d.c similarity index 100% rename from tests/test-mulr_d.c rename to tests/mulr_d.c diff --git a/tests/test-mulr_f.c b/tests/mulr_f.c similarity index 100% rename from tests/test-mulr_f.c rename to tests/mulr_f.c diff --git a/tests/test-negr.c b/tests/negr.c similarity index 100% rename from tests/test-negr.c rename to tests/negr.c diff --git a/tests/test-negr_d.c b/tests/negr_d.c similarity index 100% rename from tests/test-negr_d.c rename to tests/negr_d.c diff --git a/tests/test-negr_f.c b/tests/negr_f.c similarity index 100% rename from tests/test-negr_f.c rename to tests/negr_f.c diff --git a/tests/test-ori.c b/tests/ori.c similarity index 100% rename from tests/test-ori.c rename to tests/ori.c diff --git a/tests/test-orr.c b/tests/orr.c similarity index 100% rename from tests/test-orr.c rename to tests/orr.c diff --git a/tests/test-qdivr.c b/tests/qdivr.c similarity index 100% rename from tests/test-qdivr.c rename to tests/qdivr.c diff --git a/tests/test-qdivr_u.c b/tests/qdivr_u.c similarity index 100% rename from tests/test-qdivr_u.c rename to tests/qdivr_u.c diff --git a/tests/test-qmulr.c b/tests/qmulr.c similarity index 100% rename from tests/test-qmulr.c rename to tests/qmulr.c diff --git a/tests/test-qmulr_u.c b/tests/qmulr_u.c similarity index 100% rename from tests/test-qmulr_u.c rename to tests/qmulr_u.c diff --git a/tests/test-remr.c b/tests/remr.c similarity index 100% rename from tests/test-remr.c rename to tests/remr.c diff --git a/tests/test-remr_u.c b/tests/remr_u.c similarity index 100% rename from tests/test-remr_u.c rename to tests/remr_u.c diff --git a/tests/test-rshi.c b/tests/rshi.c similarity index 100% rename from tests/test-rshi.c rename to tests/rshi.c diff --git a/tests/test-rshi_u.c b/tests/rshi_u.c similarity index 100% rename from tests/test-rshi_u.c rename to tests/rshi_u.c diff --git a/tests/test-rshr.c b/tests/rshr.c similarity index 100% rename from tests/test-rshr.c rename to tests/rshr.c diff --git a/tests/test-rshr_u.c b/tests/rshr_u.c similarity index 100% rename from tests/test-rshr_u.c rename to tests/rshr_u.c diff --git a/tests/test-subr.c b/tests/subr.c similarity index 100% rename from tests/test-subr.c rename to tests/subr.c diff --git a/tests/test-subr_d.c b/tests/subr_d.c similarity index 100% rename from tests/test-subr_d.c rename to tests/subr_d.c diff --git a/tests/test-subr_f.c b/tests/subr_f.c similarity index 100% rename from tests/test-subr_f.c rename to tests/subr_f.c diff --git a/tests/test-subx.c b/tests/subx.c similarity index 100% rename from tests/test-subx.c rename to tests/subx.c diff --git a/tests/test-xori.c b/tests/xori.c similarity index 100% rename from tests/test-xori.c rename to tests/xori.c diff --git a/tests/test-xorr.c b/tests/xorr.c similarity index 100% rename from tests/test-xorr.c rename to tests/xorr.c