diff options
author | Will Thompson <will@willthompson.co.uk> | 2018-09-19 10:42:23 +0100 |
---|---|---|
committer | Will Thompson <will@willthompson.co.uk> | 2018-09-19 11:07:23 +0100 |
commit | 520a529f3b4277127843454c6d5ec40cceb2755d (patch) | |
tree | 6151afca1842c1a33bbfca22fc96a710f8fa2b61 | |
parent | 12b8b9970e478ae6abb0fa33ebadacfbc9991b23 (diff) | |
download | d-feet-520a529f3b4277127843454c6d5ec40cceb2755d.tar.gz |
Run tests with same Python version as application
Since c28acbf326bb79543b285f371bdf068d8831d9a7 the application has used
the Python version detected at configure time, but tests were still
unconditionally run with the system version of Python 2. This made it
impossible to run the tests on systems with only Python 3.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | src/tests/Makefile.am | 6 | ||||
-rwxr-xr-x | src/tests/tests.py.in (renamed from src/tests/tests.py) | 3 |
3 files changed, 8 insertions, 2 deletions
@@ -49,4 +49,5 @@ po/stamp-it po/*.gmo py-compile src/d-feet +src/tests/tests.py test-driver diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index d8c2f03..14761b2 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -2,8 +2,12 @@ TESTS = tests.py check_SCRIPTS = tests.py -EXTRA_DIST = tests.py +EXTRA_DIST = tests.py.in +CLEANFILES = $(check_SCRIPTS) +tests.py: tests.py.in + $(AM_V_GEN) sed -e 's|@PYTHON[@]|$(PYTHON)|g' $< > $@ + chmod +x $@ # Default pep8.py --exclude + emacs backup files PEP8_EXCLUDES=--exclude='.svn,CVS,.bzr,.hg,.git,__pycache__,.\#*' diff --git a/src/tests/tests.py b/src/tests/tests.py.in index 31a7292..152bef3 100755 --- a/src/tests/tests.py +++ b/src/tests/tests.py.in @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!@PYTHON@ +# -*- coding: utf-8 -*- import sys import os sys.path.insert(0, os.path.abspath(os.path.join(__file__, "../../"))) |