检查输出中是否包含指定字符串
(output, check_string)
| 200 | return res |
| 201 | |
| 202 | def check_output(output, check_string): |
| 203 | """检查输出中是否包含指定字符串""" |
| 204 | output_str = ''.join(output) if isinstance(output, list) else str(output) |
| 205 | flag = check_string in output_str |
| 206 | if flag == True: |
| 207 | print('Success: find string ' + check_string) |
| 208 | else: |
| 209 | print(output) |
| 210 | print(f"::error:: can not find string {check_string} output: {output_str}") |
| 211 | |
| 212 | return flag |
| 213 | if __name__ == "__main__": |
| 214 | """ |
| 215 | build all bsp and attach config. |
no test coverage detected