*`os`: The supported operator system, ignoring case. If the test run in multiple operator systems, use ";" to split systems, for example, `apple;linux` means the test runs on both Apple and Linux. The supported values are `linux`,`win32` and `apple`. If the value is empty, this means the test runs on all opertaor systems.
*`arch`: the device's architecture. similar to `os`, multiple valuse ars splited by ";" and ignoring case. The supported architectures are `gpu`, `xpu`, `ASCEND`, `ASCEND_CL` and `rocm`.
*`timeout`: timeout of a unittest, whose unit is second.
*`timeout`: timeout of a unittest, whose unit is second. Blank means defalut.
*`run_type`: run_type of a unittest. Supported values are `NIGHTLY`, `EXCLUSIVE`, `CINN`, `DIST`, `GPUPS`, `INFER`, `EXCLUSIVE:NIGHTLY`, `DIST:NIGHTLY`,which are case-insensitive.
*`launcher`: the test launcher.Supported values are test_runner.py, dist_test.sh and custom scripts' name.
*`num_port`: the number os port used in a distributed unit test
*`run_serial`: whether in serial mode. the value can be 1 or 0.Default (empty) is 0.
*`launcher`: the test launcher.Supported values are test_runner.py, dist_test.sh and custom scripts' name. Blank means test_runner.py.
*`num_port`: the number of port used in a distributed unit test. Blank means automatically distributed port.
*`run_serial`: whether in serial mode. the value can be 1 or 0.Default (empty) is 0. Blank means defalut.
*`ENVS`: required environments. multiple envirenmonts are splited by ";".
*`conditions`: extra required conditions for some tests. The value is a list of boolean expression in cmake programmer, splited with ";". For example, the value can be `WITH_DGC;NOT WITH_NCCL` or `WITH_NCCL;${NCCL_VERSION} VERSION_GREATER_EQUAL 2212`,The relationship between these expressions is a conjunction.
f""" Please ensure the test file with the prefix '{filepath_prefix}' and one of the suffix {suffix} exists, because you specified a unittest named '{name}'"""
returnname
defprocess_run_type(run_type):
def_process_run_type(run_type):
rt=run_type.strip()
# completely match one of the strings: 'NIGHTLY', 'EXCLUSIVE', 'CINN', 'DIST', 'GPUPS', 'INFER', 'EXCLUSIVE:NIGHTLY' and 'DIST:NIGHTLY'
"Input a list of dir paths including files named testslist.csv and output CmakeLists.txt in these directories respectly"
)
parser.add_argument(
"--ignore-cmake-dirs",
'-i',
type=str,
required=False,
default=[],
nargs='*',
help=
"To keep dist ports the same with old version cmake, old cmakelists.txt files are needed to parse dist_ports. If a directories are newly created and there is no cmakelists.txt file, the directory path must be specified by this option. The dirs are not recursive."