Merged in ENGINE-427 ENGINE-451
authorKrista Bennett <krista@pep-project.org>
Tue, 14 Aug 2018 09:05:36 +0200
branchENGINE-451
changeset 2822a33bdd73952a
parent 2820 46428521d2a8
parent 2821 7fe5b66e570d
child 2824 34863e77a260
Merged in ENGINE-427
src/pgp_gpg.c
test/include/EngineTestSuite.h
test/src/EngineTestSuite.cc
test/src/SuiteMaker.cc
test/src/engine_tests/GPGConfFixTests.cc
     3.1 --- a/test/src/EngineTestSuite.cc	Tue Aug 14 08:08:11 2018 +0200
     3.2 +++ b/test/src/EngineTestSuite.cc	Tue Aug 14 09:05:36 2018 +0200
     3.3 @@ -5,6 +5,10 @@
     3.4  #include <unistd.h>
     3.5  #include <ftw.h>
     3.6  #include <assert.h>
     3.7 +#include <fstream>
     3.8 +#include <iostream>
     3.9 +#include <sys/types.h>
    3.10 +#include <sys/stat.h>
    3.11  
    3.12  #include "platform_unix.h"
    3.13  
    3.14 @@ -30,7 +34,37 @@
    3.15      number_of_tests++;
    3.16  }
    3.17  
    3.18 +void EngineTestSuite::copy_conf_file_to_test_dir(const char* dest_path, const char* conf_orig_path, const char* conf_dest_name) {
    3.19 +    string conf_dest_path = dest_path;
    3.20 +    
    3.21 +    struct stat pathinfo;
    3.22 +
    3.23 +    if(stat(conf_dest_path.c_str(), &pathinfo) != 0) {
    3.24 +        int errchk = mkdir(conf_dest_path.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
    3.25 +        if (errchk != 0)
    3.26 +            throw std::runtime_error("Error accessing conf file directory.");
    3.27 +    }
    3.28 +    
    3.29 +    conf_dest_path += "/";
    3.30 +    conf_dest_path += conf_dest_name;
    3.31 +    
    3.32 +    ifstream src(conf_orig_path);
    3.33 +    ofstream dst(conf_dest_path.c_str(), ios::trunc);
    3.34 +    
    3.35 +    assert(src);
    3.36 +    assert(dst);
    3.37 +    
    3.38 +    dst << src.rdbuf();
    3.39 +     
    3.40 +    src.close();
    3.41 +    dst.close();
    3.42 +}
    3.43 +
    3.44  void EngineTestSuite::set_full_env() {
    3.45 +    set_full_env(NULL, NULL, NULL);
    3.46 +}
    3.47 +
    3.48 +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) {
    3.49      int success = 0;
    3.50      struct stat dirchk;
    3.51      
    3.52 @@ -39,7 +73,7 @@
    3.53      success = system("gpgconf --kill all");
    3.54      if (success != 0)
    3.55          throw std::runtime_error("SETUP: Error when executing 'gpgconf --kill all'.");
    3.56 -    sleep(1); // hopefully enough time for the system to recognise that it is dead. *sigh*    
    3.57 + //   sleep(1); // hopefully enough time for the system to recognise that it is dead. *sigh*    
    3.58  
    3.59      if (stat(test_home.c_str(), &dirchk) == 0) {
    3.60          if (!S_ISDIR(dirchk.st_mode))
    3.61 @@ -59,7 +93,7 @@
    3.62              throw std::runtime_error("Error creating a test directory.");
    3.63      }
    3.64  
    3.65 -    string temp_test_home = test_home + "/" + my_name;
    3.66 +    temp_test_home = test_home + "/" + my_name;
    3.67      
    3.68      int errchk = mkdir(temp_test_home.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
    3.69      if (errchk != 0)
    3.70 @@ -85,16 +119,22 @@
    3.71      cout << "home is " << home << endl;
    3.72      assert(temp_test_home.compare(home) != 0);
    3.73      assert(temp_test_home.compare(home + "/") != 0);
    3.74 +    assert(temp_test_home.compare(home + "/.gnupg") != 0); // This is an EXCLUSION test, so we leave this.
    3.75 +    assert(temp_test_home.compare(home + ".gnupg") != 0);
    3.76      assert(temp_test_home.compare(home + "/gnupg") != 0);
    3.77      assert(temp_test_home.compare(home + "gnupg") != 0);
    3.78      assert(temp_test_home.compare(prev_gpg_home) != 0);
    3.79      assert(temp_test_home.compare(prev_gpg_home + "/gnupg") != 0);
    3.80      assert(temp_test_home.compare(prev_gpg_home + "gnupg") != 0);
    3.81 +    assert(temp_test_home.compare(prev_gpg_home + "/.gnupg") != 0);
    3.82 +    assert(temp_test_home.compare(prev_gpg_home + ".gnupg") != 0);
    3.83  
    3.84      if (temp_test_home.compare(home) == 0 || temp_test_home.compare(home + "/") == 0 ||
    3.85          temp_test_home.compare(home + "/gnupg") == 0 || temp_test_home.compare(home + "gnupg") == 0 ||
    3.86 +        temp_test_home.compare(home + "/.gnupg") == 0 || temp_test_home.compare(home + ".gnupg") == 0 ||
    3.87          temp_test_home.compare(prev_gpg_home) == 0 || temp_test_home.compare(prev_gpg_home + "/gnupg") == 0 ||
    3.88 -        temp_test_home.compare(prev_gpg_home + "gnupg") == 0)
    3.89 +        temp_test_home.compare(prev_gpg_home + "gnupg") == 0 || temp_test_home.compare(prev_gpg_home + "/.gnupg") == 0 ||
    3.90 +        temp_test_home.compare(prev_gpg_home + ".gnupg") == 0)
    3.91          throw std::runtime_error("SETUP: new GNUPGHOME threatens to mess up user GNUPGHOME (and delete all their keys). NO DICE.");
    3.92      
    3.93  //    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;
    3.94 @@ -110,7 +150,14 @@
    3.95      success = setenv("HOME", temp_test_home.c_str(), 1);
    3.96      if (success != 0)
    3.97          throw std::runtime_error("SETUP: Cannot set test_home for init.");
    3.98 -    
    3.99 +
   3.100 +    if (gpg_conf_copy_path)
   3.101 +        copy_conf_file_to_test_dir((temp_test_home + "/gnupg").c_str(), gpg_conf_copy_path, "gpg.conf");
   3.102 +    if (gpg_agent_conf_file_copy_path)        
   3.103 +        copy_conf_file_to_test_dir((temp_test_home + "/gnupg").c_str(), gpg_agent_conf_file_copy_path, "gpg-agent.conf");
   3.104 +    if (db_conf_file_copy_path)
   3.105 +        copy_conf_file_to_test_dir(temp_test_home.c_str(), db_conf_file_copy_path, ".pEp_management.db");
   3.106 +        
   3.107      unix_local_db(true);
   3.108      gpg_conf(true);
   3.109      gpg_agent_conf(true);
     4.1 --- a/test/src/SuiteMaker.cc	Tue Aug 14 08:08:11 2018 +0200
     4.2 +++ b/test/src/SuiteMaker.cc	Tue Aug 14 09:05:36 2018 +0200
     4.3 @@ -12,159 +12,163 @@
     4.4  #include "SuiteMaker.h"
     4.5  
     4.6  // Begin where we generate stuff
     4.7 +#include "MapAsn1Tests.h"
     4.8 +#include "DecorateTests.h"
     4.9 +#include "EncryptMissingPrivateKeyTests.h"
    4.10 +#include "KeyeditTests.h"
    4.11 +#include "BlacklistAcceptNewKeyTests.h"
    4.12 +#include "DecryptAttachPrivateKeyUntrustedTests.h"
    4.13 +#include "AppleMailTests.h"
    4.14 +#include "CaseAndDotAddressTests.h"
    4.15 +#include "SequenceTests.h"
    4.16 +#include "BCCTests.h"
    4.17 +#include "MessageApiTests.h"
    4.18 +#include "I18nTests.h"
    4.19 +#include "CrashdumpTests.h"
    4.20 +#include "PgpBinaryTests.h"
    4.21 +#include "RevokeRegenAttachTests.h"
    4.22 +#include "BlacklistTests.h"
    4.23 +#include "LeastCommonDenomColorTests.h"
    4.24 +#include "PepSubjectReceivedTests.h"
    4.25 +#include "MistrustUndoTests.h"
    4.26 +#include "StringpairListTests.h"
    4.27 +#include "PgpListKeysTests.h"
    4.28 +#include "ReencryptPlusExtraKeysTests.h"
    4.29  #include "MimeTests.h"
    4.30  #include "BloblistTests.h"
    4.31  #include "NewUpdateIdAndMyselfTests.h"
    4.32 -#include "I18nTests.h"
    4.33 +#include "StringlistTests.h"
    4.34 +#include "LeastColorGroupTests.h"
    4.35 +#include "GPGConfFixTests.h"
    4.36 +#include "ExternalRevokeTests.h"
    4.37 +#include "EncryptForIdentityTests.h"
    4.38 +#include "TrustwordsTests.h"
    4.39 +#include "TrustManipulationTests.h"
    4.40 +#include "MessageTwoPointOhTests.h"
    4.41 +#include "EncryptAttachPrivateKeyTests.h"
    4.42 +#include "DecryptAttachPrivateKeyTrustedTests.h"
    4.43  #include "IdentityListTests.h"
    4.44 -#include "PgpBinaryTests.h"
    4.45 -#include "MistrustUndoTests.h"
    4.46 -#include "LeastCommonDenomColorTests.h"
    4.47 -#include "StringlistTests.h"
    4.48 -#include "PgpListKeysTests.h"
    4.49 -#include "MessageApiTests.h"
    4.50 -#include "EncryptMissingPrivateKeyTests.h"
    4.51 -#include "CaseAndDotAddressTests.h"
    4.52  #include "UserIDAliasTests.h"
    4.53 -#include "BCCTests.h"
    4.54 -#include "BlacklistAcceptNewKeyTests.h"
    4.55 -#include "DecryptAttachPrivateKeyUntrustedTests.h"
    4.56 -#include "BlacklistTests.h"
    4.57 -#include "RevokeRegenAttachTests.h"
    4.58 -#include "PepSubjectReceivedTests.h"
    4.59 -#include "SequenceTests.h"
    4.60 -#include "EncryptAttachPrivateKeyTests.h"
    4.61 -#include "ExternalRevokeTests.h"
    4.62 -#include "KeyeditTests.h"
    4.63 -#include "LeastColorGroupTests.h"
    4.64 -#include "DecryptAttachPrivateKeyTrustedTests.h"
    4.65 -#include "TrustwordsTests.h"
    4.66 -#include "ReencryptPlusExtraKeysTests.h"
    4.67 -#include "MapAsn1Tests.h"
    4.68 -#include "DecorateTests.h"
    4.69 -#include "MessageTwoPointOhTests.h"
    4.70 -#include "CrashdumpTests.h"
    4.71 -#include "StringpairListTests.h"
    4.72 -#include "EncryptForIdentityTests.h"
    4.73 -#include "TrustManipulationTests.h"
    4.74 -#include "AppleMailTests.h"
    4.75  
    4.76  
    4.77  const char* SuiteMaker::all_suites[] = {
    4.78 +    "MapAsn1Tests",
    4.79 +    "DecorateTests",
    4.80 +    "EncryptMissingPrivateKeyTests",
    4.81 +    "KeyeditTests",
    4.82 +    "BlacklistAcceptNewKeyTests",
    4.83 +    "DecryptAttachPrivateKeyUntrustedTests",
    4.84 +    "AppleMailTests",
    4.85 +    "CaseAndDotAddressTests",
    4.86 +    "SequenceTests",
    4.87 +    "BCCTests",
    4.88 +    "MessageApiTests",
    4.89 +    "I18nTests",
    4.90 +    "CrashdumpTests",
    4.91 +    "PgpBinaryTests",
    4.92 +    "RevokeRegenAttachTests",
    4.93 +    "BlacklistTests",
    4.94 +    "LeastCommonDenomColorTests",
    4.95 +    "PepSubjectReceivedTests",
    4.96 +    "MistrustUndoTests",
    4.97 +    "StringpairListTests",
    4.98 +    "PgpListKeysTests",
    4.99 +    "ReencryptPlusExtraKeysTests",
   4.100      "MimeTests",
   4.101      "BloblistTests",
   4.102      "NewUpdateIdAndMyselfTests",
   4.103 -    "I18nTests",
   4.104 +    "StringlistTests",
   4.105 +    "LeastColorGroupTests",
   4.106 +    "GPGConfFixTests",
   4.107 +    "ExternalRevokeTests",
   4.108 +    "EncryptForIdentityTests",
   4.109 +    "TrustwordsTests",
   4.110 +    "TrustManipulationTests",
   4.111 +    "MessageTwoPointOhTests",
   4.112 +    "EncryptAttachPrivateKeyTests",
   4.113 +    "DecryptAttachPrivateKeyTrustedTests",
   4.114      "IdentityListTests",
   4.115 -    "PgpBinaryTests",
   4.116 -    "MistrustUndoTests",
   4.117 -    "LeastCommonDenomColorTests",
   4.118 -    "StringlistTests",
   4.119 -    "PgpListKeysTests",
   4.120 -    "MessageApiTests",
   4.121 -    "EncryptMissingPrivateKeyTests",
   4.122 -    "CaseAndDotAddressTests",
   4.123      "UserIDAliasTests",
   4.124 -    "BCCTests",
   4.125 -    "BlacklistAcceptNewKeyTests",
   4.126 -    "DecryptAttachPrivateKeyUntrustedTests",
   4.127 -    "BlacklistTests",
   4.128 -    "RevokeRegenAttachTests",
   4.129 -    "PepSubjectReceivedTests",
   4.130 -    "SequenceTests",
   4.131 -    "EncryptAttachPrivateKeyTests",
   4.132 -    "ExternalRevokeTests",
   4.133 -    "KeyeditTests",
   4.134 -    "LeastColorGroupTests",
   4.135 -    "DecryptAttachPrivateKeyTrustedTests",
   4.136 -    "TrustwordsTests",
   4.137 -    "ReencryptPlusExtraKeysTests",
   4.138 -    "MapAsn1Tests",
   4.139 -    "DecorateTests",
   4.140 -    "MessageTwoPointOhTests",
   4.141 -    "CrashdumpTests",
   4.142 -    "StringpairListTests",
   4.143 -    "EncryptForIdentityTests",
   4.144 -    "TrustManipulationTests",
   4.145 -    "AppleMailTests",
   4.146  };
   4.147  
   4.148  // This file is generated, so magic constants are ok.
   4.149 -int SuiteMaker::num_suites = 36;
   4.150 +int SuiteMaker::num_suites = 37;
   4.151  
   4.152  void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
   4.153 -    if (strcmp(test_class_name, "MimeTests") == 0)
   4.154 +    if (strcmp(test_class_name, "MapAsn1Tests") == 0)
   4.155 +        *test_suite = new MapAsn1Tests(test_class_name, test_home);
   4.156 +    else if (strcmp(test_class_name, "DecorateTests") == 0)
   4.157 +        *test_suite = new DecorateTests(test_class_name, test_home);
   4.158 +    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
   4.159 +        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
   4.160 +    else if (strcmp(test_class_name, "KeyeditTests") == 0)
   4.161 +        *test_suite = new KeyeditTests(test_class_name, test_home);
   4.162 +    else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
   4.163 +        *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
   4.164 +    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
   4.165 +        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
   4.166 +    else if (strcmp(test_class_name, "AppleMailTests") == 0)
   4.167 +        *test_suite = new AppleMailTests(test_class_name, test_home);
   4.168 +    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
   4.169 +        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
   4.170 +    else if (strcmp(test_class_name, "SequenceTests") == 0)
   4.171 +        *test_suite = new SequenceTests(test_class_name, test_home);
   4.172 +    else if (strcmp(test_class_name, "BCCTests") == 0)
   4.173 +        *test_suite = new BCCTests(test_class_name, test_home);
   4.174 +    else if (strcmp(test_class_name, "MessageApiTests") == 0)
   4.175 +        *test_suite = new MessageApiTests(test_class_name, test_home);
   4.176 +    else if (strcmp(test_class_name, "I18nTests") == 0)
   4.177 +        *test_suite = new I18nTests(test_class_name, test_home);
   4.178 +    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
   4.179 +        *test_suite = new CrashdumpTests(test_class_name, test_home);
   4.180 +    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
   4.181 +        *test_suite = new PgpBinaryTests(test_class_name, test_home);
   4.182 +    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
   4.183 +        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
   4.184 +    else if (strcmp(test_class_name, "BlacklistTests") == 0)
   4.185 +        *test_suite = new BlacklistTests(test_class_name, test_home);
   4.186 +    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
   4.187 +        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
   4.188 +    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
   4.189 +        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
   4.190 +    else if (strcmp(test_class_name, "MistrustUndoTests") == 0)
   4.191 +        *test_suite = new MistrustUndoTests(test_class_name, test_home);
   4.192 +    else if (strcmp(test_class_name, "StringpairListTests") == 0)
   4.193 +        *test_suite = new StringpairListTests(test_class_name, test_home);
   4.194 +    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
   4.195 +        *test_suite = new PgpListKeysTests(test_class_name, test_home);
   4.196 +    else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
   4.197 +        *test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
   4.198 +    else if (strcmp(test_class_name, "MimeTests") == 0)
   4.199          *test_suite = new MimeTests(test_class_name, test_home);
   4.200      else if (strcmp(test_class_name, "BloblistTests") == 0)
   4.201          *test_suite = new BloblistTests(test_class_name, test_home);
   4.202      else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
   4.203          *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
   4.204 -    else if (strcmp(test_class_name, "I18nTests") == 0)
   4.205 -        *test_suite = new I18nTests(test_class_name, test_home);
   4.206 +    else if (strcmp(test_class_name, "StringlistTests") == 0)
   4.207 +        *test_suite = new StringlistTests(test_class_name, test_home);
   4.208 +    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
   4.209 +        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
   4.210 +    else if (strcmp(test_class_name, "GPGConfFixTests") == 0)
   4.211 +        *test_suite = new GPGConfFixTests(test_class_name, test_home);
   4.212 +    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
   4.213 +        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
   4.214 +    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
   4.215 +        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
   4.216 +    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
   4.217 +        *test_suite = new TrustwordsTests(test_class_name, test_home);
   4.218 +    else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
   4.219 +        *test_suite = new TrustManipulationTests(test_class_name, test_home);
   4.220 +    else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
   4.221 +        *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
   4.222 +    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
   4.223 +        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
   4.224 +    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
   4.225 +        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
   4.226      else if (strcmp(test_class_name, "IdentityListTests") == 0)
   4.227          *test_suite = new IdentityListTests(test_class_name, test_home);
   4.228 -    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
   4.229 -        *test_suite = new PgpBinaryTests(test_class_name, test_home);
   4.230 -    else if (strcmp(test_class_name, "MistrustUndoTests") == 0)
   4.231 -        *test_suite = new MistrustUndoTests(test_class_name, test_home);
   4.232 -    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
   4.233 -        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
   4.234 -    else if (strcmp(test_class_name, "StringlistTests") == 0)
   4.235 -        *test_suite = new StringlistTests(test_class_name, test_home);
   4.236 -    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
   4.237 -        *test_suite = new PgpListKeysTests(test_class_name, test_home);
   4.238 -    else if (strcmp(test_class_name, "MessageApiTests") == 0)
   4.239 -        *test_suite = new MessageApiTests(test_class_name, test_home);
   4.240 -    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
   4.241 -        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
   4.242 -    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
   4.243 -        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
   4.244      else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
   4.245          *test_suite = new UserIDAliasTests(test_class_name, test_home);
   4.246 -    else if (strcmp(test_class_name, "BCCTests") == 0)
   4.247 -        *test_suite = new BCCTests(test_class_name, test_home);
   4.248 -    else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
   4.249 -        *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
   4.250 -    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
   4.251 -        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
   4.252 -    else if (strcmp(test_class_name, "BlacklistTests") == 0)
   4.253 -        *test_suite = new BlacklistTests(test_class_name, test_home);
   4.254 -    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
   4.255 -        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
   4.256 -    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
   4.257 -        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
   4.258 -    else if (strcmp(test_class_name, "SequenceTests") == 0)
   4.259 -        *test_suite = new SequenceTests(test_class_name, test_home);
   4.260 -    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
   4.261 -        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
   4.262 -    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
   4.263 -        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
   4.264 -    else if (strcmp(test_class_name, "KeyeditTests") == 0)
   4.265 -        *test_suite = new KeyeditTests(test_class_name, test_home);
   4.266 -    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
   4.267 -        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
   4.268 -    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
   4.269 -        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
   4.270 -    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
   4.271 -        *test_suite = new TrustwordsTests(test_class_name, test_home);
   4.272 -    else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
   4.273 -        *test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
   4.274 -    else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
   4.275 -        *test_suite = new MapAsn1Tests(test_class_name, test_home);
   4.276 -    else if (strcmp(test_class_name, "DecorateTests") == 0)
   4.277 -        *test_suite = new DecorateTests(test_class_name, test_home);
   4.278 -    else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
   4.279 -        *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
   4.280 -    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
   4.281 -        *test_suite = new CrashdumpTests(test_class_name, test_home);
   4.282 -    else if (strcmp(test_class_name, "StringpairListTests") == 0)
   4.283 -        *test_suite = new StringpairListTests(test_class_name, test_home);
   4.284 -    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
   4.285 -        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
   4.286 -    else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
   4.287 -        *test_suite = new TrustManipulationTests(test_class_name, test_home);
   4.288 -    else if (strcmp(test_class_name, "AppleMailTests") == 0)
   4.289 -        *test_suite = new AppleMailTests(test_class_name, test_home);
   4.290  }
   4.291  
   4.292  void SuiteMaker::suitemaker_buildlist(const char** test_class_names, int num_to_run, const char* test_home, std::vector<Test::Suite*>& test_suites) {
     5.1 --- a/test/src/engine_tests/GPGConfFixTests.cc	Tue Aug 14 08:08:11 2018 +0200
     5.2 +++ b/test/src/engine_tests/GPGConfFixTests.cc	Tue Aug 14 09:05:36 2018 +0200
     5.3 @@ -98,74 +98,74 @@
     5.4  
     5.5  void GPGConfFixTests::check_conf_fix_broken_conf_old_db_0() {
     5.6      set_full_env("test_files/427_bad_gpg_conf_0", NULL, "test_files/427_old_db");
     5.7 -    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_0", (temp_test_home + "/.gnupg/gpg.conf").c_str()));
     5.8 +    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_0", (temp_test_home + "/gnupg/gpg.conf").c_str()));
     5.9  }
    5.10  
    5.11  void GPGConfFixTests::check_conf_fix_broken_conf_old_db_1() {
    5.12      set_full_env("test_files/427_bad_gpg_conf_1", NULL, "test_files/427_old_db");    
    5.13 -    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_1", (temp_test_home + "/.gnupg/gpg.conf").c_str()));
    5.14 +    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_1", (temp_test_home + "/gnupg/gpg.conf").c_str()));
    5.15      
    5.16  }
    5.17  
    5.18  void GPGConfFixTests::check_conf_fix_broken_conf_old_db_2() {
    5.19      set_full_env("test_files/427_bad_gpg_conf_2", NULL, "test_files/427_old_db");        
    5.20 -    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_2", (temp_test_home + "/.gnupg/gpg.conf").c_str()));    
    5.21 +    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_2", (temp_test_home + "/gnupg/gpg.conf").c_str()));    
    5.22  }
    5.23  
    5.24  void GPGConfFixTests::check_conf_fix_broken_conf_old_db_3() {
    5.25      set_full_env("test_files/427_bad_gpg_conf_3", NULL, "test_files/427_old_db");    
    5.26 -    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_3", (temp_test_home + "/.gnupg/gpg.conf").c_str()));    
    5.27 +    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_3", (temp_test_home + "/gnupg/gpg.conf").c_str()));    
    5.28  }
    5.29  
    5.30  void GPGConfFixTests::check_conf_fix_broken_conf_old_db_4() {
    5.31      set_full_env("test_files/427_bad_gpg_conf_4", NULL, "test_files/427_old_db");        
    5.32 -    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_4", (temp_test_home + "/.gnupg/gpg.conf").c_str()));    
    5.33 +    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_4", (temp_test_home + "/gnupg/gpg.conf").c_str()));    
    5.34  }
    5.35  
    5.36  void GPGConfFixTests::check_conf_fix_broken_conf_old_db_5() {
    5.37      set_full_env("test_files/427_bad_gpg_conf_5", NULL, "test_files/427_old_db");        
    5.38 -    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_5", (temp_test_home + "/.gnupg/gpg.conf").c_str()));    
    5.39 +    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_5", (temp_test_home + "/gnupg/gpg.conf").c_str()));    
    5.40  }
    5.41  
    5.42  void GPGConfFixTests::check_conf_fix_broken_conf_old_db_6() {
    5.43      set_full_env("test_files/427_bad_gpg_conf_6", NULL, "test_files/427_old_db");        
    5.44 -    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_6", (temp_test_home + "/.gnupg/gpg.conf").c_str()));    
    5.45 +    TEST_ASSERT(file_bytes_equal("test_files/427_fixed_gpg_conf_6", (temp_test_home + "/gnupg/gpg.conf").c_str()));    
    5.46  }
    5.47  
    5.48  void GPGConfFixTests::check_conf_fix_broken_agent_conf_old_db_0() {
    5.49      set_full_env(NULL, "test_files/450_bad_gpgagent_conf_0", "test_files/427_old_db");
    5.50 -    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_0", (temp_test_home + "/.gnupg/gpg-agent.conf").c_str()));
    5.51 +    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_0", (temp_test_home + "/gnupg/gpg-agent.conf").c_str()));
    5.52  }
    5.53  
    5.54  void GPGConfFixTests::check_conf_fix_broken_agent_conf_old_db_1() {
    5.55      set_full_env(NULL, "test_files/450_bad_gpgagent_conf_1", "test_files/427_old_db");    
    5.56 -    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_1", (temp_test_home + "/.gnupg/gpg-agent.conf").c_str()));
    5.57 +    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_1", (temp_test_home + "/gnupg/gpg-agent.conf").c_str()));
    5.58      
    5.59  }
    5.60  
    5.61  void GPGConfFixTests::check_conf_fix_broken_agent_conf_old_db_2() {
    5.62      set_full_env(NULL, "test_files/450_bad_gpgagent_conf_2", "test_files/427_old_db");        
    5.63 -    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_2", (temp_test_home + "/.gnupg/gpg-agent.conf").c_str()));    
    5.64 +    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_2", (temp_test_home + "/gnupg/gpg-agent.conf").c_str()));    
    5.65  }
    5.66  
    5.67  void GPGConfFixTests::check_conf_fix_broken_agent_conf_old_db_3() {
    5.68      set_full_env(NULL, "test_files/450_bad_gpgagent_conf_3", "test_files/427_old_db");    
    5.69 -    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_3", (temp_test_home + "/.gnupg/gpg-agent.conf").c_str()));    
    5.70 +    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_3", (temp_test_home + "/gnupg/gpg-agent.conf").c_str()));    
    5.71  }
    5.72  
    5.73  void GPGConfFixTests::check_conf_fix_broken_agent_conf_old_db_4() {
    5.74      set_full_env(NULL, "test_files/450_bad_gpgagent_conf_4", "test_files/427_old_db");        
    5.75 -    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_4", (temp_test_home + "/.gnupg/gpg-agent.conf").c_str()));    
    5.76 +    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_4", (temp_test_home + "/gnupg/gpg-agent.conf").c_str()));    
    5.77  }
    5.78  
    5.79  void GPGConfFixTests::check_conf_fix_broken_agent_conf_old_db_5() {
    5.80      set_full_env(NULL, "test_files/450_bad_gpgagent_conf_5", "test_files/427_old_db");        
    5.81 -    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_5", (temp_test_home + "/.gnupg/gpg-agent.conf").c_str()));    
    5.82 +    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_5", (temp_test_home + "/gnupg/gpg-agent.conf").c_str()));    
    5.83  }
    5.84  
    5.85  void GPGConfFixTests::check_conf_fix_broken_agent_conf_old_db_6() {
    5.86      set_full_env(NULL, "test_files/450_bad_gpgagent_conf_6", "test_files/427_old_db");        
    5.87 -    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_6", (temp_test_home + "/.gnupg/gpg-agent.conf").c_str()));    
    5.88 +    TEST_ASSERT(file_bytes_equal("test_files/450_good_gpgagent_conf_6", (temp_test_home + "/gnupg/gpg-agent.conf").c_str()));    
    5.89  }
    5.90  
    5.91  void GPGConfFixTests::check_gpgconf_overwrite_0() {