summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>2024-05-24 23:44:36 +0200
committergregor herrmann <gregoa@debian.org>2024-05-24 23:44:36 +0200
commitd0bebc03916609222de8829dcb2080f8cccf3f78 (patch)
treec0f98119695f25845e95e137b45c399fded70379
parent80f1b134b896a238dac8a26454500a773aea6075 (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();