Skip to content

Commit fb58cce

Browse files
committed
Integration tests: Have target process print its pid
This makes it easier to work with when running multiple instances of it manually, outside of the integration testing framework.
1 parent bab2116 commit fb58cce

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/integration/gen_tests.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,12 @@ def define_traceable_func(name, params, body):
114114
get_param_str(param, i) for i, param in enumerate(case["param_types"])
115115
)
116116

117-
oid_func_body = "".join(
118-
f" std::cout << (uintptr_t)(&a{i}) << std::endl;\n"
119-
for i in range(len(case["param_types"]))
117+
oid_func_body = (
118+
' std::cout << "(" << getpid() << ") " << BOOST_CURRENT_FUNCTION << " ["'
120119
)
121-
oid_func_body += " std::cout << BOOST_CURRENT_FUNCTION << std::endl;\n"
120+
for i in range(len(case["param_types"])):
121+
oid_func_body += f' << " " << (uintptr_t)&a{i}'
122+
oid_func_body += ' << "]" << std::endl;\n'
122123

123124
f.write(
124125
define_traceable_func(

0 commit comments

Comments
 (0)