From c4b91cbe7cd24126ead1c3fd4b89ff7069bcc148 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 28 Sep 2014 01:25:21 +0200 Subject: allow options between command and -- on commandline This used to work before we implemented a stricter commandline parser and e.g. the dd-schroot-cmd command constructs commandlines like this. Reported-By: Helmut Grohne --- test/libapt/makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/libapt/makefile') diff --git a/test/libapt/makefile b/test/libapt/makefile index 69a13fd92..7f23ace46 100644 --- a/test/libapt/makefile +++ b/test/libapt/makefile @@ -14,8 +14,8 @@ test: $(BIN)/gtest$(BASENAME) $(BIN)/gtest$(BASENAME): $(LIB)/gtest.a PROGRAM = gtest${BASENAME} -SLIBS = -lapt-pkg -pthread $(LIB)/gtest.a -LIB_MAKES = apt-pkg/makefile +SLIBS = -lapt-pkg -lapt-private -pthread $(LIB)/gtest.a +LIB_MAKES = apt-pkg/makefile apt-private/makefile SOURCE = gtest_runner.cc $(wildcard *-helpers.cc *_test.cc) include $(PROGRAM_H) -- cgit v1.2.3 From 42fab5fbc85e243b958beff95912c46fb81abcc0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 17 Mar 2015 16:51:29 +0100 Subject: demote missing gtest to a buildtime warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We just need it for unit tests and our debian/rules file actually skips calling them if nocheck is given… but this fails anyhow as we declared a hard-dependency on it. Demoting the error to a warning in configuration and adding a test in the 'make test' path with a friendly message allows nocheck to be useful again. (Running unit tests is fully encouraged of course, but bootstrappers and co do not need to be burdened with this stuff) --- test/libapt/makefile | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/libapt/makefile') diff --git a/test/libapt/makefile b/test/libapt/makefile index 7f23ace46..0f8df291f 100644 --- a/test/libapt/makefile +++ b/test/libapt/makefile @@ -8,6 +8,7 @@ APT_DOMAIN=none include ../../buildlib/defaults.mak .PHONY: test +ifeq (file-okay,$(shell $(CC) -M gtest_runner.cc >/dev/null 2>&1 && echo 'file-okay')) test: $(BIN)/gtest$(BASENAME) MALLOC_PERTURB_=21 MALLOC_CHECK_=2 LD_LIBRARY_PATH=$(LIB) $(BIN)/gtest$(BASENAME) @@ -71,3 +72,11 @@ $(LIB)/gtest.a: $(OBJ)/gtest-all.o echo Building static library $@ -rm -f $@ $(AR) $(ARFLAGS) $@ $^ + +else +test: + @echo "APT uses Googles C++ testing framework for its unit tests" + @echo "On Debian systems this is available in the 'libgtest-dev' package." + @echo "Please install it before attempting to run the unit tests." + exit 100 +endif -- cgit v1.2.3 From f492283b4369ed0711f5f538b6d5fe61a8a75a0f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 28 Apr 2015 15:06:12 +0200 Subject: do not require installed libapt-pkg-dev for gtest Git-Dch: Ignore --- test/libapt/makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/libapt/makefile') diff --git a/test/libapt/makefile b/test/libapt/makefile index 0f8df291f..61a8aaf31 100644 --- a/test/libapt/makefile +++ b/test/libapt/makefile @@ -8,7 +8,7 @@ APT_DOMAIN=none include ../../buildlib/defaults.mak .PHONY: test -ifeq (file-okay,$(shell $(CC) -M gtest_runner.cc >/dev/null 2>&1 && echo 'file-okay')) +ifeq (file-okay,$(shell $(CC) -I $(BASE)/build/include -M gtest_runner.cc >/dev/null 2>&1 && echo 'file-okay')) test: $(BIN)/gtest$(BASENAME) MALLOC_PERTURB_=21 MALLOC_CHECK_=2 LD_LIBRARY_PATH=$(LIB) $(BIN)/gtest$(BASENAME) @@ -78,5 +78,6 @@ test: @echo "APT uses Googles C++ testing framework for its unit tests" @echo "On Debian systems this is available in the 'libgtest-dev' package." @echo "Please install it before attempting to run the unit tests." + $(CC) -I $(BASE)/build/include -M gtest_runner.cc exit 100 endif -- cgit v1.2.3