gh-131038: Use text=True in subprocesses in test_perf_profiler (#137117)
(cherry picked from commit
a852c7bdd48979218a0c756ff1a5586d91cff607)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
env=env,
+ text=True,
)
if proc.returncode:
print(proc.stderr)
stderr=subprocess.PIPE,
env=env,
check=True,
+ text=True,
)
- return proc.stdout.decode("utf-8", "replace"), proc.stderr.decode(
- "utf-8", "replace"
- )
+ return proc.stdout, proc.stderr
@unittest.skipUnless(perf_command_works(), "perf command doesn't work")