summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>2022-10-13 22:45:17 +0200
committerJelmer Vernooij <jelmer@debian.org>2022-10-13 22:45:17 +0200
commit38097ae309a1bec01babad70b854b296b9882948 (patch)
treeab3edadae28e19c1b2b7eac6df3d18d7a97c90fa
parent51fb9382393ab11d3a860528afd696ee4d10fa22 (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.t4
-rw-r--r--t/bin/gnupg3
-rw-r--r--t/bin/gpg3
-rw-r--r--t/bin/gpg13
-rw-r--r--t/update_version.t4
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();