blob: 398a8c0335c393a19f7f817c77982e0e86a2e612 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#! /usr/bin/env python3
"""
Wrapper python script to launch the pretty_printer_test_py program as interpolated
by scons with the standard input set to the test file readtest_input, also as
interpolated by scons.
"""
import subprocess
gdb_path = '@gdb_path@'
args = [
gdb_path,
'-nx',
'-batch',
'-ex',
r'source @pretty_printer_test_py@',
'-args',
r'@pretty_printer_test_program@',
]
print(f"Pretty printer test running command:\n{' '.join(args)}")
proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
stdout, stderr = proc.communicate()
print(stdout.decode('utf-8'))
exit(proc.returncode)
|