From d4ca9e4a8ac7a09ef53171693e86058f3d913d5f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 27 Jun 2018 23:11:36 +0100 Subject: No-change upload, for testing. Signed-off-by: Ian Jackson --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index e45babe..82c67d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +dgit (5.3+exp1) experimental; urgency=low + + * No-change upload, for testing. + + -- Ian Jackson Wed, 27 Jun 2018 23:11:30 +0100 + dgit (5.3) unstable; urgency=medium Bugfixes: -- cgit v1.2.3 From b0b5273947e6927b90e64e90c378865d86321753 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 28 Jun 2018 00:45:01 +0100 Subject: No-change upload, for testing. Signed-off-by: Ian Jackson --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 80fc035..0e4194e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +dgit (5.4+exp1) experimental; urgency=medium + + * No-change upload, for testing. + + -- Ian Jackson Thu, 28 Jun 2018 00:44:52 +0100 + dgit (5.4) unstable; urgency=medium Improvements: -- cgit v1.2.3 From ea47496f7dd4feac94f2a3a7f51fe1e07e012ee4 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 27 Jun 2018 23:44:15 +0100 Subject: New gnupg agent thing before (5.3) 1044.27user 126.77system 6:26.89elapsed 302%CPU (0avgtext+0avgdata 402420maxresident)k 1778718inputs+5123720outputs (2370major+57693524minor)pagefaults 0swaps after (5.3 + these changes) 1072.81user 131.38system 6:25.02elapsed 312%CPU (0avgtext+0avgdata 402448maxresident)k 1777558inputs+5124952outputs (2370major+59176578minor)pagefaults 0swaps Signed-off-by: Ian Jackson --- debian/changelog | 6 ++++++ tests/tstunt/gpg | 2 +- tests/tstunt/gpg-withagent | 51 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100755 tests/tstunt/gpg-withagent diff --git a/debian/changelog b/debian/changelog index 0e4194e..fc26e97 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +dgit (5.4+exp2) experimental; urgency=medium + + * test suite: Explicit agent starting/stopping + + -- Ian Jackson Thu, 28 Jun 2018 00:42:00 +0100 + dgit (5.4+exp1) experimental; urgency=medium * No-change upload, for testing. diff --git a/tests/tstunt/gpg b/tests/tstunt/gpg index 679a6b8..74152bd 100755 --- a/tests/tstunt/gpg +++ b/tests/tstunt/gpg @@ -3,4 +3,4 @@ set -e exec \ with-lock-ex -w "$DGIT_TEST_GNUPG_GLOBAL_LOCK" \ - $tmp "$DGIT_TEST_TROOT"/tstunt/gpg-locked "$@" + $tmp "$DGIT_TEST_TROOT"/tstunt/gpg-withagent "$@" diff --git a/tests/tstunt/gpg-withagent b/tests/tstunt/gpg-withagent new file mode 100755 index 0000000..4cb5d4e --- /dev/null +++ b/tests/tstunt/gpg-withagent @@ -0,0 +1,51 @@ +#!/bin/sh +set -ex + +retry_until_ok () { + sleeptime=0 + while ! "$@"; do + case $sleeptime in + ??.*) + echo >&2 "$0: GPG AGENT STARTP $@ TIMED OUT" + exit 127 + ;; + esac + sleep $sleeptime + sleeptime=$(echo "($sleeptime + 0.001) * 2" | bc -l) + done +} + +echo >&2 'GPG-WITHAGENT...' + +agent_is_running () { + gpg-connect-agent --no-autostart &1 \ + | grep dgit-gpg-agent-ok >&2 +} + + +$DGIT_STUNT_AGENT --daemon &2 +retry_until_ok agent_is_running + +echo >&2 'GPG-WITHAGENT... RUNNING' + +set +e +$DGIT_TEST_REAL_GPG \ + --agent-program=$DGIT_STUNT_AGENT "$@" +rc=$? +set -e + +echo >&2 'GPG-WITHAGENT... STOPPING' + +kill_agent_not_running () { + LC_MESSAGES=C gpg-connect-agent --no-autostart &1 \ + | tee -a /dev/stderr \ + | grep 'no gpg-agent running' >&2 +} + +retry_until_ok kill_agent_not_running + +echo >&2 'GPG-WITHAGENT... DONE' + +exit $rc -- cgit v1.2.3 From ef3f25de26fbca9c1018dbf2f7364ddb8ea44392 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 28 Jun 2018 16:31:55 +0100 Subject: changelog: 5.5+exp3 to placate version checking Signed-off-by: Ian Jackson --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 0f36987..3903f0c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +dgit (5.5+exp3) experimental; urgency=medium + + * Bump changelog entry date. + + -- Ian Jackson Thu, 28 Jun 2018 16:31:35 +0100 + dgit (5.5+exp2) experimental; urgency=medium * test suite: Explicit agent starting/stopping -- cgit v1.2.3 From 641b95390e9ff7fea44a0c4ec4181b10be0b78c1 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 29 Jun 2018 00:49:47 +0100 Subject: test suite: Add bc to appropriate test Depends. Signed-off-by: Ian Jackson --- debian/changelog | 6 ++++++ debian/tests/control | 22 +++++++++++----------- tests/enumerate-tests | 2 +- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3903f0c..41a6710 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +dgit (5.5+exp4) experimental; urgency=medium + + * test suite: Add bc to appropriate test Depends. + + -- Ian Jackson Fri, 29 Jun 2018 00:46:11 +0100 + dgit (5.5+exp3) experimental; urgency=medium * Bump changelog entry date. diff --git a/debian/tests/control b/debian/tests/control index 8b9d34e..48ed93f 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,24 +1,24 @@ Tests: build-modes-gbp Tests-Directory: tests/tests -Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, git-buildpackage +Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, git-buildpackage Tests: clone-reprepro downstream-gitless Tests-Directory: tests/tests -Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, reprepro +Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, reprepro Tests: dpkgsourceignores-docs Tests-Directory: tests/tests -Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin +Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc Restrictions: x-dgit-intree-only Tests: defdistro-dsd-clone-drs dsd-clone-drs Tests-Directory: tests/tests -Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin +Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc Restrictions: x-dgit-intree-only x-dgit-git-only Tests: gdr-diverge-nmu gdr-diverge-nmu-dgit gdr-edits gdr-import-dgit gdr-makepatches7 gdr-subcommands Tests-Directory: tests/tests -Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, git-debrebase, git-buildpackage, faketime +Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, git-debrebase, git-buildpackage, faketime Tests: gdr-newupstream gdr-viagit Tests-Directory: tests/tests @@ -26,7 +26,7 @@ Depends: chiark-utils-bin, git-debrebase, git-buildpackage, faketime Tests: gitattributes Tests-Directory: tests/tests -Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bsdgames, man-db, git-man +Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, bsdgames, man-db, git-man Tests: hint-testsuite-triggers Tests-Directory: tests/tests @@ -35,24 +35,24 @@ Restrictions: hint-testsuite-triggers Tests: defdistro-mirror mirror mirror-debnewgit mirror-private Tests-Directory: tests/tests -Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, rsync +Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, rsync Tests: build-modes-sbuild quilt-gbp-build-modes-sbuild Tests-Directory: tests/tests -Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, sbuild +Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, sbuild Restrictions: x-dgit-schroot-build Tests: sbuild-gitish Tests-Directory: tests/tests -Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, sbuild, man-db +Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, sbuild, man-db Restrictions: x-dgit-schroot-build Tests: spelling Tests-Directory: tests/tests -Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin +Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc Restrictions: x-dgit-git-only Tests: absurd-gitapply badcommit-rewrite build-modes build-modes-asplit build-modes-gbp-asplit clone-clogsigpipe clone-gitnosuite clone-nogit debpolicy-dbretry debpolicy-newreject debpolicy-quilt-gbp defdistro-rpush defdistro-setup distropatches-reject dpkgsourceignores-correct drs-clone-nogit drs-push-masterupdate drs-push-rejects dsd-clone-nogit dsd-divert fetch-localgitonly fetch-somegit-notlast gbp-orig gitconfig gitworktree import-dsc import-maintmangle import-native import-nonnative import-tarbomb inarchivecopy mismatches-contents mismatches-dscchanges multisuite newtag-clone-nogit oldnewtagalt oldtag-clone-nogit orig-include-exclude orig-include-exclude-chkquery overwrite-chkclog overwrite-junk overwrite-splitbrains overwrite-version protocol-compat push-buildproductsdir push-newpackage push-newrepeat push-nextdgit push-source push-source-with-changes quilt quilt-gbp quilt-gbp-build-modes quilt-singlepatch quilt-splitbrains quilt-useremail rpush tag-updates test-list-uptodate trustingpolicy-replay unrepresentable version-opt Tests-Directory: tests/tests -Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin +Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc diff --git a/tests/enumerate-tests b/tests/enumerate-tests index 0599b69..0f37c96 100755 --- a/tests/enumerate-tests +++ b/tests/enumerate-tests @@ -42,7 +42,7 @@ finish- () { test-begin-gencontrol () { restrictions='' - dependencies='dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin' + dependencies='dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc' } restriction-gencontrol () { -- cgit v1.2.3 From 7d0d834d7b41b5f3cafffc37b9a9d94966c68e0f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 29 Jun 2018 12:11:56 +0100 Subject: test suite: gpg-agent workaround: Add more debugging output. Signed-off-by: Ian Jackson --- debian/changelog | 6 ++++++ tests/tstunt/gpg-withagent | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/debian/changelog b/debian/changelog index 41a6710..7850597 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +dgit (5.5+exp5~) experimental; urgency=medium + + * test suite: gpg-agent workaround: Add more debugging output. + + -- + dgit (5.5+exp4) experimental; urgency=medium * test suite: Add bc to appropriate test Depends. diff --git a/tests/tstunt/gpg-withagent b/tests/tstunt/gpg-withagent index 4cb5d4e..d7fe793 100755 --- a/tests/tstunt/gpg-withagent +++ b/tests/tstunt/gpg-withagent @@ -1,9 +1,18 @@ #!/bin/sh set -ex +d () { + date --iso-8601=ns >&2 + ps -ef | grep gpg-agent >&2 +} + +d + retry_until_ok () { sleeptime=0 + d while ! "$@"; do + d case $sleeptime in ??.*) echo >&2 "$0: GPG AGENT STARTP $@ TIMED OUT" @@ -29,12 +38,16 @@ retry_until_ok agent_is_running echo >&2 'GPG-WITHAGENT... RUNNING' +d + set +e $DGIT_TEST_REAL_GPG \ --agent-program=$DGIT_STUNT_AGENT "$@" rc=$? set -e +d + echo >&2 'GPG-WITHAGENT... STOPPING' kill_agent_not_running () { @@ -48,4 +61,6 @@ retry_until_ok kill_agent_not_running echo >&2 'GPG-WITHAGENT... DONE' +d + exit $rc -- cgit v1.2.3 From 395e13bd154a9d00ffb25cff3f45e3afa8222d13 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 29 Jun 2018 12:13:59 +0100 Subject: test suite: gpg-agent workaround: Kill unexpected leftover agents. Signed-off-by: Ian Jackson --- debian/changelog | 1 + tests/tstunt/gpg-withagent | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7850597..bc809a7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ dgit (5.5+exp5~) experimental; urgency=medium * test suite: gpg-agent workaround: Add more debugging output. + * test suite: gpg-agent workaround: Kill unexpected leftover agents. -- diff --git a/tests/tstunt/gpg-withagent b/tests/tstunt/gpg-withagent index d7fe793..4318cce 100755 --- a/tests/tstunt/gpg-withagent +++ b/tests/tstunt/gpg-withagent @@ -24,7 +24,16 @@ retry_until_ok () { done } -echo >&2 'GPG-WITHAGENT...' +kill_agent_not_running () { + LC_MESSAGES=C gpg-connect-agent --no-autostart &1 \ + | tee -a /dev/stderr \ + | grep 'no gpg-agent running' >&2 +} + +echo >&2 'GPG-WITHAGENT... PRE-STOPPING' + +retry_until_ok kill_agent_not_running agent_is_running () { gpg-connect-agent --no-autostart &2 'GPG-WITHAGENT... STOPPING' -kill_agent_not_running () { - LC_MESSAGES=C gpg-connect-agent --no-autostart &1 \ - | tee -a /dev/stderr \ - | grep 'no gpg-agent running' >&2 -} - retry_until_ok kill_agent_not_running echo >&2 'GPG-WITHAGENT... DONE' -- cgit v1.2.3 From 96f0ac573b0c0672dbeae9ab3d3ace947c7def28 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 29 Jun 2018 12:22:36 +0100 Subject: changelog: finalise 5.5+exp5 Signed-off-by: Ian Jackson --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index bc809a7..a0fea92 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -dgit (5.5+exp5~) experimental; urgency=medium +dgit (5.5+exp5) experimental; urgency=medium * test suite: gpg-agent workaround: Add more debugging output. * test suite: gpg-agent workaround: Kill unexpected leftover agents. - -- + -- Ian Jackson Fri, 29 Jun 2018 12:22:23 +0100 dgit (5.5+exp4) experimental; urgency=medium -- cgit v1.2.3 From 3ae4d20d8146c3ea111b3f622bf00adbd4e6442f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 29 Jun 2018 13:02:36 +0100 Subject: test suite: gpg-agent workaround: Cope if ps not found. Signed-off-by: Ian Jackson --- debian/changelog | 6 ++++++ tests/tstunt/gpg-withagent | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a0fea92..8076ac0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +dgit (5.5+exp6) experimental; urgency=medium + + * test suite: gpg-agent workaround: Cope if ps not found. + + -- Ian Jackson Fri, 29 Jun 2018 13:02:30 +0100 + dgit (5.5+exp5) experimental; urgency=medium * test suite: gpg-agent workaround: Add more debugging output. diff --git a/tests/tstunt/gpg-withagent b/tests/tstunt/gpg-withagent index 4318cce..3f56d08 100755 --- a/tests/tstunt/gpg-withagent +++ b/tests/tstunt/gpg-withagent @@ -3,7 +3,7 @@ set -ex d () { date --iso-8601=ns >&2 - ps -ef | grep gpg-agent >&2 + ps -ef | grep gpg-agent ||: >&2 } d -- cgit v1.2.3 From 0a9d7c678c2ef3a3dbe40c012f3a1b86a8ca3c2a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 29 Jun 2018 17:05:06 +0100 Subject: test suite: gpg-agent workaround: Send ps output to stderr (oops) Signed-off-by: Ian Jackson --- debian/changelog | 6 ++++++ tests/tstunt/gpg-withagent | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 8076ac0..3611845 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +dgit (5.5+exp7) experimental; urgency=medium + + * test suite: gpg-agent workaround: Send ps output to stderr (oops) + + -- Ian Jackson Fri, 29 Jun 2018 17:03:09 +0100 + dgit (5.5+exp6) experimental; urgency=medium * test suite: gpg-agent workaround: Cope if ps not found. diff --git a/tests/tstunt/gpg-withagent b/tests/tstunt/gpg-withagent index 3f56d08..4b2ee1a 100755 --- a/tests/tstunt/gpg-withagent +++ b/tests/tstunt/gpg-withagent @@ -3,7 +3,7 @@ set -ex d () { date --iso-8601=ns >&2 - ps -ef | grep gpg-agent ||: >&2 + ps -ef | grep gpg-agent >&2 ||: } d -- cgit v1.2.3 From 53cdf2a1ad851c4747711877d304c647eaf83f41 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 30 Jun 2018 09:55:26 +0100 Subject: test suite: gnupg workaround: Remove a sprurious $tmp This is not set here, which is just as well because it would have been quite wrong. Signed-off-by: Ian Jackson --- tests/tstunt/gpg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tstunt/gpg b/tests/tstunt/gpg index 74152bd..79d8319 100755 --- a/tests/tstunt/gpg +++ b/tests/tstunt/gpg @@ -3,4 +3,4 @@ set -e exec \ with-lock-ex -w "$DGIT_TEST_GNUPG_GLOBAL_LOCK" \ - $tmp "$DGIT_TEST_TROOT"/tstunt/gpg-withagent "$@" + "$DGIT_TEST_TROOT"/tstunt/gpg-withagent "$@" -- cgit v1.2.3 From 38eae0db7f393311667bec9dfe0aa7a514b893bd Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 30 Jun 2018 10:20:57 +0100 Subject: test suite: Provide DGIT_TEST_BYHAND if appropriate Signed-off-by: Ian Jackson --- tests/lib | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/lib b/tests/lib index f3fb0da..bad47c9 100644 --- a/tests/lib +++ b/tests/lib @@ -41,6 +41,7 @@ export DGIT_TEST_TROOT=$troot tmp=$ADTTMP if [ x"$tmp" = x ]; then + export DGIT_TEST_BYHAND=1 mkdir -p tests/tmp tmpbase=$troot/tmp tmp=tests/tmp/$testname -- cgit v1.2.3 From 690272dfb77eefa9277970dafe4bbb47de3b35e1 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 30 Jun 2018 10:21:32 +0100 Subject: test suite: gpg agent workaround: Neaten the logging. Signed-off-by: Ian Jackson --- debian/changelog | 6 ++++++ tests/setup/gnupg | 6 ++++-- tests/tstunt/gpg | 14 ++++++++++++++ tests/tstunt/gpg-withagent | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3611845..3f363e4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +dgit (5.5+exp8) experimental; urgency=medium + + * test suite: gpg agent workaround: Neaten the logging. + + -- Ian Jackson Sat, 30 Jun 2018 10:54:48 +0100 + dgit (5.5+exp7) experimental; urgency=medium * test suite: gpg-agent workaround: Send ps output to stderr (oops) diff --git a/tests/setup/gnupg b/tests/setup/gnupg index c88d40b..7a164ef 100755 --- a/tests/setup/gnupg +++ b/tests/setup/gnupg @@ -7,10 +7,11 @@ cp $troot/gnupg/* $tmp/gnupg chmod go-rw $tmp/gnupg/* export DGIT_TEST_GNUPG_GLOBAL_LOCK=$tmp/gnupg/dgit-test-global-lock +export DGIT_TEST_GNUPG_LOG=$tmp/gnupg-workarounds.log setup=' export GNUPGHOME=$tmp/gnupg - export DGIT_TEST_GNUPG_GLOBAL_LOCK + export DGIT_TEST_GNUPG_GLOBAL_LOCK DGIT_TEST_GNUPG_LOG cat >$tmp/gnupg/gpg-agent.conf <&2 2>>"$DGIT_TEST_GNUPG_LOG" + rc=$? + if [ rc = 0 ]; then exit 0; fi + if [ "x$DGIT_TEST_BYHAND" != x ]; then + echo >&2 "BYHAND, not catting $DGIT_TEST_GNUPG_LOG" + else + echo >&2 "########################################" + echo >&2 "$DGIT_TEST_GNUPG_LOG" + cat >&2 "$DGIT_TEST_GNUPG_LOG" + echo >&2 "end of $DGIT_TEST_GNUPG_LOG" + fi + exit $rc + ' x \ "$DGIT_TEST_TROOT"/tstunt/gpg-withagent "$@" diff --git a/tests/tstunt/gpg-withagent b/tests/tstunt/gpg-withagent index 4b2ee1a..b7b8bfd 100755 --- a/tests/tstunt/gpg-withagent +++ b/tests/tstunt/gpg-withagent @@ -51,7 +51,7 @@ d set +e $DGIT_TEST_REAL_GPG \ - --agent-program=$DGIT_STUNT_AGENT "$@" + --agent-program=$DGIT_STUNT_AGENT "$@" 2>&9 rc=$? set -e -- cgit v1.2.3 From 8916ea3e2ca88820e6ad1d0c8823a37221f8ed88 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 30 Jun 2018 19:03:10 +0100 Subject: test suite: gpg agent workaround: Fix bugs in log neatening. Signed-off-by: Ian Jackson --- debian/changelog | 6 ++++++ tests/tstunt/gpg | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3f363e4..852adc7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +dgit (5.5+exp9) experimental; urgency=medium + + * test suite: gpg agent workaround: Fix bugs in log neatening. + + -- Ian Jackson Sat, 30 Jun 2018 19:03:00 +0100 + dgit (5.5+exp8) experimental; urgency=medium * test suite: gpg agent workaround: Neaten the logging. diff --git a/tests/tstunt/gpg b/tests/tstunt/gpg index 7e12846..4214b4a 100755 --- a/tests/tstunt/gpg +++ b/tests/tstunt/gpg @@ -6,14 +6,16 @@ with-lock-ex -w "$DGIT_TEST_GNUPG_GLOBAL_LOCK" \ sh -c ' "$@" 9>&2 2>>"$DGIT_TEST_GNUPG_LOG" rc=$? - if [ rc = 0 ]; then exit 0; fi + if [ $rc = 0 ]; then exit 0; fi if [ "x$DGIT_TEST_BYHAND" != x ]; then - echo >&2 "BYHAND, not catting $DGIT_TEST_GNUPG_LOG" + echo >&2 "BYHAND, not dumping $DGIT_TEST_GNUPG_LOG" else echo >&2 "########################################" echo >&2 "$DGIT_TEST_GNUPG_LOG" - cat >&2 "$DGIT_TEST_GNUPG_LOG" + sed '\''s/^/\[gnupg-workarounds] /'\'' >&2 \ + "$DGIT_TEST_GNUPG_LOG" echo >&2 "end of $DGIT_TEST_GNUPG_LOG" + echo >&2 "########################################" fi exit $rc ' x \ -- cgit v1.2.3