1 ;; Copyright (C) 2017 g10 Code GmbH
3 ;; This file is part of GnuPG.
5 ;; GnuPG is free software; you can redistribute it and/or modify
6 ;; it under the terms of the GNU General Public License as published by
7 ;; the Free Software Foundation; either version 3 of the License, or
8 ;; (at your option) any later version.
10 ;; GnuPG is distributed in the hope that it will be useful,
11 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ;; GNU General Public License for more details.
15 ;; You should have received a copy of the GNU General Public License
16 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
19 ;; Parse the Makefile.am to find all tests.
21 (load (with-path "makefile.scm"))
23 (define (expander filename port key)
24 (parse-makefile port key))
26 (define (parse filename key)
27 (parse-makefile-expand filename expander key))
30 (make-environment-cache
33 (path-join "tests" "openpgp" "setup.scm")
34 (in-srcdir "tests" "openpgp" "setup.scm"))))
36 (define (qualify path variant)
37 (string-append "<" variant ">" path))
39 (define (setup* variant)
40 (make-environment-cache
43 (qualify (path-join "tests" "openpgp" "setup.scm") variant)
44 (in-srcdir "tests" "openpgp" "setup.scm")
45 (string-append "--" variant))))
47 (define setup-use-keyring (setup* "use-keyring"))
48 (define setup-extended-key-format (setup* "extended-key-format"))
51 (parse-makefile-expand (in-srcdir "tests" "openpgp" "Makefile.am")
52 (lambda (filename port key) (parse-makefile port key))
57 (path-join "tests" "openpgp" name)
58 (in-srcdir "tests" "openpgp" name))) all-tests)
60 (test::scm setup-use-keyring
61 (qualify (path-join "tests" "openpgp" name) "use-keyring")
62 (in-srcdir "tests" "openpgp" name)
63 "--use-keyring")) all-tests)
65 (test::scm setup-extended-key-format
66 (qualify (path-join "tests" "openpgp" name) "extended-key-format")
67 (in-srcdir "tests" "openpgp" name)
68 "--extended-key-format")) all-tests)))