From 52a03c537f5442266ac33d4c540218bc02354f30 Mon Sep 17 00:00:00 2001 From: Lee Garrett Date: Sat, 19 Aug 2023 00:45:43 +0200 Subject: 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. --- debian/patches/0005-use-py3.patch | 8 ++++++++ debian/tests/unit | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3