merge sync
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Mon, 28 Jan 2019 14:05:43 +0100
branchsync
changeset 32477019b507538c
parent 3243 09257addf431
parent 3245 4ef46e3bb562
child 3248 2918ebb00283
child 3249 03119f76ea35
merge
test/src/SuiteMaker.cc
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/RUN_ONCE_AS_SUDO_FOR_TESTS.sh	Mon Jan 28 14:05:43 2019 +0100
     1.3 @@ -0,0 +1,8 @@
     1.4 +#!/bin/bash
     1.5 +if [[ $EUID > 0 ]]
     1.6 +  then echo "This script must be run with sudo."
     1.7 +  exit
     1.8 +fi
     1.9 +
    1.10 +mkdir -p /run/user/$(id -u $SUDO_USER)
    1.11 +chown $SUDO_USER /run/user/$(id -u $SUDO_USER)
     2.1 --- a/test/src/EngineTestSuite.cc	Mon Jan 28 12:21:06 2019 +0100
     2.2 +++ b/test/src/EngineTestSuite.cc	Mon Jan 28 14:05:43 2019 +0100
     2.3 @@ -216,7 +216,12 @@
     2.4      
     2.5  //    cout << "calling init()\n";
     2.6      PEP_STATUS status = init(&session, cached_messageToSend, cached_inject_sync_event);
     2.7 +#ifndef USE_NETPGP            
     2.8 +    success = system("gpgconf --create-socketdir");
     2.9 +    if (success != 0)
    2.10 +        throw std::runtime_error("RESTORE: Error when executing 'gpgconf --create-socketdir'.");        
    2.11      system("gpg-connect-agent /bye");   // Just in case - otherwise, we die on MacOS sometimes. Is this enough??
    2.12 +#endif
    2.13  
    2.14      assert(status == PEP_STATUS_OK);
    2.15      assert(session);
    2.16 @@ -234,6 +239,9 @@
    2.17      success = system("gpgconf --kill all");
    2.18      if (success != 0)
    2.19          throw std::runtime_error("RESTORE: Error when executing 'gpgconf --kill all'.");
    2.20 +    success = system("gpgconf --remove-socketdir");            
    2.21 +    if (success != 0)
    2.22 +        throw std::runtime_error("RESTORE: Error when executing 'gpgconf --remove-socketdir'.");    
    2.23  #endif
    2.24  
    2.25      success = setenv("GNUPGHOME", prev_pgp_home.c_str(), 1);