summaryrefslogtreecommitdiffstats
path: root/xlate-test.py
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2024-11-06 16:42:46 +0100
committerPhil Sutter <phil@nwl.cc>2024-11-06 17:41:55 +0100
commit79787c6eaeed3e1164d2ad87d3c82329bfbd885a (patch)
tree4ad3066f22fc80863f4db36c5d83092c51fac710 /xlate-test.py
parent55ac47847806c248fe6385f0f273e9e1017ea7ee (diff)
tests: xlate-test: Fix for 'make distcheck'
Similar problem as with the other suites: The build directory does not contain test cases, only build results. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'xlate-test.py')
-rwxr-xr-xxlate-test.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlate-test.py b/xlate-test.py
index b6a78bb2..1c8cfe71 100755
--- a/xlate-test.py
+++ b/xlate-test.py
@@ -188,8 +188,10 @@ def run_test(name, payload):
def load_test_files():
test_files = total_tests = total_passed = total_error = total_failed = 0
- tests = sorted(os.listdir("extensions"))
- for test in ['extensions/' + f for f in tests if f.endswith(".txlate")]:
+ tests_path = os.path.join(os.path.dirname(sys.argv[0]), "extensions")
+ tests = sorted(os.listdir(tests_path))
+ for test in [os.path.join(tests_path, f)
+ for f in tests if f.endswith(".txlate")]:
with open(test, "r") as payload:
tests, passed, failed, errors = run_test(test, payload)
test_files += 1