aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/tests
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python/tests')
-rw-r--r--lang/python/tests/Makefile.am7
-rwxr-xr-xlang/python/tests/final.py24
-rwxr-xr-xlang/python/tests/initial.py24
3 files changed, 51 insertions, 4 deletions
diff --git a/lang/python/tests/Makefile.am b/lang/python/tests/Makefile.am
index b51562cc..69985bb0 100644
--- a/lang/python/tests/Makefile.am
+++ b/lang/python/tests/Makefile.am
@@ -49,9 +49,8 @@ py_tests = t-wrapper.py \
t-file-name.py \
t-idiomatic.py
-TESTS = $(top_srcdir)/tests/gpg/initial.test \
- $(py_tests) \
- $(top_srcdir)/tests/gpg/final.test
+TESTS = initial.py $(py_tests) final.py
+EXTRA_DIST = support.py $(TESTS)
CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \
gpg-agent.conf pubring.kbx~ gpg.conf pubring.gpg~ \
@@ -73,7 +72,7 @@ check-local: ./gpg.conf ./gpg-agent.conf ./pubring-stamp \
# To guarantee that check-local is run before any tests we
# add this dependency:
-$(top_srcdir)/tests/gpg/initial.test: check-local
+initial.py: check-local
./private-keys-v1.d/gpg-sample.stamp: $(private_keys)
test -d ./private-keys-v1.d || mkdir ./private-keys-v1.d
diff --git a/lang/python/tests/final.py b/lang/python/tests/final.py
new file mode 100755
index 00000000..f75c2007
--- /dev/null
+++ b/lang/python/tests/final.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+
+# Copyright (C) 2016 g10 Code GmbH
+#
+# This file is part of GPGME.
+#
+# GPGME is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# GPGME is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
+# Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+import os
+import subprocess
+
+subprocess.check_call([os.path.join(os.getenv('top_srcdir'),
+ "tests", "start-stop-agent"), "--stop"])
diff --git a/lang/python/tests/initial.py b/lang/python/tests/initial.py
new file mode 100755
index 00000000..9d72cbcd
--- /dev/null
+++ b/lang/python/tests/initial.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+
+# Copyright (C) 2016 g10 Code GmbH
+#
+# This file is part of GPGME.
+#
+# GPGME is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# GPGME is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
+# Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+import os
+import subprocess
+
+subprocess.check_call([os.path.join(os.getenv('top_srcdir'),
+ "tests", "start-stop-agent"), "--start"])