From 14262b158d77c22a56be9f8b4c00f84809d6fda1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 16 Aug 2022 09:49:20 +0530 Subject: [PATCH] Log which go exe is being used to run the tests --- kitty_tests/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kitty_tests/main.py b/kitty_tests/main.py index a8f4870ca..178efd33a 100644 --- a/kitty_tests/main.py +++ b/kitty_tests/main.py @@ -113,7 +113,7 @@ def create_go_filter(packages: List[str], *names: str) -> str: if not go: return '' all_tests = set() - for line in subprocess.check_output('go test -list .'.split() + packages).decode().splitlines(): + for line in subprocess.check_output(f'{go} test -list .'.split() + packages).decode().splitlines(): if line.startswith('Test'): all_tests.add(line[4:]) tests = set(names) & all_tests @@ -128,11 +128,11 @@ def run_go(packages: List[str], names: str) -> None: if not packages: print('Skipping Go tests as go source files not availabe', file=sys.stderr) return - cmd = 'go test -v'.split() + cmd = [go, 'test', '-v'] if names: cmd.extend(('-run', names)) cmd += packages - print(shlex.join(cmd)) + print(shlex.join(cmd), flush=True) os.execl(go, *cmd)