diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2018-01-29 20:57:18 +0100 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2018-01-29 21:21:20 +0100 |
commit | 1fbb9be608dab1771eb7cd9bd62393b7cc87f45a (patch) | |
tree | 41a2b6dd01d6d55b06c0412ed7d1af121bda50a8 /Makefile.in | |
parent | 01e51695e34e0a8ba1d34b08980cc0c0a63362f1 (diff) | |
download | ccache-1fbb9be608dab1771eb7cd9bd62393b7cc87f45a.tar.gz |
test: Rearrange files into test and unittest directories
* The unit tests formerly located in the test directory have been moved
to the unittest directory.
* The integration test suite test.sh has been made a bash script and
renamed to test/run. Its test suites are located in test/suites.
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/Makefile.in b/Makefile.in index 3ddabaa0..7b218c35 100644 --- a/Makefile.in +++ b/Makefile.in @@ -10,7 +10,7 @@ sysconfdir = @sysconfdir@ installcmd = @INSTALL@ AR = @AR@ -SH = @SH@ +BASH = @BASH@ CC = @CC@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ @@ -61,13 +61,14 @@ zlib_sources = \ zlib_objs = $(zlib_sources:.c=.o) test_suites = @test_suites@ -test_sources = test/main.c test/framework.c test/util.c $(test_suites) +test_sources = unittest/main.c unittest/framework.c unittest/util.c +test_sources += $(test_suites) test_objs = $(test_sources:.c=.o) all_sources = $(ccache_sources) $(test_sources) all_objs = $(ccache_objs) $(test_objs) $(zlib_objs) -files_to_clean = $(all_objs) ccache$(EXEEXT) test/main$(EXEEXT) *~ testdir.* +files_to_clean = $(all_objs) ccache$(EXEEXT) unittest/run$(EXEEXT) *~ testdir.* files_to_distclean = Makefile config.h config.log config.status .PHONY: all @@ -100,20 +101,20 @@ perf: ccache$(EXEEXT) $(srcdir)/perf.py --ccache ccache$(EXEEXT) $(CC) $(all_cppflags) $(all_cflags) $(srcdir)/ccache.c .PHONY: test -test: ccache$(EXEEXT) test/main$(EXEEXT) - test/main$(EXEEXT) - CC='$(CC)' $(SH) $(srcdir)/test.sh +test: ccache$(EXEEXT) unittest/run$(EXEEXT) + unittest/run$(EXEEXT) + CC='$(CC)' $(BASH) $(srcdir)/test/run -.PHONY: quicktest -quicktest: test/main$(EXEEXT) - test/main$(EXEEXT) +.PHONY: unittest +unittest: unittest/run$(EXEEXT) + unittest/run$(EXEEXT) -test/main$(EXEEXT): $(base_objs) $(test_objs) $(extra_libs) +unittest/run$(EXEEXT): $(base_objs) $(test_objs) $(extra_libs) $(CC) $(all_cflags) -o $@ $(base_objs) $(test_objs) $(LDFLAGS) $(extra_libs) $(LIBS) -test/main.o: test/suites.h +unittest/main.o: unittest/suites.h -test/suites.h: $(test_suites) Makefile +unittest/suites.h: $(test_suites) Makefile sed -n 's/TEST_SUITE(\(.*\))/SUITE(\1)/p' $(test_suites) >$@ .PHONY: check @@ -124,9 +125,9 @@ distclean: clean rm -rf $(files_to_distclean) .PHONY: installcheck -installcheck: ccache$(EXEEXT) test/main$(EXEEXT) - test/main$(EXEEXT) - CCACHE=$(bindir)/ccache CC='$(CC)' $(SH) $(srcdir)/test.sh +installcheck: ccache$(EXEEXT) unittest/run$(EXEEXT) + unittest/run$(EXEEXT) + CCACHE=$(bindir)/ccache CC='$(CC)' $(BASH) $(srcdir)/test/run .c.o: $(CC) $(all_cppflags) $(all_cflags) -c -o $@ $< |