chiark / gitweb /
Arrange to pass --debug-quick-random to gpg-agent.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Jan 2017 21:04:31 +0000 (21:04 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Jan 2017 21:04:31 +0000 (21:04 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
tests/setup/gnupg
tests/tstunt/gpg [new file with mode: 0755]
tests/tstunt/gpg-agent [new file with mode: 0755]

index 53c4eb0..30c0bf3 100644 (file)
@@ -3,6 +3,7 @@ dgit (2.17~) unstable; urgency=medium
   Test suite:
   * Internal improvements.
   * badcommit-rewrite: Fix operation using installed version of fixup.
+  * Arrange to pass --debug-quick-random to gpg-agent.
 
  --
 
index d23ecfa..6100bf5 100755 (executable)
@@ -8,8 +8,22 @@ chmod go-rw $tmp/gnupg/*
 
 export GNUPGHOME=$tmp/gnupg
 
+cat >$tmp/gnupg/gpg-agent.conf <<END
+log-file $tmp/gnupg/AGENT.log
+END
+#debug-all
+
+setup='
+       export DGIT_TEST_REAL_GPG_AGENT=$(type -p gpg-agent)
+       export DGIT_STUNT_AGENT=$troot/tstunt/gpg-agent
+       export GNUPGHOME
+       t-tstunt gpg
+'
+
+eval "$setup"
+
 gpg --list-secret
 
-t-setup-done 'GNUPGHOME' 'gnupg'
+t-setup-done 'GNUPGHOME' 'gnupg' "$setup"
 
 t-ok
diff --git a/tests/tstunt/gpg b/tests/tstunt/gpg
new file mode 100755 (executable)
index 0000000..d71aa63
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+exec                                                   \
+$DGIT_TEST_REAL_GPG                                    \
+       --agent-program=$DGIT_STUNT_AGENT               \
+       "$@"
diff --git a/tests/tstunt/gpg-agent b/tests/tstunt/gpg-agent
new file mode 100755 (executable)
index 0000000..96ae839
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+exec                                                   \
+$DGIT_TEST_REAL_GPG_AGENT                              \
+       --debug-quick-random                            \
+       "$@"