Fixed test suite problems and found stupid Heisenbug. Which, naturally, was my fault. ENGINE-434
authorKrista Bennett <krista@pep-project.org>
Wed, 23 May 2018 11:41:33 +0200
branchENGINE-434
changeset 268501edd04b3c38
parent 2684 a5175dd76542
child 2686 00b4c506d25f
Fixed test suite problems and found stupid Heisenbug. Which, naturally, was my fault.
test/include/EngineTestSuite.h
test/msg_2.0.asc
test/src/EngineTestSessionSuite.cc
test/src/EngineTestSuite.cc
test/src/engine_tests/AppleMailTests.cc
test/src/engine_tests/CaseAndDotAddressTests.cc
test/src/engine_tests/CrashdumpTests.cc
test/src/engine_tests/MimeTests.cc
test/src/engine_tests/SequenceTests.cc
test/src/engine_tests/StringlistTests.cc
test/src/engine_tests/StringpairListTests.cc
test/src/engine_tests/TrustManipulationTests.cc
test/src/engine_tests/TrustwordsTests.cc
test/src/engine_tests/UserIDAliasTests.cc
     1.1 --- a/test/include/EngineTestSuite.h	Tue May 22 12:56:27 2018 +0200
     1.2 +++ b/test/include/EngineTestSuite.h	Wed May 23 11:41:33 2018 +0200
     1.3 @@ -29,6 +29,8 @@
     1.4          
     1.5          std::map<std::string, void (Test::Suite::*)()> test_map;                
     1.6          
     1.7 +        string my_name;
     1.8 +        
     1.9          unsigned int number_of_tests;
    1.10          unsigned int on_test_number;
    1.11          
    1.12 @@ -38,5 +40,6 @@
    1.13          void set_full_env();
    1.14          void restore_full_env();
    1.15          void initialise_test_home();
    1.16 +        void set_my_name();    
    1.17  };
    1.18  #endif
     2.1 --- a/test/msg_2.0.asc	Tue May 22 12:56:27 2018 +0200
     2.2 +++ b/test/msg_2.0.asc	Wed May 23 11:41:33 2018 +0200
     2.3 @@ -6,82 +6,82 @@
     2.4   <three-OMGWTFBBQ.edfddffd839274982347239847@pep-project.org>
     2.5  X-pEp-Version: 2.0
     2.6  MIME-Version: 1.0
     2.7 -Content-Type: multipart/mixed; boundary="3707bbd2378d65a16829c3df64cdb9cc"
     2.8 +Content-Type: multipart/mixed; boundary="59c618043d3448636f66533578e2c287"
     2.9  
    2.10 ---3707bbd2378d65a16829c3df64cdb9cc
    2.11 +--59c618043d3448636f66533578e2c287
    2.12  Content-Type: text/plain; charset="utf-8"
    2.13  Content-Transfer-Encoding: quoted-printable
    2.14  Content-Disposition: inline; filename="msg.txt"
    2.15  
    2.16  this message was encrypted with p=E2=89=A1p https://pEp-project.org
    2.17 ---3707bbd2378d65a16829c3df64cdb9cc
    2.18 +--59c618043d3448636f66533578e2c287
    2.19  Content-Type: application/pgp-encrypted
    2.20  
    2.21  Version: 1
    2.22 ---3707bbd2378d65a16829c3df64cdb9cc
    2.23 +--59c618043d3448636f66533578e2c287
    2.24  Content-Type: application/octet-stream
    2.25  Content-Disposition: attachment; filename="msg.asc"
    2.26  
    2.27  -----BEGIN PGP MESSAGE-----
    2.28  
    2.29 -hQEMA1oCBdlzCD9NAQf/aP0r+AcoAtTa2PpqnfdMriHZW84LJyTJerLOYeP/XEYh
    2.30 -DsGPQZIhhViOTnXx4l6/wG1UHQjJF7F+rvKeZTRrciJnLzhRDDHsli2lGXrUmbEM
    2.31 -vmUG/gnMM3YMjq/++/kZUJ/FTr6C9/JYTofueG4hYzYJS8kMz0m33Kiep2x+Btiz
    2.32 -cjJVLEBPxt5cRLZujIfEJTenE+yle8nNFUnkKuPg5xPgmGU7ITtvj9RW7bWe8/vU
    2.33 -D05avbzmVg3YNynUdJAN4hbrO1oClQXj0T5x8H5e0X4OmwoPS9z8lnuzBWBjxXnR
    2.34 -sUtOBT92iTAuTIpRB/rNUgPWWnzumuzk5wDLvbeZy4UBDAOo6/9vKSPoQgEH/ion
    2.35 -oXxLtkz2V0HOMzyQ6sIIYjpD7GdPukjpzFfAKKwsQM2j2pb1Jg3Q1DLMmup55x6x
    2.36 -ODdhjx+1UrX2BBV2jShLzebkJ9hQ7dWzfGXlVe43YPUaHCNb5Nq6Zj31kePibDWg
    2.37 -4+ZcuZTAZzQGHW5s/pAa1wgK2PVwvMrNQ3SelMlc/jR8XtsYF/JIImnotaG9yEIa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KQkl
    2.53 -IIZlo/580/cU/TlhSwLB3mDrc5LBkLNtEN5Ii21LkVk+dkZ4kJIoyuvf7TEZNuRB
    2.54 -xv1jrnQXHz7n9TeMPfY1DlQRVMLGo67TVwpu58swljW+wV/wrNuArgEQQCivdqWd
    2.55 -QUxcpJFGZ+vEXvff0diW1fEYuSTXFU6ucLsER3m+NYHNe+mk0hyIodwy3g91BA+m
    2.56 -wDzwn3VhULIVBSvvQmN0VdYXG1K5RlgjaE3Qz8OZ63AjdDodAWqPvpqDPe2eKDoz
    2.57 -8mHTP6NsXIeWJxguabwfQv3zOuFomDFjSb5t+ew3cS4gnZn12/1FKs7epZ6O9PmH
    2.58 -uqMhiqM3CQDI0PcScV/qOqqINktnVR16MArUm9dXA6TXcLLblpNzMadAaMxj1+jd
    2.59 -q4vcuPuaJ6x8vTtQbBq2W+fZ2a8o6lvueXbHCD4vPB1ViRn4g1qWZXbS21YZyd1e
    2.60 -JPQexaTiWWUgsoGmGvLifwFJCi/sjEPDmSe/06AGPlKh3q+g7oFM8cD83faClzF1
    2.61 -0pqJRMmvyKp5lPgPD+tvG/XoG9aguVFTWulX0y7gAJkxLgVkDEy44+RKiX8q/Daj
    2.62 -EeIPdo5FbHK7WbF+tXGXGIHrYcJvwd5/aK+QsQc/h1wfK3U0s0kJokGmceOPVjE4
    2.63 -EuuM1NK1TjqGTsopMDnnC5mzNvwiiz5QsxdVquXCopd1PpYm5dV4DK2hYlf9ENBA
    2.64 -ahHeFQWZRppoHKHPcdZNRM7fu9ucGVVG3MbZTM+qi4nfAATVT5BWrmJRN2t9BX2h
    2.65 -3MQWEeA+y+drFiiK0lBX3j57oJcMW1vTIAAk0EOYPVJgMyxyYhqbTaw86PcM72mR
    2.66 -czpg7bnlKElujGwaw8AKBLe/XC0sM2hAqS0f669bzCCPE14BLIhrbp3UEXgiX2vr
    2.67 -SWhH1BHZxle5SE83B+LKyMr/sM9r5SiRTyK4pNuM9yT+gl0hNKpsx5K86XKeRhuU
    2.68 -46qa26uhmR0uBwypW/YiiwSuyQ+fXpJtnqhi98y/KRtivaipSgRZVqdfXOFJiuZJ
    2.69 -CRTpcEvpErHCnWvJK3jSbclFoUZdcCr3NdWBy5VppxRUa3pzTJokCd5znjVfFffx
    2.70 -HAXqqM1pGOgV99LFN3F30GqGfihX4HzQBcE9zwTIanWBnOZlqqVC5m5ne1Ar4zGB
    2.71 -z4DgLd/i8H/cLNwHDrD/gkIZBeyQySQp8T2SXRjSLnCKqiaNpjE0W0bOhSjI+KSu
    2.72 -gY/qMl4KrkiVxVOB76onxCIQ9jhLtpL8mJQYiWM84YhuA9PpFoj/+Xj8zicwafjs
    2.73 -ri/AYnyNZhmbMhhgMLJyK5iajShPJvQqJYIGqW2VFkKfC72MGgZXaNSf9FEfR60P
    2.74 -VonbkSZ947CqQ1EmdJiYAaUJAfBmHRrfMbhuBfXAFi6drMlImOOAocoxMTVdsmsI
    2.75 -raC6HDzTnCeeceIGRdpzRErQcoN2EaEUUN3Sfzktzwk9NNNxyFCT1ElxTDfNAe3J
    2.76 -OmHFjhz4uj+zaeW+qfA4HtzkUK+3i2Ir8pbUV8GC6jZ4PNsqxoc5gGGezjnMnzq/
    2.77 -lLL+FbRYonk6qNws7saxT1EBELTEkmoNa9DTafLq6jzg/TghFX6c+tSR1VYIxikQ
    2.78 -oGB17QAb9Z8lomyHvy6rgYSgqpIDYyNSD7j/Y36m6BzOISBo6ajzfA1cxPpHGaQD
    2.79 -6+IJ2d7EWkeA+EMIZbC9UsybqOV+JP5twPhAnrN/aFuRPLOROfA3Eu0InjA+O6Eh
    2.80 -bDfD85zW5YeWCdfSKDwgr1mW04heGi378MpfyQpk8yrjuZ7mFbZ5XIsT/5mkGbtu
    2.81 -1KR34/KUVAf+gjjypfB2dFyDAhwVVvgg2bLUx2hTyQjDYQYC6x2ahBpE0bqslNvF
    2.82 -Ww7EXMZ1MbYXbeCk601QzHpBxpx4+RL+p4qpn/e7pe0W6tojaPvtmH6GfPBf1bKP
    2.83 -cry6i/eN3tJAsNPbjUo9/sWyzXDy37EUJn30lFALEXGBTpjP76d5OT3t/Uj9ioqW
    2.84 -yhet5HvkreX7KFUBCw6vS0/RPsdVO6+KWOYP+ZsTaDDnp4PwLfMqEfFHw+Iz9XfD
    2.85 -NqU94u6dsxyATiQ7B1URdM1VBw==
    2.86 -=uubX
    2.87 +hQEMA1oCBdlzCD9NAQf9EwUJRWKPext8q2OktQF8+QrJ37sbLyIosBkPGtuXVVWs
    2.88 +AT0aykXAGJjtJGJosBJCqkJBO6MNfv+dl0nuh4ym/gmH5LWQPZ7P3M+aPTu/tAwV
    2.89 +Lz2SBDyCCPPRIcZ7psGIC9gKH+Hs4cGyVIPT65+WGceYpqounN5NKkveV2e6vXsU
    2.90 +URV3uOYZMk0yj6md5ehqGYQ8Vi6BgTue6oSeTcH+WEpiLHz0JVjDR+JKLQ+HK5ZU
    2.91 +EPMgOlco0HjP846s26ljUoRRr+pesl8ks+35tYKt5yxpcjPxaZ/6UZncp64sGYlg
    2.92 +UWEC1db6k3E/mA55O2Egqh6/Co+wysgFXPPSDjw9/YUBDAOo6/9vKSPoQgEH/Rrj
    2.93 +4db3GUy8zv09hXJ7q39fVRpXO6aBdI975YeZ0duLV763Nbb1x5DIvqhS5R8/bOCB
    2.94 +Et1JYItiLryML9j6kOecVQHMCZod22jl40PQN6lIX6wecuMbgxGG5TGLBICcvvo4
    2.95 +qpXhV/GapFxm3BTFFmg3Odmnt2047fGjoz16SnpJHum2B70OHM32Zk8geDBr+UVR
    2.96 +GoddYcB7ryPlEO0jI72NuJtxeY5mGqocm1vn5KUW7N1F9CDEmqTnuHwGKavKI413
    2.97 +rtBxJTbnBaVPzcJqOXtN02uaJog1c89r/neSVYbEiIhdSCOIm423n/SEYq/Ex42F
    2.98 +2hodZIo3nERaxzfRDmzS6wFHwd8QrWKENP6fAyt205h7S+KY735nnYr+cW6bSLSR
    2.99 +vzmXdoz8aCfPk4XFp3uyeBnhuLSH8oZHycYV1XIlIy4zO0SrQT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AFfeZY/NpqSSQ
   2.115 +BI6upR32GTtSJnrSRy4VRT5RwzQDlezjiyFjU1xjz4bF4laWphNQSwN2xWSe3cAt
   2.116 +yJdm00XbGThr7YpnjveumPwNpCrZVAcPML9jXyozT9mSkLVdaJAI8GH48Anxpo/u
   2.117 +m+/b+zM1hsNEX+jH+h9BxjL964yTr9cvAdTAtA55MeyUsQjLT9KlvnarEMqGWkLY
   2.118 +Od3vXiuv5UrMIhb99IB6eZs3WJv/KTgNbgK7iDX+ECoT1FCh7GT5fDoSALXjNHvp
   2.119 +SrZu21eBa4fSV9tfTtwC319sRESPFFt5NNT4gtBWeS6YhjhmcT/GQdf23Q4ECYiz
   2.120 +s73AT9FJ2MFSl08AZoOyBpUX8UOVPemGF6oDAw2uaAkIM4S71L4EuXwodLqFend6
   2.121 +V5jG1rYmdcU+qBNmboiCtBdW/F/8NsU1T8Avp33fzVd7DbhZdU33b8Qy76HacV89
   2.122 +0AOeQ9+lbTwkyelAVmoC009vf3cIe059q77ZSrwakRJfFubbxu5/YzN5hrMTukb4
   2.123 +Edi9rIUF0nmxSTquUEsaJViakXUEK3G4O4aSrnOUv1035H3eVrD/5bR6DYMXUb/p
   2.124 +5u311a2JtDeil43FzwZqXDBqH72yUB3F4WojqaeQWXsMn2196PTAlQNDm4kyDknb
   2.125 +2QWe5aJG7RAvmwbAYpaDQD8Rv+YbtIYjzim6A51YZq10NuxKydv9N+B+WlfeHxVf
   2.126 +khkYeb+9vMXb5e351oBQ4BH7o4A3Ni4HXV4IT0kEFwcMXmg892bH4Yn0//n95rH7
   2.127 +lqPZl4XDsgPs+YOYg02xq0fFd2aCXFKmTnf8zIFTJYh83sWV0uuHPCo9cJSl1iA7
   2.128 +1ejxClNKqRvByX/Mwzwt+f9k2hNmwrQgVpjcaxux46O5V6L14U962hQzBBN7zyuK
   2.129 +DZ6Bc7r4ydN6eWq8y9JB7jFAu2UNOLqQJqMfR7oSou4LEAG1H6OROhfn/fOZO33c
   2.130 +Vo2yXhNP2E2Yu1s5VaQsmCnQeaxq8p8Au4N/+PZIQwR3Yae5+i1Uv4cJM5pmieC1
   2.131 +0aBDUfHe2hyOstqetusZstXcOGaxLfGpIo3a2drn6oNNPRpntHUD8a90coJCGoW9
   2.132 +dz42snAym6rBqCSehutGZk2MrxFuW/97+1Hj9zx5mOU1euoUUnEeoxWxjrybd0b1
   2.133 +jt2W4dnKxwTvL6TBeRsGjmp3CavbB/1z1uR45TU8nl9WycoqPetqFP4UqTPNGnEI
   2.134 +8KwbwY71aGehBhSej5hdI2Nx3dICbayYtv76v0VVntjrIWM6Co0XOPR4EbDtWZ+D
   2.135 +Xzp2FHFKZTAUA0vzAvnpfgt4dB3d2+MbPS7GUdhP8QhP45LjrxDbO8cF0WPCy6gy
   2.136 +ltegbjnICEBdbASlw9cwAbqfrOnYRjJ8PcOTXgtOrc9JDsN8mlot3URJjc0sbTft
   2.137 +V+rxIjdQqQG5b5zytES5Zes3pWsqT66VgA1MNuPCD7/4MoQervpniufHmI7R00mz
   2.138 +pgbmXApTSJkiGxPHgG7kSOQFOOrjDqofN2mKRWKfaElXyob7Eum03dmvNaiixVlI
   2.139 +6yf8hOcqwXAn9UQ1sqPKzeFhRVqp3yO1phYXIGKMV1qBom2mfbBnJmlZ9fAbAv9j
   2.140 +RnNeQviKIRgcbkx7z1nL5j+XdrIR2mIyUluJ1usOGnpwc4OJf1YSJ81ZZ/8JurWP
   2.141 +aiSTe/+z8l+PuAjdi997NWJmwLJLAbEdigI2k8BwN5USZ+Q3rwz9ar9tLOlIhc8U
   2.142 +dTgnGbW2edqigmYvq7nl4CvcHycFmDkhmTq3Of2GStiVStYGuH+cv0ekM3NM/Soh
   2.143 +VQVauXenRD00W4E=
   2.144 +=oDRB
   2.145  -----END PGP MESSAGE-----
   2.146  
   2.147 ---3707bbd2378d65a16829c3df64cdb9cc--
   2.148 +--59c618043d3448636f66533578e2c287--
     3.1 --- a/test/src/EngineTestSessionSuite.cc	Tue May 22 12:56:27 2018 +0200
     3.2 +++ b/test/src/EngineTestSessionSuite.cc	Wed May 23 11:41:33 2018 +0200
     3.3 @@ -23,6 +23,7 @@
     3.4  }
     3.5  
     3.6  void EngineTestSessionSuite::tear_down() {
     3.7 +    cout << "Session: tear_down - OTN: " << on_test_number << " NOT: " << number_of_tests << endl; 
     3.8      if (on_test_number == number_of_tests)
     3.9          restore_full_env();
    3.10          
     4.1 --- a/test/src/EngineTestSuite.cc	Tue May 22 12:56:27 2018 +0200
     4.2 +++ b/test/src/EngineTestSuite.cc	Wed May 23 11:41:33 2018 +0200
     4.3 @@ -19,6 +19,7 @@
     4.4              
     4.5      number_of_tests = 0;
     4.6      on_test_number = 0;
     4.7 +    real_home = getenv("HOME");
     4.8  }
     4.9  
    4.10  EngineTestSuite::~EngineTestSuite() {}
    4.11 @@ -33,6 +34,8 @@
    4.12      int success = 0;
    4.13      struct stat dirchk;
    4.14      
    4.15 +    set_my_name();
    4.16 +
    4.17      success = system("gpgconf --kill all");
    4.18      if (success != 0)
    4.19          throw std::runtime_error("SETUP: Error when executing 'gpgconf --kill all'.");
    4.20 @@ -56,10 +59,15 @@
    4.21              throw std::runtime_error("Error creating a test directory.");
    4.22      }
    4.23  
    4.24 -    string temp_test_home = test_home + "/" + to_string(on_test_number);
    4.25 +    string temp_test_home = test_home + "/" + my_name;
    4.26      
    4.27      int errchk = mkdir(temp_test_home.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
    4.28 -    cout << errchk << endl;
    4.29 +    if (errchk != 0)
    4.30 +        throw std::runtime_error("Error creating a test directory.");
    4.31 +
    4.32 +    temp_test_home += "/" + to_string(on_test_number);
    4.33 +
    4.34 +    errchk = mkdir(temp_test_home.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
    4.35      if (errchk != 0)
    4.36          throw std::runtime_error("Error creating a test directory.");
    4.37  
    4.38 @@ -67,13 +75,22 @@
    4.39      // but it needn't remain so forever and always
    4.40      char* tmp = getenv("GNUPGHOME");
    4.41      if (tmp)
    4.42 -        prev_gpg_home = getenv("GNUPGHOME");
    4.43 +        prev_gpg_home = tmp;
    4.44          
    4.45      if (temp_test_home.empty())
    4.46          throw std::runtime_error("SETUP: BAD INITIALISATION. No test home.");
    4.47  
    4.48      
    4.49      string home = getenv("HOME");
    4.50 +    cout << "home is " << home << endl;
    4.51 +    assert(temp_test_home.compare(home) != 0);
    4.52 +    assert(temp_test_home.compare(home + "/") != 0);
    4.53 +    assert(temp_test_home.compare(home + "/.gnupg") != 0);
    4.54 +    assert(temp_test_home.compare(home + ".gnupg") != 0);
    4.55 +    assert(temp_test_home.compare(prev_gpg_home) != 0);
    4.56 +    assert(temp_test_home.compare(prev_gpg_home + "/.gnupg") != 0);
    4.57 +    assert(temp_test_home.compare(prev_gpg_home + ".gnupg") != 0);
    4.58 +
    4.59      if (temp_test_home.compare(home) == 0 || temp_test_home.compare(home + "/") == 0 ||
    4.60          temp_test_home.compare(home + "/.gnupg") == 0 || temp_test_home.compare(home + ".gnupg") == 0 ||
    4.61          temp_test_home.compare(prev_gpg_home) == 0 || temp_test_home.compare(prev_gpg_home + "/.gnupg") == 0 ||
    4.62 @@ -94,7 +111,7 @@
    4.63      if (success != 0)
    4.64          throw std::runtime_error("SETUP: Cannot set test_home for init.");
    4.65      
    4.66 -    const char* new_home_db = unix_local_db(true);
    4.67 +    unix_local_db(true);
    4.68      gpg_conf(true);
    4.69      gpg_agent_conf(true);
    4.70      
    4.71 @@ -122,7 +139,12 @@
    4.72      
    4.73      success = setenv("HOME", real_home.c_str(), 1);
    4.74      if (success != 0)
    4.75 -        throw std::runtime_error("RESTORE: Cannot reset home directory! Either set environment variable manually back to your home, or quit this session!");    
    4.76 +        throw std::runtime_error("RESTORE: Cannot reset home directory! Either set environment variable manually back to your home, or quit this session!");
    4.77 +    else
    4.78 +        cout << "RESTORE: HOME is now " << getenv("HOME") << endl;
    4.79 +    unix_local_db(true);
    4.80 +    gpg_conf(true);
    4.81 +    gpg_agent_conf(true);
    4.82  
    4.83  }
    4.84  
    4.85 @@ -131,3 +153,7 @@
    4.86  }
    4.87  
    4.88  void EngineTestSuite::tear_down() {}
    4.89 +
    4.90 +void EngineTestSuite::set_my_name() {
    4.91 +    my_name = typeid(*this).name();
    4.92 +}
    4.93 \ No newline at end of file
     5.1 --- a/test/src/engine_tests/AppleMailTests.cc	Tue May 22 12:56:27 2018 +0200
     5.2 +++ b/test/src/engine_tests/AppleMailTests.cc	Wed May 23 11:41:33 2018 +0200
     5.3 @@ -27,7 +27,8 @@
     5.4  
     5.5  AppleMailTests::AppleMailTests(string suitename, string test_home_dir) : 
     5.6      EngineTestSessionSuite::EngineTestSessionSuite(suitename, test_home_dir) {            
     5.7 -    TEST_ADD(AppleMailTests::check_apple_mail);
     5.8 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("AppleMailTests::check_apple_mail"),
     5.9 +                                                                      static_cast<Func>(&AppleMailTests::check_apple_mail)));
    5.10  }
    5.11  
    5.12  void AppleMailTests::check_apple_mail() {
     6.1 --- a/test/src/engine_tests/CaseAndDotAddressTests.cc	Tue May 22 12:56:27 2018 +0200
     6.2 +++ b/test/src/engine_tests/CaseAndDotAddressTests.cc	Wed May 23 11:41:33 2018 +0200
     6.3 @@ -19,7 +19,8 @@
     6.4  
     6.5  CaseAndDotAddressTests::CaseAndDotAddressTests(string suitename, string test_home_dir) : 
     6.6      EngineTestSessionSuite::EngineTestSessionSuite(suitename, test_home_dir) {            
     6.7 -    TEST_ADD(CaseAndDotAddressTests::check_case_and_dot_address);
     6.8 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("CaseAndDotAddressTests::check_case_and_dot_address"),
     6.9 +                                                                      static_cast<Func>(&CaseAndDotAddressTests::check_case_and_dot_address)));
    6.10  }
    6.11  
    6.12  void CaseAndDotAddressTests::check_case_and_dot_address() {
     7.1 --- a/test/src/engine_tests/CrashdumpTests.cc	Tue May 22 12:56:27 2018 +0200
     7.2 +++ b/test/src/engine_tests/CrashdumpTests.cc	Wed May 23 11:41:33 2018 +0200
     7.3 @@ -13,7 +13,8 @@
     7.4  
     7.5  CrashdumpTests::CrashdumpTests(string suitename, string test_home_dir) :
     7.6      EngineTestSessionSuite::EngineTestSessionSuite(suitename, test_home_dir) {
     7.7 -    TEST_ADD(CrashdumpTests::check_crashdump);
     7.8 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("CrashdumpTests::check_crashdump"),
     7.9 +                                                                      static_cast<Func>(&CrashdumpTests::check_crashdump)));
    7.10  }
    7.11  
    7.12  void CrashdumpTests::check_crashdump() {
     8.1 --- a/test/src/engine_tests/MimeTests.cc	Tue May 22 12:56:27 2018 +0200
     8.2 +++ b/test/src/engine_tests/MimeTests.cc	Wed May 23 11:41:33 2018 +0200
     8.3 @@ -69,18 +69,6 @@
     8.4  
     8.5  void MimeTests::check_mime() {
     8.6  
     8.7 -    cout << "\n*** mime_test ***\n\n";
     8.8 -
     8.9 -    PEP_SESSION session;
    8.10 -    
    8.11 -    cout << "calling init()\n";
    8.12 -    PEP_STATUS status1 = init(&session);   
    8.13 -    TEST_ASSERT_MSG((status1 == PEP_STATUS_OK), "status1 == PEP_STATUS_OK");
    8.14 -    TEST_ASSERT_MSG((session), "session");
    8.15 -    cout << "init() completed.\n";
    8.16 -
    8.17 -    // mime test code
    8.18 -
    8.19      // testing multipart/alternative
    8.20  
    8.21      message *msg2 = new_message(PEP_dir_incoming);
     9.1 --- a/test/src/engine_tests/SequenceTests.cc	Tue May 22 12:56:27 2018 +0200
     9.2 +++ b/test/src/engine_tests/SequenceTests.cc	Wed May 23 11:41:33 2018 +0200
     9.3 @@ -15,7 +15,8 @@
     9.4  
     9.5  SequenceTests::SequenceTests(string suitename, string test_home_dir) : 
     9.6      EngineTestSessionSuite::EngineTestSessionSuite(suitename, test_home_dir) {            
     9.7 -    TEST_ADD(SequenceTests::check_sequences);
     9.8 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("SequenceTests::check_sequences"),
     9.9 +                                                                      static_cast<Func>(&SequenceTests::check_sequences)));
    9.10  }
    9.11  
    9.12  void SequenceTests::check_sequences() {
    10.1 --- a/test/src/engine_tests/StringlistTests.cc	Tue May 22 12:56:27 2018 +0200
    10.2 +++ b/test/src/engine_tests/StringlistTests.cc	Wed May 23 11:41:33 2018 +0200
    10.3 @@ -16,7 +16,8 @@
    10.4  
    10.5  StringlistTests::StringlistTests(string suitename, string test_home_dir) : 
    10.6      EngineTestSuite::EngineTestSuite(suitename, test_home_dir) {            
    10.7 -    TEST_ADD(StringlistTests::check_stringlists);
    10.8 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("StringlistTests::check_stringlists"),
    10.9 +                                                                      static_cast<Func>(&StringlistTests::check_stringlists)));
   10.10  }
   10.11  
   10.12  void StringlistTests::check_stringlists() {
    11.1 --- a/test/src/engine_tests/StringpairListTests.cc	Tue May 22 12:56:27 2018 +0200
    11.2 +++ b/test/src/engine_tests/StringpairListTests.cc	Wed May 23 11:41:33 2018 +0200
    11.3 @@ -17,7 +17,8 @@
    11.4  
    11.5  StringpairListTests::StringpairListTests(string suitename, string test_home_dir) : 
    11.6      EngineTestSuite::EngineTestSuite(suitename, test_home_dir) {            
    11.7 -    TEST_ADD(StringpairListTests::check_stringpair_lists);
    11.8 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("StringpairListTests::check_stringpair_lists"),
    11.9 +                                                                      static_cast<Func>(&StringpairListTests::check_stringpair_lists)));
   11.10  }
   11.11  
   11.12  bool StringpairListTests::test_stringpair_equals(stringpair_t* val1, stringpair_t* val2) {
    12.1 --- a/test/src/engine_tests/TrustManipulationTests.cc	Tue May 22 12:56:27 2018 +0200
    12.2 +++ b/test/src/engine_tests/TrustManipulationTests.cc	Wed May 23 11:41:33 2018 +0200
    12.3 @@ -19,7 +19,8 @@
    12.4  
    12.5  TrustManipulationTests::TrustManipulationTests(string suitename, string test_home_dir) : 
    12.6      EngineTestSessionSuite::EngineTestSessionSuite(suitename, test_home_dir) {            
    12.7 -    TEST_ADD(TrustManipulationTests::check_trust_manipulation);
    12.8 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("TrustManipulationTests::check_trust_manipulation"),
    12.9 +                                                                      static_cast<Func>(&TrustManipulationTests::check_trust_manipulation)));
   12.10  }
   12.11  
   12.12  void TrustManipulationTests::check_trust_manipulation() {
    13.1 --- a/test/src/engine_tests/TrustwordsTests.cc	Tue May 22 12:56:27 2018 +0200
    13.2 +++ b/test/src/engine_tests/TrustwordsTests.cc	Wed May 23 11:41:33 2018 +0200
    13.3 @@ -14,7 +14,8 @@
    13.4  
    13.5  TrustwordsTests::TrustwordsTests(string suitename, string test_home_dir) : 
    13.6      EngineTestSessionSuite::EngineTestSessionSuite(suitename, test_home_dir) {            
    13.7 -    TEST_ADD(TrustwordsTests::check_trustwords);
    13.8 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("TrustwordsTests::check_trustwords"),
    13.9 +                                                                      static_cast<Func>(&TrustwordsTests::check_trustwords)));
   13.10  }
   13.11  
   13.12  void TrustwordsTests::check_trustwords() {
    14.1 --- a/test/src/engine_tests/UserIDAliasTests.cc	Tue May 22 12:56:27 2018 +0200
    14.2 +++ b/test/src/engine_tests/UserIDAliasTests.cc	Wed May 23 11:41:33 2018 +0200
    14.3 @@ -19,7 +19,8 @@
    14.4  
    14.5  UserIDAliasTests::UserIDAliasTests(string suitename, string test_home_dir) : 
    14.6      EngineTestSessionSuite::EngineTestSessionSuite(suitename, test_home_dir) {            
    14.7 -    TEST_ADD(UserIDAliasTests::check_userid_aliases);
    14.8 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("UserIDAliasTests::check_userid_aliases"),
    14.9 +                                                                      static_cast<Func>(&UserIDAliasTests::check_userid_aliases)));
   14.10  }
   14.11  
   14.12  void UserIDAliasTests::check_userid_aliases() {