1.1 --- a/build-windows/pEpEngine.vcxproj.filters Fri Nov 15 10:17:57 2019 +0100
1.2 +++ b/build-windows/pEpEngine.vcxproj.filters Fri Nov 15 10:18:23 2019 +0100
1.3 @@ -215,18 +215,6 @@
1.4 <ClInclude Include="..\src\key_reset.h">
1.5 <Filter>Headerdateien</Filter>
1.6 </ClInclude>
1.7 - <ClInclude Include="..\src\KeySync_fsm.h">
1.8 - <Filter>Headerdateien</Filter>
1.9 - </ClInclude>
1.10 - <ClInclude Include="..\src\sync_api.h">
1.11 - <Filter>Headerdateien</Filter>
1.12 - </ClInclude>
1.13 - <ClInclude Include="..\src\sync_codec.h">
1.14 - <Filter>Headerdateien</Filter>
1.15 - </ClInclude>
1.16 - <ClInclude Include="..\src\Sync_event.h">
1.17 - <Filter>Headerdateien</Filter>
1.18 - </ClInclude>
1.19 <ClInclude Include="..\src\growing_buf.h">
1.20 <Filter>Headerdateien</Filter>
1.21 </ClInclude>
1.22 @@ -260,6 +248,18 @@
1.23 <ClInclude Include="..\src\etpan_mime.h">
1.24 <Filter>Headerdateien</Filter>
1.25 </ClInclude>
1.26 + <ClInclude Include="..\src\KeySync_fsm.h">
1.27 + <Filter>Headerdateien</Filter>
1.28 + </ClInclude>
1.29 + <ClInclude Include="..\src\sync_api.h">
1.30 + <Filter>Headerdateien</Filter>
1.31 + </ClInclude>
1.32 + <ClInclude Include="..\src\Sync_event.h">
1.33 + <Filter>Headerdateien</Filter>
1.34 + </ClInclude>
1.35 + <ClInclude Include="..\src\sync_codec.h">
1.36 + <Filter>Headerdateien</Filter>
1.37 + </ClInclude>
1.38 </ItemGroup>
1.39 <ItemGroup>
1.40 <Text Include="..\LICENSE.txt" />
2.1 --- a/test/Makefile Fri Nov 15 10:17:57 2019 +0100
2.2 +++ b/test/Makefile Fri Nov 15 10:18:23 2019 +0100
2.3 @@ -5,12 +5,12 @@
2.4
2.5 HERE:=$(CURDIR)
2.6
2.7 -# Presumably can be changed in local.conf by putting this here?
2.8 -GTEST_DIR:=googletest/googletest
2.9 -GTEST_PL_DIR:=googletest/gtest-parallel
2.10 -GTEST_INC_DIR:=$(GTEST_DIR)/include
2.11 +GTEST_SRC_DIR:=/usr/src/gtest
2.12 +GTEST_INC_DIR:=$(GTEST_SRC_DIR)/include
2.13 +GTEST_PL:=$(HOME)/src/gtest-parallel/gtest_parallel.py
2.14
2.15 -include ../Makefile.conf
2.16 +include ../Makefile.conf # This should import changed values for the above from
2.17 + # local.conf
2.18
2.19 SRCS:=$(wildcard src/*.cc) $(wildcard src/*/*.cc)
2.20 OBJS:=$(addsuffix .o,$(basename $(SRCS)))
2.21 @@ -18,7 +18,15 @@
2.22
2.23 LDFLAGS+= -L../asn.1 -L../src $(ETPAN_LIB) $(CPPUNIT_LIB)
2.24
2.25 -TARGET:=EngineTests
2.26 +TARGET:=EngineTests
2.27 +
2.28 +GTEST_SUITE_SYM:=test_suite_name
2.29 +
2.30 +ifeq ($(shell grep -c $(GTEST_SUITE_SYM) $(GTEST_SRC_DIR)/src/gtest.cc),0)
2.31 + GTEST_SUITE_SYM=test_case_name
2.32 +endif
2.33 +
2.34 +CXXFLAGS+= -DGTEST_SUITE_SYM=$(GTEST_SUITE_SYM)
2.35
2.36 ifeq ($(OPENPGP),GPG)
2.37 LDFLAGS+= $(GPGME_LIB)
2.38 @@ -99,22 +107,15 @@
2.39 %.d: %.cc
2.40 $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $< | sed -e 's,\($*\)\.o[ :]*,\1.o $@: ,g' > $@
2.41
2.42 -$(TARGET): $(OBJS) gtest-all.o gtest_main.o
2.43 -# $(LINK.cc) $(OBJS) $(LOADLIBES) $(LDLIBS) -o $@
2.44 - ${CXX} ${LDFLAGS} -L${PREFIX}/lib -o $@ $^ -lpEpEngine $(LDLIBS)
2.45 +$(TARGET): $(OBJS)
2.46 + ${CXX} ${LDFLAGS} -L${PREFIX}/lib -o $@ $^ -lpEpEngine -lgtest -lgtest_main -lsequoia_openpgp_ffi $(LDLIBS)
2.47
2.48 -gtest-all.o: $(GTEST_DIR)/src/gtest-all.cc
2.49 - ${CXX} ${CXXFLAGS} $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -isystem $(GTEST_DIR)/include -o $@ -c $<
2.50 -
2.51 -gtest_main.o: $(GTEST_DIR)/src/gtest_main.cc
2.52 - ${CXX} ${CXXFLAGS} $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -isystem $(GTEST_DIR)/include -o $@ -c $<
2.53
2.54 test: all
2.55 - $(TEST_CMD_PFX) $(TEST_DEBUGGER) python3 $(GTEST_PL_DIR)/gtest_parallel.py ./$(TARGET)
2.56 -
2.57 + $(RM) -rf ./pEp_test_home/*
2.58 + $(TEST_CMD_PFX) $(TEST_DEBUGGER) python3 $(GTEST_PL) ./$(TARGET)
2.59 clean:
2.60 $(RM) $(TARGET) $(TARGET).o $(TARGET).d $(OBJS) $(notdir $(basename $(OBJS))) $(DEPS)
2.61 - $(RM) gtest_main.o gtest-all.o
2.62 $(RM) -rf ./pEp_test_home/*
2.63 # If only the goal 'clean' is given, do not generate and include the '%.d' files.¬
2.64 ifneq ($(MAKECMDGOALS),clean)
3.1 --- a/test/README.md Fri Nov 15 10:17:57 2019 +0100
3.2 +++ b/test/README.md Fri Nov 15 10:18:23 2019 +0100
3.3 @@ -1,62 +1,216 @@
3.4 -# Building the Engine Test Suite
3.5 +# Building and Running the Tests for the p≡p Engine
3.6 +
3.7 +Work in progress.
3.8
3.9 ## Caveat, before you begin
3.10
3.11 -Right now, the engine tests only function on \*nix-like systems (including MacOS). (Conversion to Windows will require, at the very least, looking at some of the file-handling code.) If you want to fix this, start by looking in Engine.cc in the test/src directory!
3.12 +Right now, the engine tests only function on \*nix-like systems (including
3.13 +MacOS).
3.14 +
3.15 +*(Conversion to Windows will require, at the very least, looking at some of the
3.16 +file-handling code. If you want to fix this, start by looking in Engine.cc
3.17 +in the test/src directory!)*
3.18
3.19 ## Requirements
3.20
3.21 In addition to the engine requirements, you will need:
3.22
3.23 -* cmake
3.24 -* python3
3.25 + * `cmake`
3.26 + * `python3`
3.27 + * `git` (for getting the `gtest-parallel` repository, unless you grab the
3.28 + tarball from somewhere)
3.29 +
3.30 +## Building the prerequisites
3.31 +
3.32 +The Engine test suite now requires (at least) two additional pieces to run:
3.33 + * `googletest`
3.34 + * `gtest-parallel`
3.35
3.36 -## Preparing to build
3.37 +How this proceeds depends on your platform and whether or not you use a packaged
3.38 +distribution.
3.39 +
3.40 +These instructions do this with `cmake`. If you can manage it with `bazel`
3.41 +instead, more power to you ;)
3.42 +
3.43 +### Installing `googletest`
3.44 +
3.45 +#### Packaged distributions
3.46 +
3.47 +This is the currently preferred way to do this, because everyone was doing it
3.48 +anyway and who am I to judge?
3.49
3.50 -The Engine test suite now requires (at least) two additional pieces to run - **googletest** and **gtest-parallel**. You will note that I give specific instructions about where to put these, because that is what I have tried and tested. That does NOT mean other things won’t work; I simply haven’t tried them. So without further ado…
3.51 +##### Debian and Ubuntu (and derivatives)
3.52
3.53 -### googletest
3.54 +Thanks to Erik Smistad for this starting point (condensed from [Getting Started
3.55 +with Google Test On
3.56 +Ubuntu](https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/)):
3.57 +
3.58 + 1. Install the packages `cmake` and `libgtest-dev` from the repository. This
3.59 + will install the gtest source files to `/usr/src/gtest`. You'll still need to
3.60 + compile the code and link the library files to be able to use them.
3.61
3.62 -**googletest** is an XUnit testing framework we are now using in place of cpptest. Unlike a lot of other testing frameworks, it’s recommended that you compile and link the test code directly within your project. These instructions do with with **cmake**. If you can manage it with **bazel** instead, more power to you ;)
3.63 + 2. Compile the source files:
3.64 + ```
3.65 + cd /usr/src/gtest
3.66 + sudo cmake CMakeLists.txt
3.67 + sudo make
3.68 + ```
3.69
3.70 -So. To get things started.
3.71 + 3. Copy/symlink the libraries to the library location of your choice (here,
3.72 + it's `/usr/lib`, hence the `sudo`, but as long as it's in your library path,
3.73 + it shouldn't matter where you stick it):
3.74 + ```
3.75 + sudo cp *.a /usr/lib
3.76 + ```
3.77 +
3.78 +##### MacOS
3.79
3.80 -In the directory of your choice (default, if you don’t want to change **local.conf** - specifically **GTEST\_DIR** - is the test directory (this one, presumably)):
3.81 + 1. Install package `gtest` from Macports
3.82 +
3.83 + 2. Macports will build the libraries for you.
3.84 +
3.85 + 3. In the next major section ("Building the Test Suite"), under
3.86 + "Makefile and local.conf", set `GTEST_SRC_DIR` to
3.87 + `/opt/local/src/googletest` in `local.conf` (see instructions below)
3.88 +
3.89 + 4. Make sure `/opt/local/lib` is in your library path when compiling and
3.90 + linking the tests.
3.91
3.92 -1. git clone https://github.com/google/googletest.git
3.93 -2. cd googletest
3.94 -3. cmake .
3.95 -4. make
3.96 +#### Downloading and compiling the source yourself
3.97
3.98 -(Note that this hasn’t been tested in other directories, so I am presuming the Makefile works as is, but I could be wrong)
3.99 -
3.100 -### gtest-parallel
3.101 + 1. Get the source, Fred. (Luke is tired of the source, I hear.)
3.102 + ```
3.103 + git clone https://github.com/google/googletest.git
3.104 + ```
3.105 +
3.106 + 2. Switch into the source directory and find the directory
3.107 + containing the `src` and `include` directories. Mark this directory
3.108 + for later. (For me, this is `./googletest/googletest`)
3.109 +
3.110 + 3. Edit `CMakeLists.txt` here to contain the following line at the top:
3.111 + ```
3.112 + set (CMAKE_CXX_STANDARD 11)
3.113 + ```
3.114 + (If you don't, it won't compile, and I will shake my fist at you.)
3.115 +
3.116 + 4. Execute, in this directory:
3.117 + ```
3.118 + cmake CMakeLists.txt
3.119 + make
3.120 + ```
3.121 +
3.122 + 5. In the lib directory of your current directory are located the
3.123 + library files you'll use (`lib/*.a`). Copy or symlink them to the library
3.124 + location of your choice (make sure this is a directory that can be seen
3.125 + during the test build process - i.e. one that's in one of the library paths
3.126 + used in building. Mine are located in `$HOME/lib`.
3.127
3.128 -### Again, in the directory of your choice (if you want to use the Makefile out of the box, you should, while still in the googletest directory, do the following):
3.129 + 6. See `Makefile` and `local.conf` under "Building the test suite" below -
3.130 + In this scenario, I set `GTEST_SRC_DIR` as `<clone_path>/googletest/googletest`
3.131 + (i.e. the absolute path of where the `src` and `include` directories were
3.132 + above - for me, `/Users/krista/googletest/googletest`).
3.133 +
3.134 +### Installing `gtest-parallel`
3.135
3.136 -1. git clone https://github.com/google/gtest-parallel.git
3.137 -2. If using a different directory, please change **GTEST\_PL\_DIR** to indicate where **gtest-parallel.py** is located.
3.138 +Pick a source directory and put your `gtest-parallel` source there
3.139 +(e.g. via `git clone https://github.com/google/gtest-parallel.git`).
3.140 +
3.141 +We'll deal more with this when preparing to compile the test suite.
3.142
3.143 ## Building the test suite
3.144
3.145 +### `Makefile` and `local.conf`
3.146 +
3.147 +So `local.conf` in the top-level engine directory is where we stick all of the
3.148 +Makefile overrides. The test Makefile contains some defaults for relevant
3.149 +variables here, but if you need to override them, please either create or modify
3.150 +`local.conf` in the top-level engine directory as needed. The relevant variables
3.151 +are:
3.152 +
3.153 + * `GTEST_SRC_DIR`: This is the directory where you compiled googletest above
3.154 + (defaults to `/usr/src/gtest`)
3.155 +
3.156 + * `GTEST_INC_DIR`: This is where the include files for googletest are located
3.157 + (defaults to `$(GTEST_SRC_DIR)/include`)
3.158 +
3.159 + * `GTEST_PL`: This is the full path to the *python file* for `gtest_parallel`
3.160 + (default presumes you cloned it under `src` in your home directory, i.e. it is
3.161 + `$(HOME)/src/gtest-parallel/gtest_parallel.py`)
3.162 +
3.163 +### Building
3.164 +
3.165 Presuming the above works, then from the top test directory, simply run make.
3.166
3.167 -# Running the Engine Test Suite
3.168 +## Running the test suite
3.169
3.170 -## To simply run the test suite and see what tests fail...
3.171 +### To simply run the test suite and see what tests fail...
3.172
3.173 Do one of:
3.174
3.175 -1. make test OR
3.176 -2. python3 \<path to gtest-parallel.py\> ./EngineTests
3.177 + 1. `make test` OR
3.178 +
3.179 + 2. `python3 <path to gtest-parallel.py> ./EngineTests`
3.180 +
3.181 +### To run individual test suites, especially for debugging purposes
3.182 +
3.183 +Note that for some test suites, this will, if something goes dreadfully wrong,
3.184 +mean that one test's failure may pollute another test. This generally means you
3.185 +have found a dastardly bug in the engine, but it can also be a test issue.
3.186 +
3.187 +*Caveat lector*.
3.188 +
3.189 + 1. To run sequentially, *in the same process*:
3.190 + ```
3.191 + ./EngineTests --gtest_filter=TestSuiteName*
3.192 + ```
3.193 + For example, for `DeleteKeyTest`:
3.194 + ```
3.195 + ./EngineTests DeleteKeyTest*
3.196 + ```
3.197
3.198 -## To run individual test suites, especially for debugging purposes
3.199 + 2. To debug the same with lldb:
3.200 + ```
3.201 + lldb ./EngineTests -- --gtest_filter=TestSuiteName*
3.202 + ```
3.203 + 3. To debug with gdb:
3.204 + ```
3.205 + gdb --args ./EngineTests --gtest_filter=TestSuiteName*
3.206 + ```
3.207
3.208 -1. To run sequentially, IN THE SAME PROCESS: ./EngineTests --gtest_filter=TestSuiteName* (for example, for DeleteKeyTest: ./EngineTests DeleteKeyTest*)
3.209 -2. To debug the same: lldb ./EngineTests -- --gtest_filter=TestSuiteName*
3.210 -3. To run sequentially IN DIFFERENT PROCESSES: (FIXME - is this really the case?)
3.211 +### To run and/or debug individual test cases
3.212 + 1. To run:
3.213 + ```
3.214 + ./EngineTests --gtest_filter=TestSuiteName.test_function_name
3.215 + ```
3.216 + For example, for `check_delete_single_pubkey` in `DeleteKeyTest`:
3.217 + ```
3.218 + ./EngineTests DeleteKeyTest.check_delete_single_pubkey
3.219 + ```
3.220 +
3.221 + 2. To debug the same with lldb:
3.222 + ```
3.223 + lldb ./EngineTests -- --gtest_filter=TestSuiteName.test_function_name
3.224 + ```
3.225 +
3.226 + 3. To debug with gdb:
3.227 + ```
3.228 + gdb --args ./EngineTests --gtest_filter=TestSuiteName.test_function_name
3.229 + ```
3.230
3.231 # Creating new tests
3.232
3.233 Script next on the agenda...
3.234
3.235 +# Known Problems
3.236 +
3.237 +There are 5 (maybe 6) tests that currently fail which are the function of
3.238 +broken tests, not the engine. They are on the agenda to fix (expired
3.239 +keys inside imported mails, etc). You'll see something like this - please
3.240 +ignore for this particular second in time:
3.241 +```
3.242 + 170 ms: ./EngineTests SubkeyRatingEvalTest.check_subkey_rating_eval_no_es
3.243 + 170 ms: ./EngineTests SubkeyRatingEvalTest.check_subkey_rating_eval_revoked_sign_no_alt
3.244 + 253 ms: ./EngineTests SubkeyRatingEvalTest.check_subkey_rating_eval_weak_e_strong_ecc_se
3.245 + 1189 ms: ./EngineTests KeyResetMessageTest.check_non_reset_receive_revoked
3.246 + 1376 ms: ./EngineTests KeyResetMessageTest.check_reset_receive_revoked
3.247 +```
4.1 --- a/test/gen_test_skel.py Fri Nov 15 10:17:57 2019 +0100
4.2 +++ b/test/gen_test_skel.py Fri Nov 15 10:18:23 2019 +0100
4.3 @@ -47,7 +47,7 @@
4.4 newfile.write(tb(3) + "// is empty.\n")
4.5 newfile.write(tb(3) + test_suite + "() {\n")
4.6 newfile.write(tb(4) + "// You can do set-up work for each test here.\n")
4.7 -newfile.write(tb(4) + "test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();\n")
4.8 +newfile.write(tb(4) + "test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();\n")
4.9 newfile.write(tb(4) + "test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();\n")
4.10 newfile.write(tb(4) + "test_path = get_main_test_home_dir() + \"/\" + test_suite_name + \"/\" + test_name;\n")
4.11 newfile.write(tb(3) + "}\n\n")
5.1 --- a/test/gtest_firstpass.py Fri Nov 15 10:17:57 2019 +0100
5.2 +++ b/test/gtest_firstpass.py Fri Nov 15 10:18:23 2019 +0100
5.3 @@ -78,7 +78,7 @@
5.4 newfile.write(tb(3) + "// is empty.\n")
5.5 newfile.write(tb(3) + "" + modline + "() {\n")
5.6 newfile.write(tb(4) + "// You can do set-up work for each test here.\n")
5.7 - newfile.write(tb(4) + "test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();\n")
5.8 + newfile.write(tb(4) + "test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();\n")
5.9 newfile.write(tb(4) + "test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();\n")
5.10 newfile.write(tb(4) + "test_path = get_main_test_home_dir() + \"/\" + test_suite_name + \"/\" + test_name;\n")
5.11 newfile.write(tb(3) + "}\n\n")
6.1 --- a/test/src/AppleMailTest.cc Fri Nov 15 10:17:57 2019 +0100
6.2 +++ b/test/src/AppleMailTest.cc Fri Nov 15 10:18:23 2019 +0100
6.3 @@ -37,7 +37,7 @@
6.4 // is empty.
6.5 AppleMailTest() {
6.6 // You can do set-up work for each test here.
6.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
6.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
6.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
6.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
6.11 }
7.1 --- a/test/src/BCCTest.cc Fri Nov 15 10:17:57 2019 +0100
7.2 +++ b/test/src/BCCTest.cc Fri Nov 15 10:18:23 2019 +0100
7.3 @@ -31,7 +31,7 @@
7.4 // is empty.
7.5 BCCTest() {
7.6 // You can do set-up work for each test here.
7.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
7.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
7.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
7.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
7.11 }
8.1 --- a/test/src/BlacklistAcceptNewKeyTest.cc Fri Nov 15 10:17:57 2019 +0100
8.2 +++ b/test/src/BlacklistAcceptNewKeyTest.cc Fri Nov 15 10:18:23 2019 +0100
8.3 @@ -34,7 +34,7 @@
8.4 // is empty.
8.5 BlacklistAcceptNewKeyTest() {
8.6 // You can do set-up work for each test here.
8.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
8.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
8.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
8.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
8.11 }
9.1 --- a/test/src/BlacklistTest.cc Fri Nov 15 10:17:57 2019 +0100
9.2 +++ b/test/src/BlacklistTest.cc Fri Nov 15 10:18:23 2019 +0100
9.3 @@ -48,7 +48,7 @@
9.4 // is empty.
9.5 BlacklistTest() {
9.6 // You can do set-up work for each test here.
9.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
9.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
9.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
9.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
9.11 }
10.1 --- a/test/src/CaseAndDotAddressTest.cc Fri Nov 15 10:17:57 2019 +0100
10.2 +++ b/test/src/CaseAndDotAddressTest.cc Fri Nov 15 10:18:23 2019 +0100
10.3 @@ -32,7 +32,7 @@
10.4 // is empty.
10.5 CaseAndDotAddressTest() {
10.6 // You can do set-up work for each test here.
10.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
10.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
10.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
10.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
10.11 }
11.1 --- a/test/src/CheckRenewedExpiredKeyTrustStatusTest.cc Fri Nov 15 10:17:57 2019 +0100
11.2 +++ b/test/src/CheckRenewedExpiredKeyTrustStatusTest.cc Fri Nov 15 10:18:23 2019 +0100
11.3 @@ -29,7 +29,7 @@
11.4 // is empty.
11.5 CheckRenewedExpiredKeyTrustStatusTest() {
11.6 // You can do set-up work for each test here.
11.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
11.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
11.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
11.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
11.11 }
12.1 --- a/test/src/CrashdumpTest.cc Fri Nov 15 10:17:57 2019 +0100
12.2 +++ b/test/src/CrashdumpTest.cc Fri Nov 15 10:18:23 2019 +0100
12.3 @@ -27,7 +27,7 @@
12.4 // is empty.
12.5 CrashdumpTest() {
12.6 // You can do set-up work for each test here.
12.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
12.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
12.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
12.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
12.11 }
13.1 --- a/test/src/DecorateTest.cc Fri Nov 15 10:17:57 2019 +0100
13.2 +++ b/test/src/DecorateTest.cc Fri Nov 15 10:18:23 2019 +0100
13.3 @@ -33,7 +33,7 @@
13.4 // is empty.
13.5 DecorateTest() {
13.6 // You can do set-up work for each test here.
13.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
13.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
13.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
13.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
13.11 }
14.1 --- a/test/src/DecryptAttachPrivateKeyTrustedTest.cc Fri Nov 15 10:17:57 2019 +0100
14.2 +++ b/test/src/DecryptAttachPrivateKeyTrustedTest.cc Fri Nov 15 10:18:23 2019 +0100
14.3 @@ -35,7 +35,7 @@
14.4 // is empty.
14.5 DecryptAttachPrivateKeyTrustedTest() {
14.6 // You can do set-up work for each test here.
14.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
14.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
14.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
14.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
14.11 }
15.1 --- a/test/src/DecryptAttachPrivateKeyUntrustedTest.cc Fri Nov 15 10:17:57 2019 +0100
15.2 +++ b/test/src/DecryptAttachPrivateKeyUntrustedTest.cc Fri Nov 15 10:18:23 2019 +0100
15.3 @@ -33,7 +33,7 @@
15.4 // is empty.
15.5 DecryptAttachPrivateKeyUntrustedTest() {
15.6 // You can do set-up work for each test here.
15.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
15.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
15.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
15.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
15.11 }
16.1 --- a/test/src/DeleteKeyTest.cc Fri Nov 15 10:17:57 2019 +0100
16.2 +++ b/test/src/DeleteKeyTest.cc Fri Nov 15 10:18:23 2019 +0100
16.3 @@ -43,7 +43,7 @@
16.4 // is empty.
16.5 DeleteKeyTest() {
16.6 // You can do set-up work for each test here.
16.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
16.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
16.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
16.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
16.11 }
17.1 --- a/test/src/EncryptAttachPrivateKeyTest.cc Fri Nov 15 10:17:57 2019 +0100
17.2 +++ b/test/src/EncryptAttachPrivateKeyTest.cc Fri Nov 15 10:18:23 2019 +0100
17.3 @@ -33,7 +33,7 @@
17.4 // is empty.
17.5 EncryptAttachPrivateKeyTest() {
17.6 // You can do set-up work for each test here.
17.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
17.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
17.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
17.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
17.11 }
18.1 --- a/test/src/EncryptForIdentityTest.cc Fri Nov 15 10:17:57 2019 +0100
18.2 +++ b/test/src/EncryptForIdentityTest.cc Fri Nov 15 10:18:23 2019 +0100
18.3 @@ -35,7 +35,7 @@
18.4 // is empty.
18.5 EncryptForIdentityTest() {
18.6 // You can do set-up work for each test here.
18.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
18.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
18.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
18.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
18.11 }
19.1 --- a/test/src/EncryptMissingPrivateKeyTest.cc Fri Nov 15 10:17:57 2019 +0100
19.2 +++ b/test/src/EncryptMissingPrivateKeyTest.cc Fri Nov 15 10:18:23 2019 +0100
19.3 @@ -38,7 +38,7 @@
19.4 // is empty.
19.5 EncryptMissingPrivateKeyTest() {
19.6 // You can do set-up work for each test here.
19.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
19.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
19.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
19.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
19.11 }
20.1 --- a/test/src/Engine358Test.cc Fri Nov 15 10:17:57 2019 +0100
20.2 +++ b/test/src/Engine358Test.cc Fri Nov 15 10:18:23 2019 +0100
20.3 @@ -29,7 +29,7 @@
20.4 // is empty.
20.5 Engine358Test() {
20.6 // You can do set-up work for each test here.
20.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
20.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
20.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
20.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
20.11 }
21.1 --- a/test/src/Engine463Test.cc Fri Nov 15 10:17:57 2019 +0100
21.2 +++ b/test/src/Engine463Test.cc Fri Nov 15 10:18:23 2019 +0100
21.3 @@ -30,7 +30,7 @@
21.4 // is empty.
21.5 Engine463Test() {
21.6 // You can do set-up work for each test here.
21.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
21.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
21.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
21.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
21.11 }
22.1 --- a/test/src/EnterLeaveDeviceGroupTest.cc Fri Nov 15 10:17:57 2019 +0100
22.2 +++ b/test/src/EnterLeaveDeviceGroupTest.cc Fri Nov 15 10:18:23 2019 +0100
22.3 @@ -31,7 +31,7 @@
22.4 // is empty.
22.5 EnterLeaveDeviceGroupTest() {
22.6 // You can do set-up work for each test here.
22.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
22.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
22.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
22.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
22.11 }
23.1 --- a/test/src/ExpiredSubkeyTest.cc Fri Nov 15 10:17:57 2019 +0100
23.2 +++ b/test/src/ExpiredSubkeyTest.cc Fri Nov 15 10:18:23 2019 +0100
23.3 @@ -28,7 +28,7 @@
23.4 // is empty.
23.5 ExpiredSubkeyTest() {
23.6 // You can do set-up work for each test here.
23.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
23.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
23.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
23.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
23.11 }
24.1 --- a/test/src/ExportKeyTest.cc Fri Nov 15 10:17:57 2019 +0100
24.2 +++ b/test/src/ExportKeyTest.cc Fri Nov 15 10:18:23 2019 +0100
24.3 @@ -30,7 +30,7 @@
24.4 // is empty.
24.5 ExportKeyTest() {
24.6 // You can do set-up work for each test here.
24.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
24.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
24.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
24.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
24.11 }
25.1 --- a/test/src/ExternalRevokeTest.cc Fri Nov 15 10:17:57 2019 +0100
25.2 +++ b/test/src/ExternalRevokeTest.cc Fri Nov 15 10:18:23 2019 +0100
25.3 @@ -35,7 +35,7 @@
25.4 // is empty.
25.5 ExternalRevokeTest() {
25.6 // You can do set-up work for each test here.
25.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
25.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
25.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
25.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
25.11 }
26.1 --- a/test/src/GetKeyRatingForUserTest.cc Fri Nov 15 10:17:57 2019 +0100
26.2 +++ b/test/src/GetKeyRatingForUserTest.cc Fri Nov 15 10:18:23 2019 +0100
26.3 @@ -30,7 +30,7 @@
26.4 // is empty.
26.5 GetKeyRatingForUserTest() {
26.6 // You can do set-up work for each test here.
26.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
26.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
26.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
26.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
26.11 }
27.1 --- a/test/src/HeaderKeyImportTest.cc Fri Nov 15 10:17:57 2019 +0100
27.2 +++ b/test/src/HeaderKeyImportTest.cc Fri Nov 15 10:18:23 2019 +0100
27.3 @@ -32,7 +32,7 @@
27.4 // is empty.
27.5 HeaderKeyImportTest() {
27.6 // You can do set-up work for each test here.
27.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
27.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
27.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
27.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
27.11 }
28.1 --- a/test/src/I18nTest.cc Fri Nov 15 10:17:57 2019 +0100
28.2 +++ b/test/src/I18nTest.cc Fri Nov 15 10:18:23 2019 +0100
28.3 @@ -28,7 +28,7 @@
28.4 // is empty.
28.5 I18nTest() {
28.6 // You can do set-up work for each test here.
28.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
28.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
28.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
28.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
28.11 }
29.1 --- a/test/src/IOS1664Test.cc Fri Nov 15 10:17:57 2019 +0100
29.2 +++ b/test/src/IOS1664Test.cc Fri Nov 15 10:18:23 2019 +0100
29.3 @@ -31,7 +31,7 @@
29.4 // is empty.
29.5 IOS1664Test() {
29.6 // You can do set-up work for each test here.
29.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
29.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
29.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
29.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
29.11 }
30.1 --- a/test/src/KeyAttachmentTest.cc Fri Nov 15 10:17:57 2019 +0100
30.2 +++ b/test/src/KeyAttachmentTest.cc Fri Nov 15 10:18:23 2019 +0100
30.3 @@ -33,7 +33,7 @@
30.4 // is empty.
30.5 KeyAttachmentTest() {
30.6 // You can do set-up work for each test here.
30.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
30.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
30.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
30.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
30.11 }
31.1 --- a/test/src/KeyResetMessageTest.cc Fri Nov 15 10:17:57 2019 +0100
31.2 +++ b/test/src/KeyResetMessageTest.cc Fri Nov 15 10:18:23 2019 +0100
31.3 @@ -53,7 +53,7 @@
31.4 // is empty.
31.5 KeyResetMessageTest() {
31.6 // You can do set-up work for each test here.
31.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
31.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
31.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
31.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
31.11 }
32.1 --- a/test/src/KeyeditTest.cc Fri Nov 15 10:17:57 2019 +0100
32.2 +++ b/test/src/KeyeditTest.cc Fri Nov 15 10:18:23 2019 +0100
32.3 @@ -31,7 +31,7 @@
32.4 // is empty.
32.5 KeyeditTest() {
32.6 // You can do set-up work for each test here.
32.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
32.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
32.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
32.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
32.11 }
33.1 --- a/test/src/KeyringImportTest.cc Fri Nov 15 10:17:57 2019 +0100
33.2 +++ b/test/src/KeyringImportTest.cc Fri Nov 15 10:18:23 2019 +0100
33.3 @@ -34,7 +34,7 @@
33.4 // is empty.
33.5 KeyringImportTest() {
33.6 // You can do set-up work for each test here.
33.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
33.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
33.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
33.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
33.11 }
34.1 --- a/test/src/LeastColorGroupTest.cc Fri Nov 15 10:17:57 2019 +0100
34.2 +++ b/test/src/LeastColorGroupTest.cc Fri Nov 15 10:18:23 2019 +0100
34.3 @@ -34,7 +34,7 @@
34.4 // is empty.
34.5 LeastColorGroupTest() {
34.6 // You can do set-up work for each test here.
34.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
34.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
34.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
34.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
34.11 }
35.1 --- a/test/src/LeastCommonDenomColorTest.cc Fri Nov 15 10:17:57 2019 +0100
35.2 +++ b/test/src/LeastCommonDenomColorTest.cc Fri Nov 15 10:18:23 2019 +0100
35.3 @@ -34,7 +34,7 @@
35.4 // is empty.
35.5 LeastCommonDenomColorTest() {
35.6 // You can do set-up work for each test here.
35.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
35.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
35.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
35.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
35.11 }
36.1 --- a/test/src/LiteralFilenameTest.cc Fri Nov 15 10:17:57 2019 +0100
36.2 +++ b/test/src/LiteralFilenameTest.cc Fri Nov 15 10:18:23 2019 +0100
36.3 @@ -29,7 +29,7 @@
36.4 // is empty.
36.5 LiteralFilenameTest() {
36.6 // You can do set-up work for each test here.
36.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
36.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
36.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
36.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
36.11 }
37.1 --- a/test/src/LookupTest.cc Fri Nov 15 10:17:57 2019 +0100
37.2 +++ b/test/src/LookupTest.cc Fri Nov 15 10:18:23 2019 +0100
37.3 @@ -33,7 +33,7 @@
37.4 // is empty.
37.5 LookupTest() {
37.6 // You can do set-up work for each test here.
37.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
37.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
37.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
37.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
37.11 }
38.1 --- a/test/src/LotsOfKeysTest.cc Fri Nov 15 10:17:57 2019 +0100
38.2 +++ b/test/src/LotsOfKeysTest.cc Fri Nov 15 10:18:23 2019 +0100
38.3 @@ -144,7 +144,7 @@
38.4 // is empty.
38.5 LotsOfKeysTest() {
38.6 // You can do set-up work for each test here.
38.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
38.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
38.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
38.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
38.11 }
39.1 --- a/test/src/MapAsn1Test.cc Fri Nov 15 10:17:57 2019 +0100
39.2 +++ b/test/src/MapAsn1Test.cc Fri Nov 15 10:18:23 2019 +0100
39.3 @@ -30,7 +30,7 @@
39.4 // is empty.
39.5 MapAsn1Test() {
39.6 // You can do set-up work for each test here.
39.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
39.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
39.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
39.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
39.11 }
40.1 --- a/test/src/Message2_1Test.cc Fri Nov 15 10:17:57 2019 +0100
40.2 +++ b/test/src/Message2_1Test.cc Fri Nov 15 10:18:23 2019 +0100
40.3 @@ -28,7 +28,7 @@
40.4 // is empty.
40.5 Message2_1Test() {
40.6 // You can do set-up work for each test here.
40.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
40.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
40.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
40.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
40.11 }
41.1 --- a/test/src/MessageApiTest.cc Fri Nov 15 10:17:57 2019 +0100
41.2 +++ b/test/src/MessageApiTest.cc Fri Nov 15 10:18:23 2019 +0100
41.3 @@ -34,7 +34,7 @@
41.4 // is empty.
41.5 MessageApiTest() {
41.6 // You can do set-up work for each test here.
41.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
41.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
41.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
41.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
41.11 }
42.1 --- a/test/src/MessageNullFromTest.cc Fri Nov 15 10:17:57 2019 +0100
42.2 +++ b/test/src/MessageNullFromTest.cc Fri Nov 15 10:18:23 2019 +0100
42.3 @@ -31,7 +31,7 @@
42.4 // is empty.
42.5 MessageNullFromTest() {
42.6 // You can do set-up work for each test here.
42.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
42.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
42.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
42.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
42.11 }
43.1 --- a/test/src/MessageTwoPointOhTest.cc Fri Nov 15 10:17:57 2019 +0100
43.2 +++ b/test/src/MessageTwoPointOhTest.cc Fri Nov 15 10:18:23 2019 +0100
43.3 @@ -35,7 +35,7 @@
43.4 // is empty.
43.5 MessageTwoPointOhTest() {
43.6 // You can do set-up work for each test here.
43.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
43.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
43.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
43.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
43.11 }
44.1 --- a/test/src/MimeTest.cc Fri Nov 15 10:17:57 2019 +0100
44.2 +++ b/test/src/MimeTest.cc Fri Nov 15 10:18:23 2019 +0100
44.3 @@ -33,7 +33,7 @@
44.4 // is empty.
44.5 MimeTest() {
44.6 // You can do set-up work for each test here.
44.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
44.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
44.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
44.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
44.11 }
45.1 --- a/test/src/NoOwnIdentWritesOnDecryptTest.cc Fri Nov 15 10:17:57 2019 +0100
45.2 +++ b/test/src/NoOwnIdentWritesOnDecryptTest.cc Fri Nov 15 10:18:23 2019 +0100
45.3 @@ -31,7 +31,7 @@
45.4 // is empty.
45.5 NoOwnIdentWritesOnDecryptTest() {
45.6 // You can do set-up work for each test here.
45.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
45.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
45.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
45.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
45.11 _to_decrypt = NULL;
46.1 --- a/test/src/OwnIdentitiesRetrieveTest.cc Fri Nov 15 10:17:57 2019 +0100
46.2 +++ b/test/src/OwnIdentitiesRetrieveTest.cc Fri Nov 15 10:18:23 2019 +0100
46.3 @@ -28,7 +28,7 @@
46.4 // is empty.
46.5 OwnIdentitiesRetrieveTest() {
46.6 // You can do set-up work for each test here.
46.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
46.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
46.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
46.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
46.11 }
47.1 --- a/test/src/OwnKeysRetrieveTest.cc Fri Nov 15 10:17:57 2019 +0100
47.2 +++ b/test/src/OwnKeysRetrieveTest.cc Fri Nov 15 10:18:23 2019 +0100
47.3 @@ -28,7 +28,7 @@
47.4 // is empty.
47.5 OwnKeysRetrieveTest() {
47.6 // You can do set-up work for each test here.
47.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
47.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
47.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
47.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
47.11 }
48.1 --- a/test/src/PepSubjectReceivedTest.cc Fri Nov 15 10:17:57 2019 +0100
48.2 +++ b/test/src/PepSubjectReceivedTest.cc Fri Nov 15 10:18:23 2019 +0100
48.3 @@ -34,7 +34,7 @@
48.4 // is empty.
48.5 PepSubjectReceivedTest() {
48.6 // You can do set-up work for each test here.
48.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
48.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
48.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
48.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
48.11 }
49.1 --- a/test/src/PgpBinaryTest.cc Fri Nov 15 10:17:57 2019 +0100
49.2 +++ b/test/src/PgpBinaryTest.cc Fri Nov 15 10:18:23 2019 +0100
49.3 @@ -29,7 +29,7 @@
49.4 // is empty.
49.5 PgpBinaryTest() {
49.6 // You can do set-up work for each test here.
49.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
49.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
49.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
49.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
49.11 }
50.1 --- a/test/src/PgpListKeysTest.cc Fri Nov 15 10:17:57 2019 +0100
50.2 +++ b/test/src/PgpListKeysTest.cc Fri Nov 15 10:18:23 2019 +0100
50.3 @@ -31,7 +31,7 @@
50.4 // is empty.
50.5 PgpListKeysTest() {
50.6 // You can do set-up work for each test here.
50.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
50.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
50.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
50.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
50.11 }
51.1 --- a/test/src/ReencryptPlusExtraKeysTest.cc Fri Nov 15 10:17:57 2019 +0100
51.2 +++ b/test/src/ReencryptPlusExtraKeysTest.cc Fri Nov 15 10:18:23 2019 +0100
51.3 @@ -34,7 +34,7 @@
51.4 // is empty.
51.5 ReencryptPlusExtraKeysTest() {
51.6 // You can do set-up work for each test here.
51.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
51.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
51.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
51.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
51.11 }
52.1 --- a/test/src/RevocationTest.cc Fri Nov 15 10:17:57 2019 +0100
52.2 +++ b/test/src/RevocationTest.cc Fri Nov 15 10:18:23 2019 +0100
52.3 @@ -33,7 +33,7 @@
52.4 // is empty.
52.5 RevocationTest() {
52.6 // You can do set-up work for each test here.
52.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
52.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
52.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
52.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
52.11 }
53.1 --- a/test/src/RevokeRegenAttachTest.cc Fri Nov 15 10:17:57 2019 +0100
53.2 +++ b/test/src/RevokeRegenAttachTest.cc Fri Nov 15 10:18:23 2019 +0100
53.3 @@ -37,7 +37,7 @@
53.4 // is empty.
53.5 RevokeRegenAttachTest() {
53.6 // You can do set-up work for each test here.
53.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
53.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
53.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
53.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
53.11 }
54.1 --- a/test/src/SenderFPRTest.cc Fri Nov 15 10:17:57 2019 +0100
54.2 +++ b/test/src/SenderFPRTest.cc Fri Nov 15 10:18:23 2019 +0100
54.3 @@ -29,7 +29,7 @@
54.4 // is empty.
54.5 SenderFPRTest() {
54.6 // You can do set-up work for each test here.
54.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
54.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
54.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
54.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
54.11 }
55.1 --- a/test/src/SequenceTest.cc Fri Nov 15 10:17:57 2019 +0100
55.2 +++ b/test/src/SequenceTest.cc Fri Nov 15 10:18:23 2019 +0100
55.3 @@ -28,7 +28,7 @@
55.4 // is empty.
55.5 SequenceTest() {
55.6 // You can do set-up work for each test here.
55.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
55.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
55.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
55.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
55.11 }
56.1 --- a/test/src/SignOnlyTest.cc Fri Nov 15 10:17:57 2019 +0100
56.2 +++ b/test/src/SignOnlyTest.cc Fri Nov 15 10:18:23 2019 +0100
56.3 @@ -29,7 +29,7 @@
56.4 // is empty.
56.5 SignOnlyTest() {
56.6 // You can do set-up work for each test here.
56.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
56.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
56.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
56.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
56.11 }
57.1 --- a/test/src/SimpleBodyNotAltTest.cc Fri Nov 15 10:17:57 2019 +0100
57.2 +++ b/test/src/SimpleBodyNotAltTest.cc Fri Nov 15 10:18:23 2019 +0100
57.3 @@ -31,7 +31,7 @@
57.4 // is empty.
57.5 SimpleBodyNotAltTest() {
57.6 // You can do set-up work for each test here.
57.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
57.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
57.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
57.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
57.11 }
58.1 --- a/test/src/SubkeyRatingEvalTest.cc Fri Nov 15 10:17:57 2019 +0100
58.2 +++ b/test/src/SubkeyRatingEvalTest.cc Fri Nov 15 10:18:23 2019 +0100
58.3 @@ -29,7 +29,7 @@
58.4 // is empty.
58.5 SubkeyRatingEvalTest() {
58.6 // You can do set-up work for each test here.
58.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
58.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
58.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
58.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
58.11 }
59.1 --- a/test/src/SyncTest.cc Fri Nov 15 10:17:57 2019 +0100
59.2 +++ b/test/src/SyncTest.cc Fri Nov 15 10:18:23 2019 +0100
59.3 @@ -162,7 +162,7 @@
59.4 // is empty.
59.5 SyncTest() {
59.6 // You can do set-up work for each test here.
59.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
59.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
59.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
59.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
59.11 }
60.1 --- a/test/src/ThreadSpamTest.cc Fri Nov 15 10:17:57 2019 +0100
60.2 +++ b/test/src/ThreadSpamTest.cc Fri Nov 15 10:18:23 2019 +0100
60.3 @@ -29,7 +29,7 @@
60.4 // is empty.
60.5 ThreadSpamTest() {
60.6 // You can do set-up work for each test here.
60.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
60.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
60.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
60.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
60.11 }
61.1 --- a/test/src/TrustManipulationTest.cc Fri Nov 15 10:17:57 2019 +0100
61.2 +++ b/test/src/TrustManipulationTest.cc Fri Nov 15 10:18:23 2019 +0100
61.3 @@ -32,7 +32,7 @@
61.4 // is empty.
61.5 TrustManipulationTest() {
61.6 // You can do set-up work for each test here.
61.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
61.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
61.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
61.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
61.11 }
62.1 --- a/test/src/TrustwordsTest.cc Fri Nov 15 10:17:57 2019 +0100
62.2 +++ b/test/src/TrustwordsTest.cc Fri Nov 15 10:18:23 2019 +0100
62.3 @@ -27,7 +27,7 @@
62.4 // is empty.
62.5 TrustwordsTest() {
62.6 // You can do set-up work for each test here.
62.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
62.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
62.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
62.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
62.11 }
63.1 --- a/test/src/URIAddressTest.cc Fri Nov 15 10:17:57 2019 +0100
63.2 +++ b/test/src/URIAddressTest.cc Fri Nov 15 10:18:23 2019 +0100
63.3 @@ -30,7 +30,7 @@
63.4 // is empty.
63.5 URIAddressTest() {
63.6 // You can do set-up work for each test here.
63.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
63.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
63.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
63.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
63.11 }
64.1 --- a/test/src/UpdateIdAndMyselfTest.cc Fri Nov 15 10:17:57 2019 +0100
64.2 +++ b/test/src/UpdateIdAndMyselfTest.cc Fri Nov 15 10:18:23 2019 +0100
64.3 @@ -35,7 +35,7 @@
64.4 // is empty.
64.5 UpdateIdAndMyselfTest() {
64.6 // You can do set-up work for each test here.
64.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
64.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
64.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
64.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
64.11 }
65.1 --- a/test/src/UserIDAliasTest.cc Fri Nov 15 10:17:57 2019 +0100
65.2 +++ b/test/src/UserIDAliasTest.cc Fri Nov 15 10:18:23 2019 +0100
65.3 @@ -32,7 +32,7 @@
65.4 // is empty.
65.5 UserIDAliasTest() {
65.6 // You can do set-up work for each test here.
65.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
65.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
65.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
65.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
65.11 }
66.1 --- a/test/src/UserIdCollisionTest.cc Fri Nov 15 10:17:57 2019 +0100
66.2 +++ b/test/src/UserIdCollisionTest.cc Fri Nov 15 10:18:23 2019 +0100
66.3 @@ -110,7 +110,7 @@
66.4 // is empty.
66.5 UserIdCollisionTest() {
66.6 // You can do set-up work for each test here.
66.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
66.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
66.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
66.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
66.11 }
67.1 --- a/test/src/VerifyTest.cc Fri Nov 15 10:17:57 2019 +0100
67.2 +++ b/test/src/VerifyTest.cc Fri Nov 15 10:18:23 2019 +0100
67.3 @@ -29,7 +29,7 @@
67.4 // is empty.
67.5 VerifyTest() {
67.6 // You can do set-up work for each test here.
67.7 - test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name();
67.8 + test_suite_name = ::testing::UnitTest::GetInstance()->current_test_info()->GTEST_SUITE_SYM();
67.9 test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
67.10 test_path = get_main_test_home_dir() + "/" + test_suite_name + "/" + test_name;
67.11 }
68.1 --- a/test/src/test_util.cc Fri Nov 15 10:17:57 2019 +0100
68.2 +++ b/test/src/test_util.cc Fri Nov 15 10:18:23 2019 +0100
68.3 @@ -9,6 +9,7 @@
68.4 #include "keymanagement.h"
68.5
68.6 #include <fstream>
68.7 +#include <algorithm>
68.8 #include <sstream>
68.9 #include <iostream>
68.10 #include <stdexcept>
68.11 @@ -42,18 +43,18 @@
68.12 }
68.13
68.14 std::string get_main_test_home_dir() {
68.15 - size_t BUF_MAX_PATHLEN = 4097;
68.16 + size_t BUF_MAX_PATHLEN = 4097;
68.17 char buf[BUF_MAX_PATHLEN];// Linux max path size...
68.18
68.19 if (_main_test_home_dir.empty()) {
68.20 string curr_wd = getcwd(buf, BUF_MAX_PATHLEN);
68.21 -
68.22 +
68.23 if (curr_wd.empty())
68.24 - throw std::runtime_error("Error grabbing current working directory");
68.25 + throw std::runtime_error("Error grabbing current working directory");
68.26
68.27 _main_test_home_dir = curr_wd + "/pEp_test_home";
68.28 }
68.29 - return _main_test_home_dir;
68.30 + return _main_test_home_dir;
68.31 }
68.32
68.33 PEP_STATUS read_file_and_import_key(PEP_SESSION session, const char* fname) {
68.34 @@ -61,7 +62,7 @@
68.35 PEP_STATUS status = (key.empty() ? PEP_KEY_NOT_FOUND : PEP_STATUS_OK);
68.36 if (status == PEP_STATUS_OK)
68.37 status = import_key(session, key.c_str(), key.size(), NULL);
68.38 - return status;
68.39 + return status;
68.40 }
68.41
68.42 PEP_STATUS set_up_ident_from_scratch(PEP_SESSION session,
68.43 @@ -77,31 +78,31 @@
68.44 return status;
68.45 else
68.46 status = PEP_STATUS_OK;
68.47 -
68.48 +
68.49 pEp_identity* ident = new_identity(address, fpr, user_id, username);
68.50 if (is_priv && fpr) {
68.51 status = set_own_key(session, ident, fpr);
68.52 if (status == PEP_STATUS_OK)
68.53 status = myself(session, ident);
68.54 }
68.55 - else
68.56 + else
68.57 status = update_identity(session, ident);
68.58
68.59 if (status != PEP_STATUS_OK)
68.60 goto pep_free;
68.61 -
68.62 +
68.63 if (!ident || !ident->fpr) {
68.64 status = PEP_CANNOT_FIND_IDENTITY;
68.65 goto pep_free;
68.66 }
68.67 -
68.68 +
68.69 if (ret_ident)
68.70 *ret_ident = ident;
68.71 -
68.72 +
68.73 pep_free:
68.74 if (!ret_ident)
68.75 free_identity(ident);
68.76 - return status;
68.77 + return status;
68.78 }
68.79
68.80
68.81 @@ -117,11 +118,11 @@
68.82 if (str_len == 0)
68.83 return strdup("");
68.84 int i;
68.85 -
68.86 +
68.87 char* retval = (char*) calloc(1, str_len + 1);
68.88 for (i = 0; i < str_len; i++) {
68.89 retval[i] = tolower(str[i]);
68.90 - }
68.91 + }
68.92 return retval;
68.93 }
68.94
68.95 @@ -134,7 +135,7 @@
68.96 }
68.97 if (!str2)
68.98 return false;
68.99 -
68.100 +
68.101 return (strcmp(str1, str2) == 0);
68.102 }
68.103
68.104 @@ -161,7 +162,7 @@
68.105 {
68.106 throw std::runtime_error("Cannot read file \"" + filename + "\"! ");
68.107 }
68.108 -
68.109 +
68.110 std::stringstream sstr;
68.111 sstr << input.rdbuf();
68.112 return sstr.str();
68.113 @@ -174,7 +175,7 @@
68.114 {
68.115 throw std::runtime_error("Cannot open output file!");
68.116 }
68.117 -
68.118 +
68.119 outfile << outdata;
68.120 outfile.close();
68.121 }
68.122 @@ -312,9 +313,9 @@
68.123 case PEP_OUT_OF_MEMORY:
68.124 return "PEP_OUT_OF_MEMORY";
68.125 case PEP_UNKNOWN_ERROR:
68.126 - return "PEP_UNKNOWN_ERROR";
68.127 + return "PEP_UNKNOWN_ERROR";
68.128 default:
68.129 -
68.130 +
68.131 return "PEP_STATUS_OMGWTFBBQ - This means you're using a status the test lib doesn't know about!";
68.132 }
68.133 }
68.134 @@ -453,9 +454,9 @@
68.135 return ok;
68.136 }
68.137
68.138 -int util_delete_filepath(const char *filepath,
68.139 - const struct stat *file_stat,
68.140 - int ftw_info,
68.141 +int util_delete_filepath(const char *filepath,
68.142 + const struct stat *file_stat,
68.143 + int ftw_info,
68.144 struct FTW * ftw_struct) {
68.145 int retval = 0;
68.146 switch (ftw_info) {
68.147 @@ -465,11 +466,11 @@
68.148 case FTW_F:
68.149 case FTW_SLN:
68.150 retval = unlink(filepath);
68.151 - break;
68.152 + break;
68.153 default:
68.154 retval = -1;
68.155 }
68.156 -
68.157 +
68.158 return retval;
68.159 }
68.160
68.161 @@ -482,9 +483,9 @@
68.162
68.163 if (!session)
68.164 return PEP_UNKNOWN_ERROR;
68.165 -
68.166 +
68.167 identity_list* id_list_ptr = NULL;
68.168 -
68.169 +
68.170 for (id_list_ptr = list; id_list_ptr; id_list_ptr = id_list_ptr->next) {
68.171 pEp_identity* curr_identity = id_list_ptr->ident;
68.172 if (curr_identity) {
68.173 @@ -492,11 +493,11 @@
68.174 char* name_bak = curr_identity->username;
68.175 curr_identity->username = NULL;
68.176 status = update_identity(session, curr_identity);
68.177 - if (name_bak &&
68.178 + if (name_bak &&
68.179 (EMPTYSTR(curr_identity->username) || strcmp(name_bak, curr_identity->username) != 0)) {
68.180 free(curr_identity->username);
68.181 curr_identity->username = name_bak;
68.182 - }
68.183 + }
68.184 }
68.185 else
68.186 status = _myself(session, curr_identity, false, false, true);
68.187 @@ -504,8 +505,8 @@
68.188 return status;
68.189 }
68.190 }
68.191 -
68.192 - return PEP_STATUS_OK;
68.193 +
68.194 + return PEP_STATUS_OK;
68.195 }
68.196
68.197 PEP_STATUS MIME_decrypt_message(
68.198 @@ -528,10 +529,10 @@
68.199
68.200 if (!(mimetext && mime_plaintext && keylist && rating && flags && modified_src))
68.201 return PEP_ILLEGAL_VALUE;
68.202 -
68.203 +
68.204 PEP_STATUS status = PEP_STATUS_OK;
68.205 PEP_STATUS decrypt_status = PEP_CANNOT_DECRYPT_UNKNOWN;
68.206 -
68.207 +
68.208 message* tmp_msg = NULL;
68.209 message* dec_msg = NULL;
68.210 *mime_plaintext = NULL;
68.211 @@ -575,7 +576,7 @@
68.212 if (!dec_msg && (decrypt_status == PEP_UNENCRYPTED || decrypt_status == PEP_VERIFIED)) {
68.213 dec_msg = message_dup(tmp_msg);
68.214 }
68.215 -
68.216 +
68.217 if (decrypt_status > PEP_CANNOT_DECRYPT_UNKNOWN || !dec_msg)
68.218 {
68.219 status = decrypt_status;
68.220 @@ -599,7 +600,7 @@
68.221 free(dec_msg);
68.222 return decrypt_status;
68.223 }
68.224 -
68.225 +
68.226 pEp_error:
68.227 free_message(tmp_msg);
68.228 free_message(dec_msg);
68.229 @@ -630,34 +631,34 @@
68.230 char* own_id = NULL;
68.231 status = get_default_own_userid(session, &own_id);
68.232 free(tmp_msg->from->user_id);
68.233 -
68.234 +
68.235 if (status != PEP_STATUS_OK || !own_id) {
68.236 tmp_msg->from->user_id = strdup(PEP_OWN_USERID);
68.237 }
68.238 else {
68.239 tmp_msg->from->user_id = own_id; // ownership transfer
68.240 }
68.241 -
68.242 +
68.243 status = myself(session, tmp_msg->from);
68.244 if (status != PEP_STATUS_OK)
68.245 goto pEp_error;
68.246 }
68.247 -
68.248 +
68.249 // Own identities can be retrieved here where they would otherwise
68.250 // fail because we lack all other information. This is ok and even
68.251 // desired. FIXME: IS it?
68.252 status = update_identity_recip_list(session, tmp_msg->to);
68.253 if (status != PEP_STATUS_OK)
68.254 goto pEp_error;
68.255 -
68.256 +
68.257 status = update_identity_recip_list(session, tmp_msg->cc);
68.258 if (status != PEP_STATUS_OK)
68.259 goto pEp_error;
68.260 -
68.261 +
68.262 status = update_identity_recip_list(session, tmp_msg->bcc);
68.263 if (status != PEP_STATUS_OK)
68.264 goto pEp_error;
68.265 -
68.266 +
68.267 // This isn't incoming, though... so we need to reverse the direction
68.268 tmp_msg->dir = PEP_dir_outgoing;
68.269 status = encrypt_message(session,
68.270 @@ -666,7 +667,7 @@
68.271 &enc_msg,
68.272 enc_format,
68.273 flags);
68.274 -
68.275 +
68.276 if (status != PEP_STATUS_OK)
68.277 goto pEp_error;
68.278
68.279 @@ -716,7 +717,7 @@
68.280 flags);
68.281 if (status != PEP_STATUS_OK)
68.282 goto pEp_error;
68.283 -
68.284 +
68.285 if (!enc_msg) {
68.286 status = PEP_UNKNOWN_ERROR;
68.287 goto pEp_error;
68.288 @@ -735,15 +736,15 @@
68.289
68.290 PEP_STATUS set_up_preset(PEP_SESSION session,
68.291 pEp_test_ident_preset preset_name,
68.292 - bool set_ident,
68.293 + bool set_ident,
68.294 bool set_pep,
68.295 bool trust,
68.296 - bool set_own,
68.297 - bool setup_private,
68.298 + bool set_own,
68.299 + bool setup_private,
68.300 pEp_identity** ident) {
68.301 if (set_own && !set_ident)
68.302 return PEP_ILLEGAL_VALUE;
68.303 -
68.304 +
68.305 const char* name = NULL;
68.306 const char* user_id = NULL;
68.307 const char* email = NULL;
68.308 @@ -752,12 +753,12 @@
68.309 string privkey_dir = "test_keys/priv/";
68.310 const char* fpr = NULL;
68.311 PEP_STATUS status = PEP_STATUS_OK;
68.312 -
68.313 +
68.314 if (ident)
68.315 *ident = NULL;
68.316
68.317 pEp_identity* retval = NULL;
68.318 -
68.319 +
68.320 switch (preset_name) {
68.321 case ALICE:
68.322 name = "Alice Spivak Hyatt";
68.323 @@ -937,14 +938,14 @@
68.324 default:
68.325 return PEP_CANNOT_SET_IDENTITY;
68.326 }
68.327 -
68.328 +
68.329 string pubkey_file = pubkey_dir + key_prefix + "_pub.asc";
68.330 string privkey_file = privkey_dir + key_prefix + "_priv.asc";
68.331 -
68.332 +
68.333 if (!slurp_and_import_key(session, pubkey_file.c_str()))
68.334 return PEP_KEY_NOT_FOUND;
68.335
68.336 - if (setup_private) {
68.337 + if (setup_private) {
68.338 if (!slurp_and_import_key(session, privkey_file.c_str()))
68.339 return PEP_KEY_NOT_FOUND;
68.340 }
68.341 @@ -952,19 +953,19 @@
68.342 retval = new_identity(email, NULL, user_id, name);
68.343 if (!retval)
68.344 return PEP_OUT_OF_MEMORY;
68.345 -
68.346 - // honestly probably happens anyway
68.347 +
68.348 + // honestly probably happens anyway
68.349 if (set_ident && status == PEP_STATUS_OK)
68.350 status = set_identity(session, retval);
68.351
68.352 if (set_own) {
68.353 retval->me = true;
68.354 status = set_own_key(session, retval, fpr);
68.355 - }
68.356 -
68.357 + }
68.358 +
68.359 if (set_pep && status == PEP_STATUS_OK)
68.360 status = set_as_pEp_user(session, retval);
68.361 -
68.362 +
68.363 if (trust && status == PEP_STATUS_OK) {
68.364 if (!retval->me)
68.365 status = update_identity(session, retval);
68.366 @@ -973,13 +974,13 @@
68.367 status = set_trust(session, retval);
68.368 }
68.369 }
68.370 -
68.371 -
68.372 +
68.373 +
68.374 if (ident)
68.375 *ident = retval;
68.376 - else
68.377 + else
68.378 free_identity(retval);
68.379 -
68.380 +
68.381 return status;
68.382 }
68.383