Skip to content

Commit

Permalink
tools: fix get_asan_state() in tools/test.py
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
joyeecheung authored and targos committed May 11, 2024
1 parent 6e71acc commit c6043fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ def get_env_type(vm, options_type, context):


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


Expand Down

0 comments on commit c6043fe

Please sign in to comment.