unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob e155194cccac2c4588eedf8c7e0253ad1e3cf835 1258 bytes (raw)
name: gnu/packages/patches/rnp-fix-test-setup.patch 	 # note: path name is non-authoritative(*)

 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
 
From f544b3e63416f3a824ed2955d119ea0d36c88b36 Mon Sep 17 00:00:00 2001
From: Justus Winter <teythoon@avior.uberspace.de>
Date: Tue, 21 Jul 2020 16:00:37 +0200
Subject: [PATCH] Make test environment setup more robust.

Previously, a failing test leaving RNP or GnuPG state directories
behind would cause all tests following it to fail.  Improve this by
removing the directories first should they exist.
---
 src/tests/cli_tests.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/tests/cli_tests.py b/src/tests/cli_tests.py
index 2b7d772a..8261486f 100755
--- a/src/tests/cli_tests.py
+++ b/src/tests/cli_tests.py
@@ -704,12 +704,14 @@ def setup(loglvl):
     RNPDIR = path.join(WORKDIR, '.rnp')
     RNP = os.getenv('RNP_TESTS_RNP_PATH') or 'rnp'
     RNPK = os.getenv('RNP_TESTS_RNPKEYS_PATH') or 'rnpkeys'
+    shutil.rmtree(RNPDIR, ignore_errors=True)
     os.mkdir(RNPDIR, 0700)
 
     GPGDIR = path.join(WORKDIR, '.gpg')
     GPGHOME =  path_for_gpg(GPGDIR) if is_windows() else GPGDIR
     GPG = os.getenv('RNP_TESTS_GPG_PATH') or find_utility('gpg')
     GPGCONF = os.getenv('RNP_TESTS_GPGCONF_PATH') or find_utility('gpgconf')
+    shutil.rmtree(GPGDIR, ignore_errors=True)
     os.mkdir(GPGDIR, 0700)
 
 def data_path(subpath):
-- 
2.20.1


debug log:

solving e155194ccc ...
found e155194ccc in https://yhetil.org/guix-patches/20200723120322.8385-3-justus@sequoia-pgp.org/

applying [1/1] https://yhetil.org/guix-patches/20200723120322.8385-3-justus@sequoia-pgp.org/
diff --git a/gnu/packages/patches/rnp-fix-test-setup.patch b/gnu/packages/patches/rnp-fix-test-setup.patch
new file mode 100644
index 0000000000..e155194ccc

1:29: trailing whitespace.
 
1:36: trailing whitespace.
 
1:38: trailing whitespace.
-- 
Checking patch gnu/packages/patches/rnp-fix-test-setup.patch...
1:40: new blank line at EOF.
+
Applied patch gnu/packages/patches/rnp-fix-test-setup.patch cleanly.
warning: 4 lines add whitespace errors.

index at:
100644 e155194cccac2c4588eedf8c7e0253ad1e3cf835	gnu/packages/patches/rnp-fix-test-setup.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).