Juan Pablo Conde | 3feb7f1 | 2023-10-21 13:14:47 -0500 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
| 2 | # |
| 3 | # Copyright (c) 2024 Arm Limited. All rights reserved. |
| 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
| 8 | import json |
| 9 | import subprocess |
| 10 | |
| 11 | cmdres = subprocess.run(["ctest", "--show-only=json-v1"], stdout=subprocess.PIPE) |
| 12 | |
| 13 | tests_info = json.loads(cmdres.stdout.decode("utf-8")) |
| 14 | tests = [] |
| 15 | for test in tests_info["tests"]: |
| 16 | if "command" in test: |
| 17 | tests.append(test["name"]) |
| 18 | |
| 19 | tests_str = ' '.join(tests) |
| 20 | print(tests_str) |
| 21 | |