tests: Dump the tools that the tests are going to use.
[gnupg.git] / tests / openpgp / issue2417.scm
index 32840f2..f584000 100755 (executable)
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
 (load (with-path "defs.scm"))
+(setup-environment)
+
+(define keyfile (in-srcdir "samplekeys" "rsa-rsa-sample-1.asc"))
 
 (define (touch file-name)
   (close (open file-name (logior O_WRONLY O_BINARY O_CREAT) #o600)))
 
 (info "Checking robustness wrt empty databases in gnupghome (issue2417)...")
-
-(lettmp
- ;; Prepare some random key to import later.
- (keyfile)
- (pipe:do
-  (pipe:gpg '(--export alpha))
-  (pipe:write-to keyfile (logior O_WRONLY O_BINARY O_CREAT) #o600))
-
- (with-temporary-working-directory
-  (setenv "GNUPGHOME" "." #t)
-  (touch "trustdb.gpg")
-  (touch "pubring.gpg")
-  (touch "pubring.kbx")
-  (call-check `(,(tool 'GPG) --import ,keyfile))))
+(touch "trustdb.gpg")
+(touch "pubring.gpg")
+(touch "pubring.kbx")
+(call-check `(,(tool 'GPG) --import ,keyfile))