Paul Sokolovsky | 8634f48 | 2021-11-10 17:20:59 +0300 | [diff] [blame] | 1 | #!/usr/bin/env python |
2 | # | ||||
3 | # Copyright (c) 2021, Linaro Limited | ||||
4 | # | ||||
5 | # SPDX-License-Identifier: BSD-3-Clause | ||||
6 | # | ||||
7 | |||||
8 | import sys | ||||
9 | |||||
10 | # FIXME: At the time of writing, due to STG-2668, logs for UARTs != UART0 | ||||
11 | # are not complete, so match fewer lines. | ||||
12 | #REQUIRED_NUM = 1000 | ||||
13 | REQUIRED_NUM = 30 | ||||
14 | |||||
15 | cnt = 0 | ||||
16 | |||||
17 | with open(sys.argv[1]) as f: | ||||
18 | for l in f: | ||||
19 | if "TSP: cpu" in l: | ||||
20 | cnt += 1 | ||||
21 | |||||
22 | if cnt >= REQUIRED_NUM: | ||||
23 | sys.exit(0) | ||||
24 | else: | ||||
25 | sys.exit(1) |