mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-10-01 14:27:22 +00:00
test_driver.py: Use subprocess.check_output rather than subprocess.run
Signed-off-by: Ronald Cron <[email protected]>
This commit is contained in:
@@ -249,15 +249,13 @@ class TestDriverGenerator:
|
|||||||
support all `--c-kinds` flags used here, and will either fail with an
|
support all `--c-kinds` flags used here, and will either fail with an
|
||||||
error or produce incomplete results.
|
error or produce incomplete results.
|
||||||
"""
|
"""
|
||||||
result = subprocess.run(
|
output = subprocess.check_output(
|
||||||
["ctags", "-x", "--language-force=C", "--c-kinds=defgpstuv", str(file)],
|
["ctags", "-x", "--language-force=C", "--c-kinds=defgpstuv", str(file)],
|
||||||
stdout=subprocess.PIPE,
|
|
||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.STDOUT,
|
||||||
universal_newlines=True,
|
universal_newlines=True,
|
||||||
check=True
|
|
||||||
)
|
)
|
||||||
identifiers = set()
|
identifiers = set()
|
||||||
for line in result.stdout.splitlines():
|
for line in output.splitlines():
|
||||||
identifiers.add(line.split()[0])
|
identifiers.add(line.split()[0])
|
||||||
|
|
||||||
return identifiers
|
return identifiers
|
||||||
|
|||||||
Reference in New Issue
Block a user