summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Garrett <lgarrett@rocketjump.eu>2023-08-19 00:45:43 +0200
committerLee Garrett <lgarrett@rocketjump.eu>2023-08-19 01:09:27 +0200
commit52a03c537f5442266ac33d4c540218bc02354f30 (patch)
tree2b77053e61cb327434e3dd77db8f51f246be12a0
parentc9ca02414bffb67dfb68d8ceb501398af8813b6a (diff)
downloaddebian-ansible-core-52a03c537f5442266ac33d4c540218bc02354f30.zip
Fix unit tests
ansible-test doesn't like being run from /usr/bin/, run the version from bin/ within the source package instead. And patch that to use python3.
-rw-r--r--debian/patches/0005-use-py3.patch8
-rwxr-xr-xdebian/tests/unit2
2 files changed, 9 insertions, 1 deletions
diff --git a/debian/patches/0005-use-py3.patch b/debian/patches/0005-use-py3.patch
index 566db4f8..873918fa 100644
--- a/debian/patches/0005-use-py3.patch
+++ b/debian/patches/0005-use-py3.patch
@@ -234,3 +234,11 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
'import sys',
'sys.stderr.write("stderr stuff")',
"print('%s')" % json.dumps(module_result)
+--- a/bin/ansible-test
++++ b/bin/ansible-test
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # PYTHON_ARGCOMPLETE_OK
+ """Command line entry point for ansible-test."""
+
diff --git a/debian/tests/unit b/debian/tests/unit
index 560446a8..9191b565 100755
--- a/debian/tests/unit
+++ b/debian/tests/unit
@@ -1,5 +1,5 @@
#!/bin/sh
-/usr/bin/ansible-test units \
+bin/ansible-test units \
--python-interpreter /usr/bin/python3 \
--local