diff options
author | Justus Winter <[email protected]> | 2017-03-22 11:40:42 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2017-04-24 12:14:05 +0000 |
commit | ed4d23d75e8ba89e998b88a4f862661c81f665a3 (patch) | |
tree | 7e956da634802ab2d802f5e5d9e208932d606926 /tests/migrations | |
parent | gpgscm: Move 'trace' and 'stringify'. (diff) | |
download | gnupg-ed4d23d75e8ba89e998b88a4f862661c81f665a3.tar.gz gnupg-ed4d23d75e8ba89e998b88a4f862661c81f665a3.zip |
tests: Locate resources and scripts relative to top source dir.
--
Locate every resource and every script used in the tests using a path
relative to the top of the source tree.
This is a purely mechanical change, mostly done using regular
expressions, with a few manual fixups here and there.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'tests/migrations')
-rw-r--r-- | tests/migrations/Makefile.am | 6 | ||||
-rw-r--r-- | tests/migrations/common.scm | 2 | ||||
-rwxr-xr-x | tests/migrations/extended-pkf.scm | 4 | ||||
-rwxr-xr-x | tests/migrations/from-classic.scm | 8 | ||||
-rwxr-xr-x | tests/migrations/issue2276.scm | 4 | ||||
-rw-r--r-- | tests/migrations/run-tests.scm | 5 |
6 files changed, 16 insertions, 13 deletions
diff --git a/tests/migrations/Makefile.am b/tests/migrations/Makefile.am index 0895aff04..e548723a7 100644 --- a/tests/migrations/Makefile.am +++ b/tests/migrations/Makefile.am @@ -31,9 +31,9 @@ AM_CFLAGS = TESTS_ENVIRONMENT = GPG_AGENT_INFO= LC_ALL=C \ EXEEXT=$(EXEEXT) \ PATH=../gpgscm:$(PATH) \ - srcdir=$(abs_srcdir) \ + abs_top_srcdir=$(abs_top_srcdir) \ objdir=$(abs_top_builddir) \ - GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm:$(abs_top_srcdir)/tests/migrations + GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm XTESTS = from-classic.scm \ extended-pkf.scm \ @@ -54,7 +54,7 @@ check: xcheck .PHONY: xcheck xcheck: $(TESTS_ENVIRONMENT) $(abs_top_builddir)/tests/gpgscm/gpgscm \ - run-tests.scm $(TESTFLAGS) $(XTESTS) + $(abs_srcdir)/run-tests.scm $(TESTFLAGS) $(XTESTS) EXTRA_DIST = common.scm run-tests.scm setup.scm $(XTESTS) $(TEST_FILES) diff --git a/tests/migrations/common.scm b/tests/migrations/common.scm index cba659024..54d33b987 100644 --- a/tests/migrations/common.scm +++ b/tests/migrations/common.scm @@ -15,7 +15,7 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, see <http://www.gnu.org/licenses/>. -(if (string=? "" (getenv "srcdir")) +(if (string=? "" (getenv "abs_top_srcdir")) (error "not called from make")) (let ((verbose (string->number (getenv "verbose")))) diff --git a/tests/migrations/extended-pkf.scm b/tests/migrations/extended-pkf.scm index 1317cd4f8..cc1a074db 100755 --- a/tests/migrations/extended-pkf.scm +++ b/tests/migrations/extended-pkf.scm @@ -17,7 +17,7 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, see <http://www.gnu.org/licenses/>. -(load (with-path "common.scm")) +(load (in-srcdir "tests" "migrations" "common.scm")) (catch (skip "gpgtar not built") (call-check `(,GPGTAR --help))) @@ -31,7 +31,7 @@ (run-test "Testing the extended private key format ..." - (in-srcdir "extended-pkf.tar.asc") + (in-srcdir "tests" "migrations" "extended-pkf.tar.asc") (lambda (gpghome) (assert-keys-usable))) diff --git a/tests/migrations/from-classic.scm b/tests/migrations/from-classic.scm index ace458e22..b473d702a 100755 --- a/tests/migrations/from-classic.scm +++ b/tests/migrations/from-classic.scm @@ -17,7 +17,7 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, see <http://www.gnu.org/licenses/>. -(load (with-path "common.scm")) +(load (in-srcdir "tests" "migrations" "common.scm")) (catch (skip "gpgtar not built") (call-check `(,GPGTAR --help))) @@ -37,14 +37,14 @@ (run-test "Testing a clean migration ..." - (in-srcdir "from-classic.tar.asc") + (in-srcdir "tests" "migrations" "from-classic.tar.asc") (lambda (gpghome) (trigger-migration) (assert-migrated))) (run-test "Testing a migration with existing private-keys-v1.d ..." - (in-srcdir "from-classic.tar.asc") + (in-srcdir "tests" "migrations" "from-classic.tar.asc") (lambda (gpghome) (mkdir "private-keys-v1.d" "-rwx") (trigger-migration) @@ -52,7 +52,7 @@ (run-test "Testing a migration with existing but weird private-keys-v1.d ..." - (in-srcdir "from-classic.tar.asc") + (in-srcdir "tests" "migrations" "from-classic.tar.asc") (lambda (gpghome) (mkdir "private-keys-v1.d" "") (trigger-migration) diff --git a/tests/migrations/issue2276.scm b/tests/migrations/issue2276.scm index 9a0c160d4..8ea3f430e 100755 --- a/tests/migrations/issue2276.scm +++ b/tests/migrations/issue2276.scm @@ -17,12 +17,12 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, see <http://www.gnu.org/licenses/>. -(load (with-path "common.scm")) +(load (in-srcdir "tests" "migrations" "common.scm")) (run-test "Checking migration with legacy key (issue2276)..." ;; This tarball contains a keyring with a legacy key. - (in-srcdir "issue2276.tar.asc") + (in-srcdir "tests" "migrations" "issue2276.tar.asc") (lambda (gpghome) ;; GnuPG up to 2.1.14 failed to skip the legacy key when updating ;; the trust database and thereby rebuilding the keyring cache. diff --git a/tests/migrations/run-tests.scm b/tests/migrations/run-tests.scm index b4ad260bb..1e4bb704b 100644 --- a/tests/migrations/run-tests.scm +++ b/tests/migrations/run-tests.scm @@ -22,4 +22,7 @@ (> (length tests) 1)) run-tests-parallel run-tests-sequential))) - (runner (map (lambda (t) (test::scm #f t t)) tests))) + (runner (map (lambda (name) + (test::scm #f + (path-join "tests" "migrations" name) + (in-srcdir "tests" "migrations" name))) tests))) |