diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-12-18 17:42:17 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-12-21 19:36:10 +0100 |
commit | 4ce2f35248123ff2366c8c365ad6a94945578d66 (patch) | |
tree | cc4e9b7f9541137a78d1da52bb84a121ea69dc96 /test/integration/run-tests | |
parent | 016b0e9f310e88ac843d5a5f453a147b04314db1 (diff) |
tests: cache the apt-key homedir used for Release signing
Importing a new secret key into gpg(2) can be increadibly slow which
prolongs the test runs significantly – by caching the homedir we gain a
significant speedbonus as reimporting already present keys seems like a
far less costly operation.
Git-Dch: Ignore
Diffstat (limited to 'test/integration/run-tests')
-rwxr-xr-x | test/integration/run-tests | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/integration/run-tests b/test/integration/run-tests index 7c0b74ce2..3dcacc7bd 100755 --- a/test/integration/run-tests +++ b/test/integration/run-tests @@ -107,6 +107,16 @@ if [ -n "$APT_TEST_JOBS" ]; then fi exec $parallel -j "$APT_TEST_JOBS" "./$(basename "$0")" -- $(echo "$TESTLIST") fi + +APT_TEST_SIGNINGHOME="$(mktemp --directory --tmpdir 'apt-key-signinghome.XXXXXXXXXX')" +removesigninghome() { + if [ -z "$APT_TEST_SIGNINGHOME" ]; then return; fi + GNUPGHOME="${APT_TEST_SIGNINGHOME}" gpgconf --kill gpg-agent >/dev/null 2>&1 || true + rm -rf -- "$APT_TEST_SIGNINGHOME" +} +trap "removesigninghome; exit 0" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM +export APT_TEST_SIGNINGHOME + TOTAL="$(echo "$TESTLIST" | wc -l)" if [ "$MSGLEVEL" -le 1 ]; then printf "${CTEST}Running testcases${CRESET}: " |