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 53c4eb04200004981ddfc86ddeb1160cdb3517f3..30c0bf3f4cc1f18397d40c6a45677188eaf29f28 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 d23ecfa34147f5fb441419b680cc8069a25fd34c..6100bf575fe7e8bfaf2d1b3d3a892d32544cd6c5 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                            \
+       "$@"