Skip to content

Commit 9d485b4

Browse files
joyeecheungmarco-ippolito
authored andcommitted
tools: fix get_asan_state() in tools/test.py
The output of `node -p process.config.variables.asan` includes a newline character so it's never exactly "1", which means asan is always "off" for the status files. This fixes the detection by stripping whitespaces from the output. PR-URL: #52766 Reviewed-By: Rafael Gonzaga <[email protected]>
1 parent e98c305 commit 9d485b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1613,7 +1613,7 @@ def get_env_type(vm, options_type, context):
16131613

16141614

16151615
def get_asan_state(vm, context):
1616-
asan = Execute([vm, '-p', 'process.config.variables.asan'], context).stdout
1616+
asan = Execute([vm, '-p', 'process.config.variables.asan'], context).stdout.strip()
16171617
return "on" if asan == "1" else "off"
16181618

16191619

0 commit comments

Comments
 (0)