@ -1,117 +0,0 @@ | |||
# Copyright 2019, pEp Foundation | |||
# This file is part of pEpEngine | |||
# This file may be used under the terms of the GNU General Public License version 3 | |||
# see LICENSE.txt | |||
HERE:=$(CURDIR) | |||
include ../Makefile.conf | |||
GTEST_DIR:=googletest/googletest | |||
SRCS:=$(wildcard src/*.cc) $(wildcard src/*/*.cc) | |||
OBJS:=$(addsuffix .o,$(basename $(SRCS))) | |||
DEPS:=$(OBJS:.o=.d) | |||
LDFLAGS+= -L../asn.1 -L../src $(ETPAN_LIB) $(CPPUNIT_LIB) | |||
TARGET:=EngineTests | |||
ifeq ($(OPENPGP),GPG) | |||
LDFLAGS+= $(GPGME_LIB) | |||
else ifeq ($(OPENPGP),NETPGP) | |||
LDFLAGS+= $(NETGPG_LIB) | |||
endif | |||
LDLIBS+= -letpan -lpEpEngine -lstdc++ -lasn1 | |||
ifeq ($(BUILD_FOR),Linux) | |||
LDLIBS+= -luuid | |||
endif | |||
ifeq ($(OPENPGP),SEQUOIA) | |||
LDFLAGS+= $(SEQUOIA_LDFLAGS) | |||
LDLIBS+= $(SEQUOIA_LIB) | |||
CXXFLAGS+= $(SEQUOIA_CFLAGS) -DUSE_SEQUOIA | |||
INC_FLAGS+= $(SEQUOIA_INC) | |||
endif | |||
ifdef SQLITE3_FROM_OS | |||
LDLIBS+= -lsqlite3 | |||
endif | |||
ifeq ($(OPENPGP),GPG) | |||
#LDLIBS+= -lgpgme | |||
else ifeq ($(OPENPGP),NETPGP) | |||
LDLIBS+= -lnetpgp | |||
ifeq ($(BUILD_FOR),Linux) | |||
LDLIBS+= -ltre | |||
endif | |||
endif | |||
CXXFLAGS:=$(filter-out -DNDEBUG,$(CXXFLAGS)) | |||
# FIXME Possibly missing incdirs: ASN1C_INC | |||
CXXFLAGS+= -I./include -I../sync $(CPPUNIT_INC) $(INC_FLAGS) -Wno-deprecated | |||
ifeq ($(OPENPGP),GPG) | |||
CXXFLAGS+= -DUSE_GPG $(GPGME_INC) | |||
else ifeq ($(OPENPGP),NETPGP) | |||
CXXFLAGS+= -DUSE_NETPGP $(NETPGP_INC) | |||
endif | |||
EXTRA_LIB_PATHS=.:../src: | |||
ifdef ETPAN_LIB | |||
EXTRA_LIB_PATHS:=$(EXTRA_LIB_PATHS)$(patsubst -L%,%,$(ETPAN_LIB)): | |||
endif | |||
ifdef GPGME_LIB | |||
EXTRA_LIB_PATHS:=$(EXTRA_LIB_PATHS)$(patsubst -L%,%,$(GPGME_LIB)): | |||
endif | |||
ifdef NETPGP_LIB | |||
EXTRA_LIB_PATHS:=$(EXTRA_LIB_PATHS)$(patsubst -L%,%,$(NETPGP_LIB)): | |||
endif | |||
ifdef CPPUNIT_LIB | |||
EXTRA_LIB_PATHS:=$(EXTRA_LIB_PATHS)$(patsubst -L%,%,$(CPPUNIT_LIB)): | |||
endif | |||
# Remove trailing ':' | |||
EXTRA_LIB_PATHS:=$(EXTRA_LIB_PATHS::=) | |||
ifeq ($(BUILD_FOR),Darwin) | |||
LIBPATH=DYLD_LIBRARY_PATH | |||
else | |||
LIBPATH=LD_LIBRARY_PATH | |||
endif | |||
# FIXME: this forces a path on execution which overrides system paths for | |||
# libraries like iconv and causes runtime errors. | |||
#TEST_CMD_PFX=$(LIBPATH)=$(EXTRA_LIB_PATHS) | |||
TEST_CMD_PFX= | |||
.PHONY: all clean test | |||
all: | |||
make $(TARGET) | |||
%.d: %.cc | |||
$(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $< | sed -e 's,\($*\)\.o[ :]*,\1.o $@: ,g' > $@ | |||
$(TARGET): $(OBJS) gtest-all.o gtest_main.o | |||
# $(LINK.cc) $(OBJS) $(LOADLIBES) $(LDLIBS) -o $@ | |||
${CXX} ${LDFLAGS} -L${PREFIX}/lib -o $@ $^ -lpEpEngine $(LDLIBS) | |||
gtest-all.o: $(GTEST_DIR)/src/gtest-all.cc | |||
${CXX} ${CXXFLAGS} $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -isystem $(GTEST_DIR)/include -o $@ -c $< | |||
gtest_main.o: $(GTEST_DIR)/src/gtest_main.cc | |||
${CXX} ${CXXFLAGS} $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -isystem $(GTEST_DIR)/include -o $@ -c $< | |||
test: all | |||
$(TEST_CMD_PFX) $(TEST_DEBUGGER) ./$(TARGET) | |||
clean: | |||
$(RM) $(TARGET) $(TARGET).o $(TARGET).d $(OBJS) $(notdir $(basename $(OBJS))) $(DEPS) | |||
# If only the goal 'clean' is given, do not generate and include the '%.d' files.¬ | |||
ifneq ($(MAKECMDGOALS),clean) | |||
-include $(DEPS) | |||
endif |
@ -1,30 +0,0 @@ | |||
-----BEGIN PGP PUBLIC KEY BLOCK----- | |||
mQENBFV4PbEBCADTmjGDsoti/VPoZ3w2oCjLBNq1jWIGMkbiUgCGUQjVsNrSZ80U | |||
7RmA3Pcu3hhiVQNBGA32vL6NPhSJPanVd77s6XVZg+Gq7llbGGkuIxSkJvVrWzYc | |||
kjMsAInlJ8Ll0kHHbgATOlO5OtQ21bLCfWZPSq74HEVzQAPtCGYFvOgpCktKTjms | |||
GXe9ysiYN8CEWMVNbDqXmvFhi4UifpITeQBVM7dtlBw5SoeLZpsHIlKF5i5WPkNw | |||
7nuMag/+lRpOqvPumhOmqybWHuAR/Dq0pOOPh6BzZ4OzOBL96aWUe1dcnIZeBEm8 | |||
oRxYC3nN95YsjtrLK4BQZTYDTzeh8FIccsLdABEBAAG0RHBFcCBUZXN0IEFsaWNl | |||
ICh0ZXN0IGtleSBkb24ndCB1c2UpIDxwZXAudGVzdC5hbGljZUBwZXAtcHJvamVj | |||
dC5vcmc+iQE4BBMBAgAiBQJVeD2xAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIX | |||
gAAKCRCpQR0Xb/AOl5JjCADEBoordVBCmphG6EY+u5yjj/xeQN4Kc1Rl06Ii6m18 | |||
4hnF/osxnTicr+A6Hpwf8whXULuSwXvfuOsVOQdIc2e+1zrecTqyNUWuRs3T7uZ2 | |||
5dvROg1XZuajMPf3wh5lX2rPRhOt3UNXJjQfc1MSYXpmT+PoqFXBzMqJUo2DYcw6 | |||
MSZekoWkIzFXG2s2YNwILwPnLnMesFtzU6mn9qhfoFsQA6aku8AbG+SNehNZvGuu | |||
UiBmu+4UYNoc/RJa7vNWECv9qZQsT820CuoOZS9MFV7nQlgkGoPerlGXil0vkOG1 | |||
gsuQD8QkuaTQpn1vYvRcC0P27qLfrqlPv2Ih2hoIV9tJuQENBFV4PbEBCADQwKB9 | |||
7t2B2nweprfpbH8QgLCzJYaAMrpcaUaJqm+J3C9eaepRXTXGtst1zaLbooG2b3QH | |||
fDzI2CEYMxO5ynmmSBOe06VKw/PagBzK5ur/eOycl0ZPFSXdlDj30BQPvRdJvLS4 | |||
OTMdoKoGpsZDY4hOYj67oHo3TFtrLJCvZruPARkI/pXiOX9FqH4wquNNaYW1qwk/ | |||
Wq3k/gOMwp0xjvc01MbadaiiVquJk6jjPrd2wP4FYxIADAllzMpwFAJSWvgCfmqV | |||
bukYOnaCp3QRQXQkc78TdqGXbD5uwJzkxxiEsMmiGT+7RDLIKwXheKmmGXSwgi8m | |||
+EndUiqMTvOdjyUBABEBAAGJAR8EGAECAAkFAlV4PbECGwwACgkQqUEdF2/wDpeQ | |||
VQgArnfQ7uvG0po/CPepbrdytI2n63U5dm/MFMsvXpZYVYLO/mROc+akZCPwS0yx | |||
tSMKK+tYM9leQx58r89c+K1GeZoko7xziwmZbt5zEITiJp5L6gg7k6CczskPMx07 | |||
gY8ooscBC3cFJhz1A0o73BKPR7J0iupaNmI3sTd1/RNQm6573kGGwc4m2bcQttvN | |||
5ox8yimn2QnK3D+6A+Mmzi3Rd11tF+tAWJIsfaEgDJZn9mOdUkV2ckoSk1K5Pptp | |||
XSsKLOL+e2WuxSMIr8AVeRqkbYYK6UzX6qIgQIrMOuaXqtRaNxNccnzIS1YtdtYE | |||
RSnTaBotNp/FF2wfI7BNFP6r0A== | |||
=wSWl | |||
-----END PGP PUBLIC KEY BLOCK----- |
@ -1,30 +0,0 @@ | |||
-----BEGIN PGP PUBLIC KEY BLOCK----- | |||
mQENBFV4PvYBCADR7kaFLsLFDuGE11u3q2K6eTspAkczU1ahPnSXaVGOIbCQGuL6 | |||
MiDET4vXAY/y1picqJ8OuIe2k0S8eDRIYIHF8arhgTkZQny6Cfy7nheWNnxSZBIo | |||
K/8Zqa9dbNBWwHp2l7LOqM3hS8a0O1mQQrrMlV55qnXWJQFaI3P/nlaGUfe+5DuD | |||
tDom8xJicE8an5nhbsyKyNxlYVePVsQVFiLHMVoNZ6eyfyb/nTBdAdQ0KLZM0vDC | |||
8df/VTevytf/PgunziqD67HuDx8Uxyeht5REIrcBEyrgtnvTkVjZJ2MpbXcY2kam | |||
36OH8T4JoBkxlqjU6UiiqV+k04QzAvmp2/anABEBAAG0Q3BFcCBUZXN0IEpvaG4g | |||
KHRlc3Qga2V5LCBkb24ndCB1c2UpIDxwZXAudGVzdC5qb2huQHBlcC1wcm9qZWN0 | |||
Lm9yZz6JATgEEwECACIFAlV4PvYCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheA | |||
AAoJEBNc1tFw3PV1rQsIAIGxmMHjAQqsZB7CQAdEdWxM+YkGZPAOqMYZrVaf+wiI | |||
kMP25B9JaSYRccYbI+k+Vg19l5vqVv/ixgDLntZWJFt3LakKkTY3R8ghhKImlVVo | |||
gj6ASho0rUoHLpCLuo0t+N+DGTjBOi1tu90U9L3poPsgYOij6pw226M6zXsvsk4h | |||
Uuljq9ZysKbjGEoqahOLf7p7gjrtCceOQfqnXKNE9QlpQtw/pnwTa97gVR4l7DaK | |||
UEXzASobjEywfCoMH9SaoVL5M/FsIkMSasg6H+J4U8YdxE5x2BRbTQe+90/RlVg5 | |||
bNCK9nMKBMBr0KeeJn9JZRykwKOgV5vZl0lQ5BEKEia5AQ0EVXg+9gEIAMEvDo98 | |||
6hv9pk4YKLLRhZVyp3KiDQ2ymjdl8v/kh2f3s2roNhF5o2pTfq51oTCIex0Wiyri | |||
7o/1V21e3wYS14uRzF86a5cvmOdR/w1+NuW7hoW9RWBEaC7O4N/TtU7AAQmav8mA | |||
CJBHwdoE98BKmJNAG3SOh/kSdh5HZrL5Yrx4tX7dkJOXI2Jql0IS4R37dmAX5K+9 | |||
MqIFDJf0I73iiBGr0v6mbOCEonBznF/6H905Ci2uPZ38DHixN2cyToZg7CkTfC7K | |||
8xmHFv1lcRzlTMyNC0xOlirYPPlhnGslyiyTJqHVyrH/Z788x6wV9ifPnDZfGmRk | |||
C2V8HTBRQhdIuREAEQEAAYkBHwQYAQIACQUCVXg+9gIbDAAKCRATXNbRcNz1dUKv | |||
B/46nvjKNTtPJXidArkPP8rY57kEVWg8spkqBWIeV3AGMzh9qVfRRv4Pfl9IgHaO | |||
vXkoKip9D4zvgpB566gIiE3B3Y4vEzToiBxqVo5L5gzmbG6J1cQdHz6rmKSHPf4z | |||
rNQbCxaGXIJ697mlfKIiIBrV67sH3Xm2l6ECp8PiQGImLFaBI2SbuLSHSz1nC910 | |||
ln8AhSYAYlxYBdateo3IZwAZSQibCF/xChvnDcDjZa9GWo3iMlSPAoKXacbrdenj | |||
F/X9yyoeTtTNTuNDGr9Sms72wU+SAYErLDcik1pRhNDmLXEjQC7eBT9WFemkfOVj | |||
mDKjonb9yAz6knxC5kRE5ChX | |||
=csku | |||
-----END PGP PUBLIC KEY BLOCK----- |
@ -1,30 +0,0 @@ | |||
-----BEGIN PGP PUBLIC KEY BLOCK----- | |||
mQENBFV4Pl8BCACuukQLwsHftH5jkVsSL7COFhamNsEE8lZ8MG1f1Rx5ztPuZTna | |||
YXyWODgpj2Bxz0TcP+Q17GbLKse7TWD1k9i1RzLWz8ZSCLYq2TtjLWPleVuGGWeq | |||
Y3tTWHC/nFbivolNPA0mL2038TGdBolPaZiPZ4P8wuQVYNfDqi4utcezGDNS8OHh | |||
EPhfyKKoSM79HLoUPc6xsfimxPMrylI/i8bFvfDYz5vmydefvAxNhqjLH3Gmhj1p | |||
nIn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gkQWb/0iMnC7jlqbwf/ | |||
dP4sXDRiR5uVMh5WhOn1S8MnHZhLWAQ6fI9/KxggCPhgY6zAgszPMutzBsQlV4P6 | |||
QX30d99IMJrzGYYxjN7Z6fF7us9u103+GTzGQH7/47JG0eSTSaKQvqEaN1+6M/OB | |||
ZKcwNW6xHa+lhIS5nJGV3Oey/RFQwucBujQbtyjDN3aGshwqzhJXFBlF3RqFzLxu | |||
AJmeOVedaKvdPjRhgFuxhkicUhVp27qXQCpDpkUkj9hb75yCE6pAzopO6s65yHsn | |||
FyehwgyMrfpTPlPM86B1LH4IEwSaOrEJSdHnnFD8nnSIjRyfra3dsI/RVNmYX8Ek | |||
MGICzoR4lWcYFShJQM6QQg== | |||
=ugiE | |||
-----END PGP PUBLIC KEY BLOCK----- |
@ -1,57 +0,0 @@ | |||
-----BEGIN PGP PRIVATE KEY BLOCK----- | |||
lQOYBFV4PbEBCADTmjGDsoti/VPoZ3w2oCjLBNq1jWIGMkbiUgCGUQjVsNrSZ80U | |||
7RmA3Pcu3hhiVQNBGA32vL6NPhSJPanVd77s6XVZg+Gq7llbGGkuIxSkJvVrWzYc | |||
kjMsAInlJ8Ll0kHHbgATOlO5OtQ21bLCfWZPSq74HEVzQAPtCGYFvOgpCktKTjms | |||
GXe9ysiYN8CEWMVNbDqXmvFhi4UifpITeQBVM7dtlBw5SoeLZpsHIlKF5i5WPkNw | |||
7nuMag/+lRpOqvPumhOmqybWHuAR/Dq0pOOPh6BzZ4OzOBL96aWUe1dcnIZeBEm8 | |||
oRxYC3nN95YsjtrLK4BQZTYDTzeh8FIccsLdABEBAAEAB/sFU/ukPwoi9PwtwH/D | |||
/rA8tf5GYKKgNULTKanRN/8w7LhJ0mOtKmjcvKj0z6CqDduqiS8pDL4cH4QiP/mn | |||
UFjhu6iZ3oDjMc64dudANQNQZyfzHNOl5bChAEMG16cZz58oyJLCMEvuOYvaH7pV | |||
w7/ZKcWc7OQzyh/ivNm0kjni2fMJbX6H11obmpnHH1iw3tw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zMqJUo2DYcw6MSZekoWkIzFXG2s2YNwILwPnLnMe | |||
sFtzU6mn9qhfoFsQA6aku8AbG+SNehNZvGuuUiBmu+4UYNoc/RJa7vNWECv9qZQs | |||
T820CuoOZS9MFV7nQlgkGoPerlGXil0vkOG1gsuQD8QkuaTQpn1vYvRcC0P27qLf | |||
rqlPv2Ih2hoIV9tJnQOYBFV4PbEBCADQwKB97t2B2nweprfpbH8QgLCzJYaAMrpc | |||
aUaJqm+J3C9eaepRXTXGtst1zaLbooG2b3QHfDzI2CEYMxO5ynmmSBOe06VKw/Pa | |||
gBzK5ur/eOycl0ZPFSXdlDj30BQPvRdJvLS4OTMdoKoGpsZDY4hOYj67oHo3TFtr | |||
LJCvZruPARkI/pXiOX9FqH4wquNNaYW1qwk/Wq3k/gOMwp0xjvc01MbadaiiVquJ | |||
k6jjPrd2wP4FYxIADAllzMpwFAJSWvgCfmqVbukYOnaCp3QRQXQkc78TdqGXbD5u | |||
wJzkxxiEsMmiGT+7RDLIKwXheKmmGXSwgi8m+EndUiqMTvOdjyUBABEBAAEAB/sG | |||
nGJmGT1m/k/HNY2A4ncugybQEOiJe4xy6VYVqBc8GPl1OS/gR64wlst1daT6T+iL | |||
9KEKl3os0Z8QWetpCzhERkd8dInT5vCnFdQjmaxtmVX5RQynK+gntDOZfHuq08Nj | |||
/0pZWbK3KzEAliw/SCyx78hPuelY7OL/Ge7okR2FjdXmtcMLw7NN+0c+hoSAuDiV | |||
jbPlegga6iaGljIJCapf1YkmwuUZc2pCEfoxllRdQ8UKSLwht4LPb5jBOAiynw4W | |||
lMY/5hZwRVG2NfOXbwC1kMUQcItBJviKQXaaruqXX7jnglWbCrgg/tQJ6EUkLy76 | |||
InM6/0NX6StNEY4vau95BADeTwBLkJqkcAxX21GoT9UjhRh9yhKgehER1cplrhE3 | |||
B3HuEzvCCr+mRCPyK7J0pE3LQkqccDW19noOtsjl6ODStXjk4Pp/MFftJrIx9s9u | |||
JFv5RTTVBxjS8hRRHF49rMYeOKpcD02Id+u3UL1ISuX40Ljvz6oacO9XA73gkA7L | |||
aQQA8GOupiWYvZwYPTJ8glUfafEtniNspTOtEDayvMAOHiWIrLzhQ0e6AS1LDB8E | |||
YWu+GUI9661PRMn1SlhX9vZhGzSllGxk9CyBbeKhyuiQ34s8M0pwHLmT89bBqZhk | |||
/0wsRqkrKHkcJYkcLLlYw5zAGrm3kvyQgjf6Tiq2d+rU0dkD/AxnmEWqC08ovLZo | |||
vEZR+JKWlAp8l4YS5f5suPD6PiKeLinCujpq7VbsyhcZQNo1oA7qgLvUFwz2lyRi | |||
eCDBCndXYLzJ1LPkHXv0ZcxrSLUSpNpWekEM5sBug8i3z4vhh4EA30gdOYqLPquu | |||
BQoyFrPysylnvHTVRkA/wBy5E7Y0OnyJAR8EGAECAAkFAlV4PbECGwwACgkQqUEd | |||
F2/wDpeQVQgArnfQ7uvG0po/CPepbrdytI2n63U5dm/MFMsvXpZYVYLO/mROc+ak | |||
ZCPwS0yxtSMKK+tYM9leQx58r89c+K1GeZoko7xziwmZbt5zEITiJp5L6gg7k6Cc | |||
zskPMx07gY8ooscBC3cFJhz1A0o73BKPR7J0iupaNmI3sTd1/RNQm6573kGGwc4m | |||
2bcQttvN5ox8yimn2QnK3D+6A+Mmzi3Rd11tF+tAWJIsfaEgDJZn9mOdUkV2ckoS | |||
k1K5PptpXSsKLOL+e2WuxSMIr8AVeRqkbYYK6UzX6qIgQIrMOuaXqtRaNxNccnzI | |||
S1YtdtYERSnTaBotNp/FF2wfI7BNFP6r0A== | |||
=kV7k | |||
-----END PGP PRIVATE KEY BLOCK----- |
@ -1,57 +0,0 @@ | |||
-----BEGIN PGP PRIVATE KEY BLOCK----- | |||
lQOYBFV4PvYBCADR7kaFLsLFDuGE11u3q2K6eTspAkczU1ahPnSXaVGOIbCQGuL6 | |||
MiDET4vXAY/y1picqJ8OuIe2k0S8eDRIYIHF8arhgTkZQny6Cfy7nheWNnxSZBIo | |||
K/8Zqa9dbNBWwHp2l7LOqM3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m2l6ECp8PiQGImLFaBI2SbuLSH | |||
Sz1nC910ln8AhSYAYlxYBdateo3IZwAZSQibCF/xChvnDcDjZa9GWo3iMlSPAoKX | |||
acbrdenjF/X9yyoeTtTNTuNDGr9Sms72wU+SAYErLDcik1pRhNDmLXEjQC7eBT9W | |||
FemkfOVjmDKjonb9yAz6knxC5kRE5ChX | |||
=7r/5 | |||
-----END PGP PRIVATE KEY BLOCK----- |
@ -1,57 +0,0 @@ | |||
-----BEGIN PGP PRIVATE KEY BLOCK----- | |||
lQOYBFV4Pl8BCACuukQLwsHftH5jkVsSL7COFhamNsEE8lZ8MG1f1Rx5ztPuZTna | |||
YXyWODgpj2Bxz0TcP+Q17GbLKse7TWD1k9i1RzLWz8ZSCLYq2TtjLWPleVuGGWeq | |||
Y3tTWHC/nFbivolNPA0mL2038TGdBolPaZiPZ4P8wuQVYNfDqi4utcezGDNS8OHh | |||
EPhfyKKoSM79HLoUPc6xsfimxPMrylI/i8bFvfDYz5vmydefvAxNhqjLH3Gmhj1p | |||
nInsraEiyh7Y2zAxCfr6hD9nky7WixBinKFFhQpcUu1o+Ie6UGwLVbTyRMOcRsob | |||
yahqA/m2HfDRj1Y+n8HHqsQkB2BtmMYXla3jABEBAAEAB/wKqiU2GVr1zJ5iqGZ7 | |||
hS9zDk3imXjAuwpK7GlfAVk9snSRpycK7IrxeX8s3J30qsOxGv5sYvOUcGK35kCs | |||
eV78RyfthmM8WMcs28ATgE7WtkhyUAGmTwnuq9+Ldz9MYEUHUrEaXnTkBocFmd0I | |||
Qx5qZLvHHtDtRx4HfAJZz0/5kj8KyKYB5cYsvRoLYdCWuxeIbJu5FYtHHBywNFnZ | |||
Qt8STaQqZPD0gPh3ahzY8KYJFZbSFpGfaH0AX5dkFpUJdyad4R2c9ZOmnaK3W0Ba | |||
cdQSdi66iiT0UG7f6ECR9HfI+nVfshOVLZA90p+LqLW51S7iBeFAoZyYfKuNrE9b | |||
pV3VBADNf9Ec2CJ3jo2LrTrkN1Hkcj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M8CPDjdWbFu1ba | |||
KbPA9Lc/SHgpg0vbdiZ4PWOqsqnig834r+3VfLX/dxsEANAWGGJRNTHmIwoC4HsV | |||
+KiyApbBRw2TCHxJjlzFY2OFpe8RuGKE7HpKiSYjarGxP0RlESrbie0nbJ8FooIH | |||
gY2ipO3khgK4MK1Xua405mNVzge9oNJPgWEtLabubimVnTwjU6O7m79Xl+R9BYb1 | |||
GVZm7f/WMDL7BsNVvhMVjdgiOOOJAR8EGAECAAkFAlV4Pl8CGwwACgkQWb/0iMnC | |||
7jlqbwf/dP4sXDRiR5uVMh5WhOn1S8MnHZhLWAQ6fI9/KxggCPhgY6zAgszPMutz | |||
BsQlV4P6QX30d99IMJrzGYYxjN7Z6fF7us9u103+GTzGQH7/47JG0eSTSaKQvqEa | |||
N1+6M/OBZKcwNW6xHa+lhIS5nJGV3Oey/RFQwucBujQbtyjDN3aGshwqzhJXFBlF | |||
3RqFzLxuAJmeOVedaKvdPjRhgFuxhkicUhVp27qXQCpDpkUkj9hb75yCE6pAzopO | |||
6s65yHsnFyehwgyMrfpTPlPM86B1LH4IEwSaOrEJSdHnnFD8nnSIjRyfra3dsI/R | |||
VNmYX8EkMGICzoR4lWcYFShJQM6QQg== | |||
=rBox | |||
-----END PGP PRIVATE KEY BLOCK----- |
@ -1,29 +0,0 @@ | |||
#! /usr/bin/env python3 | |||
# This file is under GNU General Public License 3.0 | |||
# see LICENSE.txt | |||
from os import listdir, getcwd | |||
from os.path import isfile, join | |||
from re import sub | |||
import os | |||
import stat | |||
import datetime | |||
srcpath = join(getcwd(), "src/engine_tests") | |||
ls = listdir(srcpath) | |||
for f in ls: | |||
if isfile(join(srcpath, f)): | |||
if (f.endswith(".cc")): | |||
suite = sub('\.cc$', '', f) | |||
outfile = open(suite, 'w') | |||
output = ( | |||
"#!/bin/bash\n" | |||
"# This is a convenience script for launching individual tests and tab completion with TestDriver \n\n" + | |||
"./TestDriver " + suite + "\n\n") | |||
outfile.write(output) | |||
os.chmod(suite, | |||
(stat.S_IRWXU | stat.S_IRGRP | stat.S_IROTH | stat.S_IXGRP | stat.S_IXOTH)) | |||
outfile.close() |
@ -1,112 +0,0 @@ | |||
#! /usr/bin/env python3 | |||
# This file is under GNU General Public License 3.0 | |||
# see LICENSE.txt | |||
import argparse | |||
from os import listdir, getcwd | |||
from os.path import isfile, join | |||
from re import sub | |||
import datetime | |||
srcpath = join(getcwd(), "src/engine_tests") | |||
ls = listdir(srcpath) | |||
suites = [] | |||
indent = " " | |||
parser = argparse.ArgumentParser() | |||
parser.add_argument("--exclude", "-x", help="Comma-separated list of tests to exclude from test suite build") | |||
args = parser.parse_args() | |||
exclude_arg = args.exclude | |||
exclude_list = [] | |||
if exclude_arg: | |||
exclude_list = exclude_arg.split(",") | |||
for x in exclude_list: | |||
x.replace(" ","") | |||
for f in ls: | |||
if isfile(join(srcpath, f)): | |||
if (f.endswith(".cc")): | |||
suite = sub('\.cc$', '', f) | |||
if not suite in exclude_list: | |||
suites.append(suite) | |||
license = ('' | |||
'// This file is under GNU General Public License 3.0\n' | |||
'// see LICENSE.txt\n\n') | |||
header = license + "//\n// src/SuiteMaker.cc generated by gensuitemaker.py - changes may be overwritten. You've been warned!\n//\n\n" | |||
header += ('' | |||
'#include <cpptest.h>\n' | |||
'#include <cpptest-suite.h>\n' | |||
'#include <memory>\n' | |||
'#include <vector>\n' | |||
'#include "SuiteMaker.h"\n') | |||
suiteincludes = "" | |||
for s in suites: | |||
suiteincludes += '#include "' + s + '.h"\n' | |||
output = header + "\n// Begin where we generate stuff\n" + suiteincludes + "\n" | |||
output += ("\n" | |||
"const char* SuiteMaker::all_suites[] = {\n") | |||
first = True | |||
for s in suites: | |||
output += indent + '"' + s + '",\n' | |||
output += "};\n\n" | |||
output += ( | |||
'// This file is generated, so magic constants are ok.\n' | |||
'int SuiteMaker::num_suites = ') | |||
output += str(len(suites)) + ";\n\n" | |||
output += "void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {\n" | |||
first = True | |||
for s in suites: | |||
output += indent | |||
if not first: | |||
output += "else " | |||
else: | |||
first = False | |||
output += ('if (strcmp(test_class_name, "' + s + '") == 0)\n' + | |||
indent + indent + '*test_suite = new ' + s + '(test_class_name, test_home);\n') | |||
output += "}\n\n" | |||
output += ( | |||
'void SuiteMaker::suitemaker_buildlist(const char** test_class_names, int num_to_run, const char* test_home, std::vector<Test::Suite*>& test_suites) {\n' | |||
' for (int i = 0; i < num_to_run; i++) {\n' | |||
' Test::Suite* suite = NULL;\n' | |||
' SuiteMaker::suitemaker_build(test_class_names[i], test_home, &suite);\n' | |||
' if (!suite)\n' | |||
' throw std::runtime_error("Could not create a test suite instance."); // FIXME, better error, cleanup, obviously\n' | |||
' test_suites.push_back(suite);\n' | |||
' }\n' | |||
'}' | |||
'\n' | |||
'void SuiteMaker::suitemaker_buildall(const char* test_home, std::vector<Test::Suite*>& test_suites) {\n' | |||
' SuiteMaker::suitemaker_buildlist(SuiteMaker::all_suites, SuiteMaker::num_suites, test_home, test_suites);\n' | |||
'}\n\n') | |||
suitemaker = open("src/SuiteMaker.cc", 'w') | |||
suitemaker.write(output) | |||
suitemaker.close() | |||
generated_at = ("src/SuiteMaker.cc" + " generated at " + datetime.datetime.now().strftime('%c')) | |||
print(generated_at) |
@ -1,124 +0,0 @@ | |||
#! /usr/bin/env python3 | |||
import argparse | |||
import os | |||
import subprocess | |||
import re | |||
def decamel(name): | |||
retval = re.sub('([A-Z])', r'_\1', name).lower() | |||
return re.sub('^_', r'', retval) | |||
parser = argparse.ArgumentParser() | |||
parser.add_argument("suite_name", help="(convention is <NameInUpperCamelCase>, e.g. StringpairList - suite created will then be StringpairListTests)") | |||
parser.add_argument("--clobber", "-c", help="Overwrite extant files (must be explicitly indicated)", action='store_true') | |||
gengroup = parser.add_mutually_exclusive_group() | |||
gengroup.add_argument("--no_src", help="Generate header only, no source", action='store_true') | |||
gengroup.add_argument("--no_hdr", help="Generate source only, no header", action='store_true') | |||
typegroup = parser.add_mutually_exclusive_group() | |||
typegroup.add_argument("--test", "-t", help="Just generate a generic test suite (no engine initialisation or db/gpg setup/teardown - default)", action='store_true') | |||
typegroup.add_argument("--indiv", "-i", help="Generate a test suite with engine initialisation/release and gpg/db teardown between each test function", action='store_true') | |||
typegroup.add_argument("--session", "-s", help="Generate a test suite with engine initialisation/release and gpg/db teardown only at the beginning and end of the test suite", action='store_true') | |||
args = parser.parse_args() | |||
suitename = args.suite_name | |||
test_suite = suitename + "Tests" | |||
superclass = "EngineTestSuite" | |||
if args.indiv: | |||
superclass = "EngineTestIndividualSuite" | |||
elif args.session: | |||
superclass = "EngineTestSessionSuite" | |||
print("\nCreating " + test_suite + " as an " + superclass + "\n") | |||
uncamel = decamel(suitename) | |||
print(uncamel) | |||
nspace = "using namespace std;\n\n" | |||
license = ("// This file is under GNU General Public License 3.0\n" | |||
"// see LICENSE.txt\n\n") | |||
default_single_testname = "check_" + re.sub('_tests$', r'', uncamel) | |||
if not args.no_hdr: | |||
header_def = uncamel.upper() + "_H" | |||
deftxt = "#ifndef " + header_def + "\n#define " + header_def + "\n\n" | |||
header_inc = ("#include <string>\n" | |||
"#include \"" + superclass + ".h\"\n\n") | |||
header = license + deftxt + header_inc + nspace | |||
classdef = "class " + test_suite + " : public " + superclass + " {\n" + \ | |||
" public:\n" + \ | |||
" " + test_suite + "(string test_suite, string test_home_dir);\n" + \ | |||
" private:\n" \ | |||
" void " + default_single_testname + "();\n" + \ | |||
"};\n" | |||
header_file = header + classdef + "\n#endif\n" | |||
#print(header_file) | |||
do_write = True | |||
hfile_name = test_suite + ".h" | |||
hfile_path = os.path.join(os.path.join(os.getcwd(), "include"), hfile_name) | |||
if not args.clobber: | |||
if (os.path.isfile(hfile_path)): | |||
print(hfile_path + " exists. Not writing header file. Use --clobber to overwrite.") | |||
do_write = False | |||
if do_write: | |||
header_out = open(hfile_path, 'w') | |||
header_out.write(header_file) | |||
header_out.close() | |||
if not args.no_src: | |||
src_inc = ('#include <stdlib.h>\n' | |||
'#include <cstring>\n' | |||
'#include <string>\n\n' | |||
'#include <cpptest.h>\n' | |||
'#include "test_util.h"\n\n' | |||
'#include "pEpEngine.h"\n\n' | |||
'#include "' + superclass +'.h"\n' | |||
'#include "' + test_suite + '.h"\n\n') | |||
test_suite_prefix = test_suite + "::" | |||
fname = test_suite_prefix + default_single_testname | |||
constructor = test_suite_prefix + test_suite + "(string suitename, string test_home_dir) :\n" + \ | |||
" " + superclass + "::" + superclass + "(suitename, test_home_dir) {\n" + \ | |||
" add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string(\"" + fname + "\"),\n" + \ | |||
" static_cast<Func>(&" + fname + ")));\n" + \ | |||
"}\n\n" | |||
def_funct = "void " + test_suite_prefix + default_single_testname + "() {\n" + \ | |||
" TEST_ASSERT(true);\n" + \ | |||
"}\n\n" | |||
src_file = license + src_inc + nspace + constructor + def_funct | |||
do_write = True | |||
sfile_name = test_suite + ".cc" | |||
sfile_path = os.path.join(os.path.join(os.getcwd(), "src/engine_tests"), sfile_name) | |||
if not args.clobber: | |||
if (os.path.isfile(sfile_path)): | |||
print(sfile_path + " exists. Not writing source file. Use --clobber to overwrite.") | |||
do_write = False | |||
if do_write: | |||
src_out = open(sfile_path, 'w') | |||
src_out.write(src_file) | |||
src_out.close() |
@ -1,31 +0,0 @@ | |||
#include "TestConstants.h" | |||
#include <cpptest.h> | |||
#include <cpptest-suite.h> | |||
#include <cpptest-textoutput.h> | |||
#include <stdlib.h> | |||
#include <unistd.h> | |||
#include <ftw.h> | |||
#include "EngineTestSuite.h" | |||
#include "EngineTestIndividualSuite.h" | |||
using namespace std; | |||
// Constructor | |||
EngineTestIndividualSuite::EngineTestIndividualSuite(string suitename, string test_home_dir) | |||
: EngineTestSuite(suitename, test_home_dir) { | |||
} | |||
EngineTestIndividualSuite::~EngineTestIndividualSuite() { | |||
} | |||
void EngineTestIndividualSuite::setup() { | |||
EngineTestSuite::setup(); | |||
set_full_env(); // This will be called by default before every test | |||
} | |||
void EngineTestIndividualSuite::tear_down() { | |||
restore_full_env(); | |||
EngineTestSuite::tear_down(); | |||
} |
@ -1,31 +0,0 @@ | |||
#include <cpptest.h> | |||
#include "TestConstants.h" | |||
#include <cpptest-suite.h> | |||
#include <cpptest-textoutput.h> | |||
#include <stdlib.h> | |||
#include <unistd.h> | |||
#include <ftw.h> | |||
#include "EngineTestSuite.h" | |||
#include "EngineTestSessionSuite.h" | |||
using namespace std; | |||
// Constructor | |||
EngineTestSessionSuite::EngineTestSessionSuite(string suitename, string test_home_dir) | |||
: EngineTestSuite(suitename, test_home_dir) {} | |||
EngineTestSessionSuite::~EngineTestSessionSuite() {} | |||
void EngineTestSessionSuite::setup() { | |||
EngineTestSuite::setup(); | |||
if (on_test_number == 1) | |||
set_full_env(); | |||
} | |||
void EngineTestSessionSuite::tear_down() { | |||
if (on_test_number == number_of_tests) | |||
restore_full_env(); | |||
EngineTestSuite::tear_down(); | |||
} |
@ -1,280 +0,0 @@ | |||
#include <stdlib.h> | |||
#include <sys/stat.h> | |||
#include <errno.h> | |||
#include <stdlib.h> | |||
#include <unistd.h> | |||
#include <ftw.h> | |||
#include <assert.h> | |||
#include <fstream> | |||
#include <iostream> | |||
#include <sys/types.h> | |||
#include <sys/stat.h> | |||
#include <cpptest.h> | |||
#include <string> | |||
#include <vector> | |||
#include <utility> | |||
#include "platform_unix.h" | |||
#include "test_util.h" | |||
#include "EngineTestSuite.h" | |||
#include "pEpTestStatic.h" | |||
#include <algorithm> | |||
#include "TestConstants.h" | |||
using namespace std; | |||
// Constructor | |||
EngineTestSuite::EngineTestSuite(string suitename, string test_home_dir) { | |||
// FIXME: deal with base | |||
test_home = test_home_dir; | |||
number_of_tests = 0; | |||
on_test_number = 0; | |||
real_home = getenv("HOME"); | |||
cached_messageToSend = NULL; | |||
cached_inject_sync_event = NULL; | |||
} | |||
EngineTestSuite::~EngineTestSuite() {} | |||
void EngineTestSuite::add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()> test_func) { | |||
test_map.insert(test_func); | |||
register_test(test_func.second, test_func.first); | |||
number_of_tests++; | |||
} | |||
void EngineTestSuite::copy_conf_file_to_test_dir(const char* dest_path, const char* conf_orig_path, const char* conf_dest_name) { | |||
string conf_dest_path = dest_path; | |||
struct stat pathinfo; | |||
if(stat(conf_dest_path.c_str(), &pathinfo) != 0) { | |||
int errchk = mkdir(conf_dest_path.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); | |||
if (errchk != 0) | |||
throw std::runtime_error("Error accessing conf file directory."); | |||
} | |||
conf_dest_path += "/"; | |||
conf_dest_path += conf_dest_name; | |||
ifstream src(conf_orig_path); | |||
ofstream dst(conf_dest_path.c_str(), ios::trunc); | |||
assert(src); | |||
assert(dst); | |||
dst << src.rdbuf(); | |||
src.close(); | |||
dst.close(); | |||
} | |||
void EngineTestSuite::add_file_to_gpg_dir_queue(string copy_from, string dst_fname) { | |||
gpgdir_fileadd_queue.push_back(make_pair(copy_from, dst_fname)); | |||
} | |||
void EngineTestSuite::add_file_to_home_dir_queue(string copy_from, string dst_fname) { | |||
homedir_fileadd_queue.push_back(make_pair(copy_from, dst_fname)); | |||
} | |||
void EngineTestSuite::process_file_queue(string dirname, vector<pair<string, string>> file_queue) { | |||
if (file_queue.empty()) | |||
return; | |||
vector<pair<string, string>>::iterator it; | |||
for (it = file_queue.begin(); it != file_queue.end(); it++) { | |||
copy_conf_file_to_test_dir(dirname.c_str(), it->first.c_str(), it->second.c_str()); | |||
} | |||
file_queue.clear(); | |||
} | |||
void EngineTestSuite::set_full_env() { | |||
set_full_env(NULL, NULL, NULL); | |||
} | |||
void EngineTestSuite::set_full_env(const char* gpg_conf_copy_path, const char* gpg_agent_conf_file_copy_path, const char* db_conf_file_copy_path) { | |||
int success = 0; | |||
struct stat dirchk; | |||
set_my_name(); | |||
// FIXME | |||
#ifndef USE_NETPGP | |||
#ifndef USE_SEQUOIA | |||
success = system("gpgconf --kill all"); | |||
if (success != 0) | |||
throw std::runtime_error("SETUP: Error when executing 'gpgconf --kill all'."); | |||
#endif | |||
#endif | |||
if (stat(test_home.c_str(), &dirchk) == 0) { | |||
if (!S_ISDIR(dirchk.st_mode)) | |||
throw std::runtime_error(("The test directory, " + test_home + "exists, but is not a directory.").c_str()); | |||
struct stat buf; | |||
if (stat(test_home.c_str(), &buf) == 0) { | |||
int success = nftw((test_home + "/.").c_str(), util_delete_filepath, 100, FTW_DEPTH); | |||
} | |||
} | |||
else { | |||
int errchk = mkdir(test_home.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); | |||
cout << errchk << endl; | |||
if (errchk != 0) | |||
throw std::runtime_error("Error creating a test directory."); | |||
} | |||
if (my_name.size() > pEpTestStatic::classname_chars) | |||
my_name.resize(pEpTestStatic::classname_chars); | |||
if (on_test_number > pEpTestStatic::max_test_num) { | |||
cerr << "Warning - there are at least " << pEpTestStatic::max_test_num << " tests in this suite. While this probably won't cause " | |||
<< endl << "problems, there is an obscure possibility that if your test path is REALLY REALLY LONG, tests will fail because gpg-agent " | |||
<< endl << "won't start with huge paths. In general, however, we stop well before these limits, and pEpTestStatic::testnum_path_chars " | |||
<< endl << "is overly conservative, so you probably don't need to worry." << endl; | |||
} | |||
temp_test_home = test_home + "/" + my_name; | |||
int errchk = mkdir(temp_test_home.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); | |||
if (errchk != 0 && errno != EEXIST) | |||
throw std::runtime_error("Error creating a test directory."); | |||
temp_test_home += "/" + to_string(on_test_number); | |||
errchk = mkdir(temp_test_home.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); | |||
if (errchk != 0) | |||
throw std::runtime_error("Error creating a test directory."); | |||
// TODO: This is *nix specific, which the current testing env is anyway, | |||
// but it needn't remain so forever and always | |||
string home = getenv("HOME"); | |||
char* tmp = NULL; | |||
tmp = getenv("GNUPGHOME"); | |||
prev_pgp_home.clear(); | |||
if (tmp) | |||
prev_pgp_home = tmp; | |||
if (temp_test_home.empty()) | |||
throw std::runtime_error("SETUP: BAD INITIALISATION. No test home."); | |||
assert(temp_test_home.compare(home) != 0); | |||
assert(temp_test_home.compare(home + "/") != 0); | |||
assert(temp_test_home.compare(home + "/.gnupg") != 0); // This is an EXCLUSION test, so we leave this. | |||
assert(temp_test_home.compare(home + ".gnupg") != 0); | |||
assert(temp_test_home.compare(home + "/gnupg") != 0); | |||
assert(temp_test_home.compare(home + "gnupg") != 0); | |||
assert(temp_test_home.compare(prev_pgp_home) != 0); | |||
assert(temp_test_home.compare(prev_pgp_home + "/gnupg") != 0); | |||
assert(temp_test_home.compare(prev_pgp_home + "gnupg") != 0); | |||
assert(temp_test_home.compare(prev_pgp_home + "/.gnupg") != 0); | |||
assert(temp_test_home.compare(prev_pgp_home + ".gnupg") != 0); | |||
if (temp_test_home.compare(home) == 0 || temp_test_home.compare(home + "/") == 0 || | |||
temp_test_home.compare(home + "/gnupg") == 0 || temp_test_home.compare(home + "gnupg") == 0 || | |||
temp_test_home.compare(home + "/.gnupg") == 0 || temp_test_home.compare(home + ".gnupg") == 0 || | |||
temp_test_home.compare(prev_pgp_home) == 0 || temp_test_home.compare(prev_pgp_home + "/gnupg") == 0 || | |||
temp_test_home.compare(prev_pgp_home + "gnupg") == 0 || temp_test_home.compare(prev_pgp_home + "/.gnupg") == 0 || | |||
temp_test_home.compare(prev_pgp_home + ".gnupg") == 0) | |||
throw std::runtime_error("SETUP: new pgp homedir threatens to mess up user pgp homedir (and delete all their keys). NO DICE."); | |||
// cout << "Ok - checked if new test home will be safe. We'll try and make the directory, deleting it if it has already exists." << endl; | |||
cout << "Test home directory is " << temp_test_home << endl; | |||
struct stat buf; | |||
success = setenv("GNUPGHOME", (temp_test_home + "/gnupg").c_str(), 1); | |||
if (success != 0) | |||
throw std::runtime_error("SETUP: Error when setting GNUPGHOME."); | |||
cout << "New GNUPGHOME is " << getenv("GNUPGHOME") << endl << endl; | |||
success = setenv("HOME", temp_test_home.c_str(), 1); | |||
if (success != 0) | |||
throw std::runtime_error("SETUP: Cannot set test_home for init."); | |||
string tmp_gpg_dir = temp_test_home + "/.gnupg"; | |||
process_file_queue(tmp_gpg_dir, gpgdir_fileadd_queue); | |||
process_file_queue(temp_test_home, homedir_fileadd_queue); | |||
if (gpg_conf_copy_path) | |||
copy_conf_file_to_test_dir((temp_test_home + "/gnupg").c_str(), gpg_conf_copy_path, "gpg.conf"); | |||
if (gpg_agent_conf_file_copy_path) | |||
copy_conf_file_to_test_dir((temp_test_home + "/gnupg").c_str(), gpg_agent_conf_file_copy_path, "gpg-agent.conf"); | |||
if (db_conf_file_copy_path) | |||
copy_conf_file_to_test_dir(temp_test_home.c_str(), db_conf_file_copy_path, ".pEp_management.db"); | |||
unix_local_db(true); | |||
gpg_conf(true); | |||
gpg_agent_conf(true); | |||
// cout << "calling init()\n"; | |||
PEP_STATUS status = init(&session, cached_messageToSend, cached_inject_sync_event); | |||
#ifndef USE_NETPGP | |||
#ifndef USE_SEQUOIA | |||
success = system("gpgconf --create-socketdir"); | |||
if (success != 0) | |||
throw std::runtime_error("RESTORE: Error when executing 'gpgconf --create-socketdir'."); | |||
system("gpg-connect-agent /bye 2>/dev/null"); // Just in case - otherwise, we die on MacOS sometimes. Is this enough?? | |||
#endif | |||
#endif | |||
assert(status == PEP_STATUS_OK); | |||
assert(session); | |||
// cout << "init() completed.\n"; | |||
} | |||
void EngineTestSuite::restore_full_env() { | |||
release(session); | |||
session = NULL; | |||
int success = 0; | |||
#ifndef USE_NETPGP | |||
#ifndef USE_SEQUOIA | |||
success = system("gpgconf --kill all"); | |||
if (success != 0) | |||
throw std::runtime_error("RESTORE: Error when executing 'gpgconf --kill all'."); | |||
success = system("gpgconf --remove-socketdir"); | |||
if (success != 0) | |||
throw std::runtime_error("RESTORE: Error when executing 'gpgconf --remove-socketdir'."); | |||
#endif | |||
#endif | |||
success = setenv("GNUPGHOME", prev_pgp_home.c_str(), 1); | |||
if (success != 0) | |||
throw std::runtime_error("RESTORE: Warning - cannot restore GNUPGHOME. Either set environment variable manually back to your home, or quit this session!"); | |||
success = nftw((test_home + "/.").c_str(), util_delete_filepath, 100, FTW_DEPTH); | |||
success = setenv("HOME", real_home.c_str(), 1); | |||
if (success != 0) | |||
throw std::runtime_error("RESTORE: Cannot reset home directory! Either set environment variable manually back to your home, or quit this session!"); | |||
// else | |||
// cout << "RESTORE: HOME is now " << getenv("HOME") << endl; | |||
unix_local_db(true); | |||
gpg_conf(true); | |||
gpg_agent_conf(true); | |||
} | |||
void EngineTestSuite::setup() { | |||
on_test_number++; | |||
} | |||
void EngineTestSuite::tear_down() {} | |||
void EngineTestSuite::set_my_name() { | |||
my_name = typeid(*this).name(); | |||
} |
@ -1,302 +0,0 @@ | |||
// This file is under GNU General Public License 3.0 | |||
// see LICENSE.txt | |||
// | |||
// src/SuiteMaker.cc generated by gensuitemaker.py - changes may be overwritten. You've been warned! | |||
// | |||
#include <cpptest.h> | |||
#include <cpptest-suite.h> | |||
#include <memory> | |||
#include <vector> | |||
#include "SuiteMaker.h" | |||
// Begin where we generate stuff | |||
#include "URIAddressTests.h" | |||
#include "MimeTests.h" | |||
#include "OwnIdentitiesRetrieveTests.h" | |||
#include "ExpiredSubkeyTests.h" | |||
#include "VerifyTests.h" | |||
#include "UserIdCollisionTests.h" | |||
#include "Engine463Tests.h" | |||
#include "IOS1664Tests.h" | |||
#include "BloblistTests.h" | |||
#include "NewUpdateIdAndMyselfTests.h" | |||
#include "NoOwnIdentWritesOnDecryptTests.h" | |||
#include "LiteralFilenameTests.h" | |||
#include "I18nTests.h" | |||
#include "Message2_1Tests.h" | |||
#include "IdentityListTests.h" | |||
#include "PgpBinaryTests.h" | |||
#include "SubkeyRatingEvalTests.h" | |||
#include "MessageNullFromTests.h" | |||
#include "ExportKeyTests.h" | |||
#include "LeastCommonDenomColorTests.h" | |||
#include "StringlistTests.h" | |||
#include "PgpListKeysTests.h" | |||
#include "MessageApiTests.h" | |||
#include "EncryptMissingPrivateKeyTests.h" | |||
#include "CaseAndDotAddressTests.h" | |||
#include "UserIDAliasTests.h" | |||
#include "KeyringImportTests.h" | |||
#include "EnterLeaveDeviceGroupTests.h" | |||
#include "SignOnlyTests.h" | |||
#include "LotsOfKeysTests.h" | |||
#include "BCCTests.h" | |||
#include "Engine358Tests.h" | |||
#include "BlacklistAcceptNewKeyTests.h" | |||
#include "DecryptAttachPrivateKeyUntrustedTests.h" | |||
#include "BlacklistTests.h" | |||
#include "GetKeyRatingForUserTests.h" | |||
#include "RevokeRegenAttachTests.h" | |||
#include "PepSubjectReceivedTests.h" | |||
#include "SequenceTests.h" | |||
#include "HeaderKeyImportTests.h" | |||
#include "EncryptAttachPrivateKeyTests.h" | |||
#include "ExternalRevokeTests.h" | |||
#include "LookupTests.h" | |||
#include "KeyeditTests.h" | |||
#include "LeastColorGroupTests.h" | |||
#include "DecryptAttachPrivateKeyTrustedTests.h" | |||
#include "CheckRenewedExpiredKeyTrustStatusTests.h" | |||
#include "TrustwordsTests.h" | |||
#include "SimpleBodyNotAltTests.h" | |||
#include "ReencryptPlusExtraKeysTests.h" | |||
#include "MapAsn1Tests.h" | |||
#include "DecorateTests.h" | |||
#include "MessageTwoPointOhTests.h" | |||
#include "CrashdumpTests.h" | |||
#include "StringpairListTests.h" | |||
#include "EncryptForIdentityTests.h" | |||
#include "KeyResetMessageTests.h" | |||
#include "DeleteKeyTests.h" | |||
#include "KeyAttachmentTests.h" | |||
#include "OwnKeysRetrieveTests.h" | |||
#include "TrustManipulationTests.h" | |||
#include "StrnstrTests.h" | |||
#include "SyncTests.h" | |||
#include "SenderFPRTests.h" | |||
#include "RevocationTests.h" | |||
#include "AppleMailTests.h" | |||
const char* SuiteMaker::all_suites[] = { | |||
"URIAddressTests", | |||
"MimeTests", | |||
"OwnIdentitiesRetrieveTests", | |||
"ExpiredSubkeyTests", | |||
"VerifyTests", | |||
"UserIdCollisionTests", | |||
"Engine463Tests", | |||
"IOS1664Tests", | |||
"BloblistTests", | |||
"NewUpdateIdAndMyselfTests", | |||
"NoOwnIdentWritesOnDecryptTests", | |||
"LiteralFilenameTests", | |||
"I18nTests", | |||
"Message2_1Tests", | |||
"IdentityListTests", | |||
"PgpBinaryTests", | |||
"SubkeyRatingEvalTests", | |||
"MessageNullFromTests", | |||
"ExportKeyTests", | |||
"LeastCommonDenomColorTests", | |||
"StringlistTests", | |||
"PgpListKeysTests", | |||
"MessageApiTests", | |||
"EncryptMissingPrivateKeyTests", | |||
"CaseAndDotAddressTests", | |||
"UserIDAliasTests", | |||
"KeyringImportTests", | |||
"EnterLeaveDeviceGroupTests", | |||
"SignOnlyTests", | |||
"LotsOfKeysTests", | |||
"BCCTests", | |||
"Engine358Tests", | |||
"BlacklistAcceptNewKeyTests", | |||
"DecryptAttachPrivateKeyUntrustedTests", | |||
"BlacklistTests", | |||
"GetKeyRatingForUserTests", | |||
"RevokeRegenAttachTests", | |||
"PepSubjectReceivedTests", | |||
"SequenceTests", | |||
"HeaderKeyImportTests", | |||
"EncryptAttachPrivateKeyTests", | |||
"ExternalRevokeTests", | |||
"LookupTests", | |||
"KeyeditTests", | |||
"LeastColorGroupTests", | |||
"DecryptAttachPrivateKeyTrustedTests", | |||
"CheckRenewedExpiredKeyTrustStatusTests", | |||
"TrustwordsTests", | |||
"SimpleBodyNotAltTests", | |||
"ReencryptPlusExtraKeysTests", | |||
"MapAsn1Tests", | |||
"DecorateTests", | |||
"MessageTwoPointOhTests", | |||
"CrashdumpTests", | |||
"StringpairListTests", | |||
"EncryptForIdentityTests", | |||
"KeyResetMessageTests", | |||
"DeleteKeyTests", | |||
"KeyAttachmentTests", | |||
"OwnKeysRetrieveTests", | |||
"TrustManipulationTests", | |||
"StrnstrTests", | |||
"SyncTests", | |||
"SenderFPRTests", | |||
"RevocationTests", | |||
"AppleMailTests", | |||
}; | |||
// This file is generated, so magic constants are ok. | |||
int SuiteMaker::num_suites = 66; | |||
void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) { | |||
if (strcmp(test_class_name, "URIAddressTests") == 0) | |||
*test_suite = new URIAddressTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "MimeTests") == 0) | |||
*test_suite = new MimeTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "OwnIdentitiesRetrieveTests") == 0) | |||
*test_suite = new OwnIdentitiesRetrieveTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "ExpiredSubkeyTests") == 0) | |||
*test_suite = new ExpiredSubkeyTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "VerifyTests") == 0) | |||
*test_suite = new VerifyTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "UserIdCollisionTests") == 0) | |||
*test_suite = new UserIdCollisionTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "Engine463Tests") == 0) | |||
*test_suite = new Engine463Tests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "IOS1664Tests") == 0) | |||
*test_suite = new IOS1664Tests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "BloblistTests") == 0) | |||
*test_suite = new BloblistTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0) | |||
*test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "NoOwnIdentWritesOnDecryptTests") == 0) | |||
*test_suite = new NoOwnIdentWritesOnDecryptTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "LiteralFilenameTests") == 0) | |||
*test_suite = new LiteralFilenameTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "I18nTests") == 0) | |||
*test_suite = new I18nTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "Message2_1Tests") == 0) | |||
*test_suite = new Message2_1Tests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "IdentityListTests") == 0) | |||
*test_suite = new IdentityListTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "PgpBinaryTests") == 0) | |||
*test_suite = new PgpBinaryTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "SubkeyRatingEvalTests") == 0) | |||
*test_suite = new SubkeyRatingEvalTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "MessageNullFromTests") == 0) | |||
*test_suite = new MessageNullFromTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "ExportKeyTests") == 0) | |||
*test_suite = new ExportKeyTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0) | |||
*test_suite = new LeastCommonDenomColorTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "StringlistTests") == 0) | |||
*test_suite = new StringlistTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "PgpListKeysTests") == 0) | |||
*test_suite = new PgpListKeysTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "MessageApiTests") == 0) | |||
*test_suite = new MessageApiTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0) | |||
*test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0) | |||
*test_suite = new CaseAndDotAddressTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "UserIDAliasTests") == 0) | |||
*test_suite = new UserIDAliasTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "KeyringImportTests") == 0) | |||
*test_suite = new KeyringImportTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "EnterLeaveDeviceGroupTests") == 0) | |||
*test_suite = new EnterLeaveDeviceGroupTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "SignOnlyTests") == 0) | |||
*test_suite = new SignOnlyTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "LotsOfKeysTests") == 0) | |||
*test_suite = new LotsOfKeysTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "BCCTests") == 0) | |||
*test_suite = new BCCTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "Engine358Tests") == 0) | |||
*test_suite = new Engine358Tests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0) | |||
*test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0) | |||
*test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "BlacklistTests") == 0) | |||
*test_suite = new BlacklistTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "GetKeyRatingForUserTests") == 0) | |||
*test_suite = new GetKeyRatingForUserTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0) | |||
*test_suite = new RevokeRegenAttachTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0) | |||
*test_suite = new PepSubjectReceivedTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "SequenceTests") == 0) | |||
*test_suite = new SequenceTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "HeaderKeyImportTests") == 0) | |||
*test_suite = new HeaderKeyImportTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0) | |||
*test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "ExternalRevokeTests") == 0) | |||
*test_suite = new ExternalRevokeTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "LookupTests") == 0) | |||
*test_suite = new LookupTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "KeyeditTests") == 0) | |||
*test_suite = new KeyeditTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "LeastColorGroupTests") == 0) | |||
*test_suite = new LeastColorGroupTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0) | |||
*test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "CheckRenewedExpiredKeyTrustStatusTests") == 0) | |||
*test_suite = new CheckRenewedExpiredKeyTrustStatusTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "TrustwordsTests") == 0) | |||
*test_suite = new TrustwordsTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "SimpleBodyNotAltTests") == 0) | |||
*test_suite = new SimpleBodyNotAltTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0) | |||
*test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "MapAsn1Tests") == 0) | |||
*test_suite = new MapAsn1Tests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "DecorateTests") == 0) | |||
*test_suite = new DecorateTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0) | |||
*test_suite = new MessageTwoPointOhTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "CrashdumpTests") == 0) | |||
*test_suite = new CrashdumpTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "StringpairListTests") == 0) | |||
*test_suite = new StringpairListTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0) | |||
*test_suite = new EncryptForIdentityTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "KeyResetMessageTests") == 0) | |||
*test_suite = new KeyResetMessageTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "DeleteKeyTests") == 0) | |||
*test_suite = new DeleteKeyTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "KeyAttachmentTests") == 0) | |||
*test_suite = new KeyAttachmentTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "OwnKeysRetrieveTests") == 0) | |||
*test_suite = new OwnKeysRetrieveTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "TrustManipulationTests") == 0) | |||
*test_suite = new TrustManipulationTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "StrnstrTests") == 0) | |||
*test_suite = new StrnstrTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "SyncTests") == 0) | |||
*test_suite = new SyncTests(test_class_name, test_home); | |||
else if (strcmp(test_class_name, "SenderFPRTests") == 0) | |||