diff options
author | Justus Winter <justus@g10code.com> | 2017-03-22 12:40:42 +0100 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2017-04-24 14:14:05 +0200 |
commit | ed4d23d75e8ba89e998b88a4f862661c81f665a3 (patch) | |
tree | 7e956da634802ab2d802f5e5d9e208932d606926 /tests/gpgme | |
parent | gpgscm: Move 'trace' and 'stringify'. (diff) | |
download | gnupg2-ed4d23d75e8ba89e998b88a4f862661c81f665a3.tar.xz gnupg2-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 <justus@g10code.com>
Diffstat (limited to 'tests/gpgme')
-rw-r--r-- | tests/gpgme/Makefile.am | 4 | ||||
-rw-r--r-- | tests/gpgme/gpgme-defs.scm | 2 | ||||
-rw-r--r-- | tests/gpgme/run-tests.scm | 21 | ||||
-rw-r--r-- | tests/gpgme/setup.scm | 2 | ||||
-rw-r--r-- | tests/gpgme/wrap.scm | 3 |
5 files changed, 21 insertions, 11 deletions
diff --git a/tests/gpgme/Makefile.am b/tests/gpgme/Makefile.am index 0d0edc03c..daf757283 100644 --- a/tests/gpgme/Makefile.am +++ b/tests/gpgme/Makefile.am @@ -31,9 +31,9 @@ AM_CFLAGS = TESTS_ENVIRONMENT = 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/openpgp:$(abs_top_srcdir)/tests/gpgme + GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm # XXX: Currently, one cannot override automake's 'check' target. As a # workaround, we avoid defining 'TESTS', thus automake will not emit diff --git a/tests/gpgme/gpgme-defs.scm b/tests/gpgme/gpgme-defs.scm index 486d1a1de..1e215b1e3 100644 --- a/tests/gpgme/gpgme-defs.scm +++ b/tests/gpgme/gpgme-defs.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 "defs.scm")) +(load (in-srcdir "tests" "openpgp" "defs.scm")) (define gpgme-srcdir (getenv "XTEST_GPGME_SRCDIR")) (when (string=? "" gpgme-srcdir) diff --git a/tests/gpgme/run-tests.scm b/tests/gpgme/run-tests.scm index be70f178d..df5f5482b 100644 --- a/tests/gpgme/run-tests.scm +++ b/tests/gpgme/run-tests.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 "gpgme-defs.scm")) +(load (in-srcdir "tests" "gpgme" "gpgme-defs.scm")) (info "Running GPGME's test suite...") @@ -40,11 +40,17 @@ run-tests-parallel run-tests-sequential)) (setup-c (make-environment-cache - (test::scm #f "setup.scm (tests/gpg)" (in-srcdir "setup.scm") - "--" "tests" "gpg"))) + (test::scm + #f + (path-join "tests" "gpgme" "setup.scm" "tests" "gpg") + (in-srcdir "tests" "gpgme" "setup.scm") + "--" "tests" "gpg"))) (setup-py (make-environment-cache - (test::scm #f "setup.scm (lang/python/tests)" (in-srcdir "setup.scm") - "--" "lang" "python" "tests"))) + (test::scm + #f + (path-join "tests" "gpgme" "setup.scm" "lang" "python" "tests") + (in-srcdir "tests" "gpgme" "setup.scm") + "--" "lang" "python" "tests"))) (tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*))) (runner (apply @@ -66,7 +72,10 @@ (map (lambda (name) (apply test::scm `(,(:setup cmpnts) - ,name ,(in-srcdir "wrap.scm") --executable + ,(apply path-join + `("tests" "gpgme" ,@(:path cmpnts) ,name)) + ,(in-srcdir "tests" "gpgme" "wrap.scm") + --executable ,(find-test name) -- ,@(:path cmpnts)))) (if (null? tests) (all-tests makefile (:key cmpnts)) tests)))) diff --git a/tests/gpgme/setup.scm b/tests/gpgme/setup.scm index 0116a7424..d1173d853 100644 --- a/tests/gpgme/setup.scm +++ b/tests/gpgme/setup.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 "gpgme-defs.scm")) +(load (in-srcdir "tests" "gpgme" "gpgme-defs.scm")) (define tarball (flag "--create-tarball" *args*)) (unless (and tarball (not (null? tarball))) diff --git a/tests/gpgme/wrap.scm b/tests/gpgme/wrap.scm index eb416f499..9a20d5003 100644 --- a/tests/gpgme/wrap.scm +++ b/tests/gpgme/wrap.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 "gpgme-defs.scm")) +(load (in-srcdir "tests" "gpgme" "gpgme-defs.scm")) (define executable (flag "--executable" *args*)) (unless (and executable (not (null? executable))) @@ -28,6 +28,7 @@ (setenv "abs_builddir" (getcwd) #t) (setenv "top_srcdir" gpgme-srcdir #t) (setenv "srcdir" (path-join gpgme-srcdir "tests" "gpg") #t) +(setenv "abs_top_srcdir" (path-join gpgme-srcdir "tests" "gpg") #t) (define (run what) (if (string-suffix? (car what) ".py") |