Changes in build to make NETPGP work in the tests. sync
authorKrista Bennett <krista@pep-project.org>
Mon, 03 Dec 2018 12:26:02 +0100
branchsync
changeset 316986b78a45d1e9
parent 3167 e7a7a92570b0
child 3171 13355e5d4756
Changes in build to make NETPGP work in the tests.
test/Makefile
test/src/EngineTestSuite.cc
test/src/pEpTestOutput.cc
     1.1 --- a/test/Makefile	Fri Nov 30 18:21:59 2018 +0100
     1.2 +++ b/test/Makefile	Mon Dec 03 12:26:02 2018 +0100
     1.3 @@ -17,13 +17,14 @@
     1.4  OBJS := $(addsuffix .o,$(basename $(SRCS)))
     1.5  DEPS := $(OBJS:.o=.d)
     1.6  
     1.7 -INC_DIRS := ./include /usr/local/include 
     1.8 +INC_DIRS := ./include /usr/local/include ../src ../sync ../asn.1
     1.9  INC_FLAGS := $(addprefix -I,$(INC_DIRS)) $(GPGME_INC) $(CPPUNIT_INC)
    1.10  
    1.11  LDFLAGS += -L/usr/local/lib
    1.12  
    1.13  CFLAGS += -Wno-deprecated
    1.14  CXXFLAGS += -Wno-deprecated
    1.15 +CFLAGS:=$(filter-out -Wall,$(CFLAGS))
    1.16  
    1.17  LDFLAGS+= $(ETPAN_LIB) $(CPPUNIT_LIB) -L../asn.1 -L../src
    1.18  LDLIBS+= -letpan -lpEpEngine -lstdc++ -lasn1
    1.19 @@ -34,6 +35,7 @@
    1.20  
    1.21  ifeq ($(OPENPGP),NETPGP)
    1.22  	LDLIBS+= -lnetpgp
    1.23 +	CFLAGS+= -DUSE_NETPGP
    1.24  ifeq ($(BUILD_FOR),Linux)
    1.25  	LDLIBS+= -ltre
    1.26  endif
    1.27 @@ -88,8 +90,11 @@
    1.28  
    1.29  all: suitemaker $(TARGET) test_home_ scripts
    1.30  	
    1.31 +%.o: %.cc
    1.32 +	$(CXX) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
    1.33 +
    1.34  $(TARGET): $(OBJS)
    1.35 -	$(CXX) $(CPPFLAGS) $(LDFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS) -o $@
    1.36 +	$(CXX) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS) -o $@
    1.37  
    1.38  .PHONY: suitemaker
    1.39  suitemaker:
     2.1 --- a/test/src/EngineTestSuite.cc	Fri Nov 30 18:21:59 2018 +0100
     2.2 +++ b/test/src/EngineTestSuite.cc	Mon Dec 03 12:26:02 2018 +0100
     2.3 @@ -10,8 +10,8 @@
     2.4  #include <sys/types.h>
     2.5  #include <sys/stat.h>
     2.6  
     2.7 -#import <string>
     2.8 -#import <vector>
     2.9 +#include <string>
    2.10 +#include <vector>
    2.11  #include <utility>
    2.12  
    2.13  #include "platform_unix.h"
     3.1 --- a/test/src/pEpTestOutput.cc	Fri Nov 30 18:21:59 2018 +0100
     3.2 +++ b/test/src/pEpTestOutput.cc	Mon Dec 03 12:26:02 2018 +0100
     3.3 @@ -16,7 +16,7 @@
     3.4          cout << setw(width);
     3.5          if (num_tests) {
     3.6              double percentage = ((num_tests - failures) / (double)num_tests) * 100;
     3.7 -            cout << std::fixed << setprecision(1) << percentage << "\%"; 
     3.8 +            cout << std::fixed << setprecision(1) << percentage << "%"; 
     3.9          }
    3.10          else 
    3.11              cout << "N/A";
    3.12 @@ -112,4 +112,4 @@
    3.13  	void pEpTestOutput::assertment(const Source& s) {
    3.14  		_test_errors.push_back(s);
    3.15  	}
    3.16 -}
    3.17 \ No newline at end of file
    3.18 +}