c9d5e18 Work around gpg-agent issues in the test suite

Authored and Committed by tmz 5 years ago
1 file changed. 12 lines added. 0 lines removed.
    Work around gpg-agent issues in the test suite
    
    GnuPG2 requires gpg-agent and tries to start it on demand.  The agent
    uses a socket for communication and the path to this socket must be
    shorter than sun_path [108 characters, per unix(7)].
    
    Adjust the location of the temporary directories used by the test suite
    by passing the --root option via GIT_TEST_OPTS.
    
    One potential downside to this is that we use mktemp to create the
    directory and this will differ between builds.  If/when we want to make
    our builds entirely reproducible we will need to revisit this.  With
    luck, gnupg will be better behaved by that time¹.
    
    An alternate solution I tested was to rename the two problematic tests
    (t5573 and t7612).  This is a brittle solution as new tests may be added
    which cause the same path length issue for gpg-agent.
    
    Also drop the redundant killing of gpg-agent.  This doesn't break
    anything but it can only slow the test suite (however slightly).
    
    ¹ A ticket was filed to improve gpg-agent's handling of long paths in
      GNUPGHOME (but it's nearly 2 years old): https://dev.gnupg.org/T2964.
    
        
file modified
+12 -0