diff options
author | Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org> | 2023-12-15 22:14:01 +0100 |
---|---|---|
committer | gregor herrmann <gregoa@debian.org> | 2023-12-15 22:14:01 +0100 |
commit | 109762e71ee1c26b51e95e639eeb9fb54c4d69ae (patch) | |
tree | 73a0d4a00f55b61dd1c30b7b2f9dc87ee88a79a8 | |
parent | a30fa6734d83483431539cb5362d0ee0f1a0ff57 (diff) |
Ensure that we have some dummy "binaries" around for testing.
The test scripts require that gpg1, gpg and gnupg all exist and are
executable, otherwise warnings will be thrown.
This patch provides those "binaries", but they actually only print the
a version number that matches the binary.
It is still necessary to have at least one real GnuPG binary installed
for the test suite to pass. For Debian, but gpg and gpg1 need to be
present.
The patch to t/update_version.t isn't required on Debian, but is included
as this patch set has been forwarded upstream, and may be required
elsewhere. This is also why dummy scripts for gpg, gpg1 and gnupg are
provided.
Author: Andrew Ruthven
Bug: https://rt.cpan.org/Ticket/Display.html?id=133039
Last-Update: 2020-07-23
Gbp-Pq: Name test-dummy-binaries
-rw-r--r-- | t/Interface.t | 4 | ||||
-rw-r--r-- | t/bin/gnupg | 3 | ||||
-rw-r--r-- | t/bin/gpg | 3 | ||||
-rw-r--r-- | t/bin/gpg1 | 3 | ||||
-rw-r--r-- | t/update_version.t | 4 |
5 files changed, 17 insertions, 0 deletions
diff --git a/t/Interface.t b/t/Interface.t index 3ebdb7f..556b837 100644 --- a/t/Interface.t +++ b/t/Interface.t @@ -8,6 +8,10 @@ use strict; use lib './t'; use MyTest; +# Make sure that there are some dummy scripts available so no warnings +# are thrown. +$ENV{PATH} .= ":t/bin"; + use GnuPG::Interface; my $v1 = './test/fake-gpg-v1'; diff --git a/t/bin/gnupg b/t/bin/gnupg new file mode 100644 index 0000000..2de67f5 --- /dev/null +++ b/t/bin/gnupg @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "gpg (GnuPG) 2.2.20" diff --git a/t/bin/gpg b/t/bin/gpg new file mode 100644 index 0000000..2de67f5 --- /dev/null +++ b/t/bin/gpg @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "gpg (GnuPG) 2.2.20" diff --git a/t/bin/gpg1 b/t/bin/gpg1 new file mode 100644 index 0000000..1bdd7c7 --- /dev/null +++ b/t/bin/gpg1 @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "gpg (GnuPG) 1.4.23" diff --git a/t/update_version.t b/t/update_version.t index 1a27e9b..9daee19 100644 --- a/t/update_version.t +++ b/t/update_version.t @@ -14,6 +14,10 @@ use strict; use lib './t'; use MyTest; +# Make sure that there are some dummy scripts available so no warnings +# are thrown. +$ENV{PATH} .= ":t/bin"; + use GnuPG::Interface; my $gnupg = GnuPG::Interface->new(); |