summaryrefslogtreecommitdiff
path: root/test/Makefile
diff options
context:
space:
mode:
authorAmmar Faizi <ammarfaizi2@gnuweeb.org>2022-04-04 01:22:00 +0700
committerJens Axboe <axboe@kernel.dk>2022-04-03 17:12:50 -0600
commitf200b5bba7017de7658bd44441322949182a4749 (patch)
treea97dadbb41fee6d957e796f81160d09d1f5b0c40 /test/Makefile
parent664bf782a6d78f701301ef6ebdd7cf63b2e3ee09 (diff)
downloadliburing-f200b5bba7017de7658bd44441322949182a4749.tar.gz
liburing-f200b5bba7017de7658bd44441322949182a4749.tar.bz2
test/Makefile: Append `.t` to the test binary
When adding a new test, we often forget to add the new test binary to `.gitignore`. Append `.t` to the test binary filename, this way we can use a wildcard matching "test/*.t" in `.gitignore` to ignore all test binary files. Goals: - Make the .gitignore simpler. - Avoid the burden of adding a new test to .gitignore. Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org> Link: https://lore.kernel.org/r/20220403182200.259937-4-ammarfaizi2@gnuweeb.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/Makefile b/test/Makefile
index eb1e7d5..d97341c 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -183,7 +183,9 @@ endif
all_targets += sq-full-cpp
-test_targets := $(patsubst %.c,%,$(patsubst %.cc,%,$(test_srcs)))
+test_targets := $(patsubst %.c,%,$(test_srcs))
+test_targets := $(patsubst %.cc,%,$(test_targets))
+test_targets := $(patsubst %,%.t,$(test_targets))
all_targets += $(test_targets)
#
@@ -204,10 +206,10 @@ all: $(test_targets)
helpers.o: helpers.c
$(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
-%: %.c $(helpers) helpers.h ../src/liburing.a
+%.t: %.c $(helpers) helpers.h ../src/liburing.a
$(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(helpers) $(LDFLAGS)
-%: %.cc $(helpers) helpers.h ../src/liburing.a
+%.t: %.cc $(helpers) helpers.h ../src/liburing.a
$(QUIET_CXX)$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $< $(helpers) $(LDFLAGS)