tests: Makefile portability.
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 15 Feb 2018 02:14:49 +0000 (11:14 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Thu, 15 Feb 2018 02:14:49 +0000 (11:14 +0900)
* tests/gpg/Makefile.am: Don't use "export" directive.
* tests/gpgsm/Makefile.am: Ditto.
* lang/qt/tests/Makefile.am: Ditto.
* lang/python/tests/Makefile.am: Ditto.

--

GnuPG-bug-id: 3056
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
lang/python/tests/Makefile.am
lang/qt/tests/Makefile.am
tests/gpg/Makefile.am
tests/gpgsm/Makefile.am

index 6224e5a..3864f8b 100644 (file)
@@ -18,8 +18,6 @@
 
 GPG = gpg
 GPG_AGENT = gpg-agent
-export GNUPGHOME := $(abs_builddir)
-export GPG_AGENT_INFO :=
 
 test_srcdir = $(top_srcdir)/tests/gpg
 
@@ -89,7 +87,7 @@ private_keys = \
         $(test_srcdir)/7A030357C0F253A5BBCD282FFC4E521B37558F5C
 
 clean-local:
-       -$(top_srcdir)/tests/start-stop-agent --stop
+       -$(TESTS_ENVIRONMENT) $(top_srcdir)/tests/start-stop-agent --stop
        -rm -fR -- private-keys-v1.d openpgp-revocs.d S.gpg-agent sshcontrol
 
 
@@ -97,7 +95,7 @@ BUILT_SOURCES = gpg.conf gpg-agent.conf pubring-stamp \
            gpg-sample.stamp
 
 gpg-sample.stamp: $(private_keys)
-       -gpgconf --kill all
+       -$(TESTS_ENVIRONMENT) gpgconf --kill all
        $(MKDIR_P) ./private-keys-v1.d
        for k in $(private_keys); do \
           cp $$k private-keys-v1.d/$${k#$(test_srcdir)/}.key; \
@@ -105,9 +103,9 @@ gpg-sample.stamp: $(private_keys)
        echo x > ./gpg-sample.stamp
 
 pubring-stamp: $(test_srcdir)/pubdemo.asc gpg-sample.stamp
-       $(GPG) --batch --no-permission-warning \
+       $(TESTS_ENVIRONMENT) $(GPG) --batch --no-permission-warning \
                --import $(test_srcdir)/pubdemo.asc
-       -$(GPG) --batch --no-permission-warning \
+       -$(TESTS_ENVIRONMENT) $(GPG) --batch --no-permission-warning \
                --import $(test_srcdir)/secdemo.asc
        echo x > ./pubring-stamp
 
index a662b4c..104672e 100644 (file)
@@ -70,21 +70,19 @@ CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \
        gpg.conf tofu.db
 
 clean-local:
-       -$(top_srcdir)/tests/start-stop-agent --stop
+       -$(TESTS_ENVIRONMENT) $(top_srcdir)/tests/start-stop-agent --stop
        -rm -fR  private-keys-v1.d crls.d
 
-export GNUPGHOME := $(abs_builddir)
-
 pubring-stamp: $(top_srcdir)/tests/gpg/pubdemo.asc \
                     $(top_srcdir)/tests/gpg/secdemo.asc
-       -gpgconf --kill all
+       -$(TESTS_ENVIRONMENT) gpgconf --kill all
        echo "ignore-invalid-option allow-loopback-pinentry" > $(abs_builddir)/gpg-agent.conf
        echo "allow-loopback-pinentry" >> gpg-agent.conf
        echo "ignore-invalid-option pinentry-mode" > gpg.conf
        echo "pinentry-mode loopback" >> gpg.conf
-       $(GPG) --no-permission-warning \
+       $(TESTS_ENVIRONMENT) $(GPG) --no-permission-warning \
            --import $(top_srcdir)/tests/gpg/pubdemo.asc
-       $(GPG) --no-permission-warning \
+       $(TESTS_ENVIRONMENT) $(GPG) --no-permission-warning \
                   --passphrase "abc" \
            --import $(top_srcdir)/tests/gpg/secdemo.asc
        touch pubring-stamp
index 034bb5e..1d73d02 100644 (file)
@@ -81,15 +81,11 @@ noinst_PROGRAMS = $(c_tests) $(tests_skipped)
 
 
 clean-local:
-       -$(top_srcdir)/tests/start-stop-agent --stop
+       -$(TESTS_ENVIRONMENT) $(top_srcdir)/tests/start-stop-agent --stop
        -rm -fR private-keys-v1.d
 
-export GNUPGHOME := $(abs_builddir)
-
-export GPG_AGENT_INFO :=
-
 gpg-sample.stamp: $(srcdir)/$(private_keys)
-       -gpgconf --kill all
+       -$(TESTS_ENVIRONMENT) gpgconf --kill all
        $(MKDIR_P) ./private-keys-v1.d
        for k in $(private_keys); do \
           cp $(srcdir)/$$k private-keys-v1.d/$$k.key; \
index 3b8eb72..d2acd05 100644 (file)
@@ -49,18 +49,14 @@ CLEANFILES = pubring-stamp pubring.kbx pubring.kbx~ gpgsm.conf trustlist.txt \
        random_seed S.gpg-agent gpg-sample.stamp
 
 clean-local:
-       -$(top_srcdir)/tests/start-stop-agent --stop
+       -$(TESTS_ENVIRONMENT) $(top_srcdir)/tests/start-stop-agent --stop
        -rm -fR private-keys-v1.d
 
-export GNUPGHOME := $(abs_builddir)
-
-export GPG_AGENT_INFO :=
-
 BUILT_SOURCES = gpgsm.conf trustlist.txt pubring-stamp \
            gpg-sample.stamp
 
 pubring-stamp: $(srcdir)/cert_g10code_test1.der gpg-sample.stamp
-       $(GPGSM) --import $(srcdir)/cert_g10code_test1.der
+       $(TESTS_ENVIRONMENT) $(GPGSM) --import $(srcdir)/cert_g10code_test1.der
        touch pubring-stamp
 
 gpgsm.conf:
@@ -69,7 +65,7 @@ gpgsm.conf:
        echo "agent-program `which $(GPG_AGENT)`|--debug-quick-random" >> ./gpgsm.conf
 
 gpg-sample.stamp: $(srcdir)/$(key_id)
-       -gpgconf --kill all
+       -$(TESTS_ENVIRONMENT) gpgconf --kill all
        $(MKDIR_P) ./private-keys-v1.d
        cp $(srcdir)/$(key_id) private-keys-v1.d/$(key_id).key
        echo x > ./gpg-sample.stamp