Log which go exe is being used to run the tests
This commit is contained in:
parent
2fd013b593
commit
14262b158d
@ -113,7 +113,7 @@ def create_go_filter(packages: List[str], *names: str) -> str:
|
|||||||
if not go:
|
if not go:
|
||||||
return ''
|
return ''
|
||||||
all_tests = set()
|
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'):
|
if line.startswith('Test'):
|
||||||
all_tests.add(line[4:])
|
all_tests.add(line[4:])
|
||||||
tests = set(names) & all_tests
|
tests = set(names) & all_tests
|
||||||
@ -128,11 +128,11 @@ def run_go(packages: List[str], names: str) -> None:
|
|||||||
if not packages:
|
if not packages:
|
||||||
print('Skipping Go tests as go source files not availabe', file=sys.stderr)
|
print('Skipping Go tests as go source files not availabe', file=sys.stderr)
|
||||||
return
|
return
|
||||||
cmd = 'go test -v'.split()
|
cmd = [go, 'test', '-v']
|
||||||
if names:
|
if names:
|
||||||
cmd.extend(('-run', names))
|
cmd.extend(('-run', names))
|
||||||
cmd += packages
|
cmd += packages
|
||||||
print(shlex.join(cmd))
|
print(shlex.join(cmd), flush=True)
|
||||||
os.execl(go, *cmd)
|
os.execl(go, *cmd)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user