summaryrefslogtreecommitdiff
path: root/debian/patches/test-dummy-binaries
blob: 9010cf0925f3cc9a35b2072c7e6d54f70a51c16c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Description: 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

---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/t/Interface.t
+++ b/t/Interface.t
@@ -8,6 +8,10 @@
 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';
--- /dev/null
+++ b/t/bin/gnupg
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo "gpg (GnuPG) 2.2.20"
--- /dev/null
+++ b/t/bin/gpg
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo "gpg (GnuPG) 2.2.20"
--- /dev/null
+++ b/t/bin/gpg1
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo "gpg (GnuPG) 1.4.23"
--- a/t/update_version.t
+++ b/t/update_version.t
@@ -14,6 +14,10 @@
 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();