test/Makefile
author Krista Grothoff <krista@pep-project.org>
Thu, 02 Mar 2017 17:54:02 +0100
branchENGINE-174
changeset 1615 858298055d48
parent 1513 e7f7e42385b5
child 1617 4f66da605597
permissions -rw-r--r--
ENGINE-174 / ENGINE-153: Hopefully ratings now do the right thing. HOPEFULLY. Engine tests pass, but we still have this problem for me, anyway, about running unit tests from the make script vs. directly in the directory. elect_pubkey/find_keys somehow doesn't find the key in update_identity, whereas it works locally and from gpg, it works fine. Puzzling, but this has come up before and isn't us directly, I think.
     1 
     2 # This file is under GNU General Public License 3.0
     3 # see LICENSE.txt
     4 
     5 include ../Makefile.conf
     6 
     7 export GNUPGHOME=.
     8 
     9 CC?=g++ -std=gnu++11 -pthread
    10 CXX?=g++ -std=gnu++11 -pthread
    11 LD?=$(CXX)
    12 LDFLAGS?=-L$(HOME)/lib
    13 LDLIBS?=-letpan -lpEpEngine -lstdc++ -L../asn.1 -lasn1
    14 ifeq ($(BUILD_FOR),Linux)
    15 	LDLIBS+= -luuid
    16 endif
    17 CXXFLAGS?=-std=c++11 -g -O0 -I../src -I../asn.1
    18 # CXXFLAGS=-O3 -DNDEBUG
    19 
    20 ifeq ("$(OPENPGP)","NETPGP")
    21 	LDLIBS+= -lnetpgp
    22 endif
    23 
    24 TARGET=pEpEngineTest
    25 
    26 UNIT_TESTS_SOURCE=$(wildcard *_test.cc)
    27 UNIT_TESTS=$(subst .cc,,$(UNIT_TESTS_SOURCE))
    28 UNIT_TESTS_RUN=$(subst .cc,_gdb,$(UNIT_TESTS_SOURCE))
    29 
    30 all: $(TARGET) $(UNIT_TESTS)
    31 
    32 .PHONY: clean
    33 
    34 clean:
    35 	rm -f *.o $(TARGET) *.a *~ $(UNIT_TESTS) pep_Dokument_Titel.pdf msg4.asc
    36 	rm -Rf *.dSYM .imported pubring.gpg secring.gpg random_seed *.conf trustdb.gpg
    37 
    38 .imported:
    39 	-cat 0x*.asc *_sec.asc | gpg2 --import
    40 	touch .imported
    41 
    42 test: pEpEngineTest .imported
    43 	LD_LIBRARY_PATH=~/lib:../src ./pEpEngineTest
    44 
    45 %_test_run : %_test
    46 	LD_LIBRARY_PATH=~/lib:../src ./$<
    47 
    48 %_test_lldb : %_test
    49 	LD_LIBRARY_PATH=~/lib:../src lldb ./$<
    50 
    51 %_test_gdb : %_test
    52 	LD_LIBRARY_PATH=~/lib:../src gdb ./$<
    53 
    54 unit_tests: $(UNIT_TESTS) $(UNIT_TESTS_RUN)
    55 
    56 install:
    57 	make -C .. install