summaryrefslogtreecommitdiff
path: root/test/integration/run-tests
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-12-18 17:42:17 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-12-21 19:36:10 +0100
commit4ce2f35248123ff2366c8c365ad6a94945578d66 (patch)
treecc4e9b7f9541137a78d1da52bb84a121ea69dc96 /test/integration/run-tests
parent016b0e9f310e88ac843d5a5f453a147b04314db1 (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-xtest/integration/run-tests10
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}: "