Merge branch 'bugfix/pytest_build_dir_arg' into 'master'

fix(pytest): respect --build-dir argument from pytest-embedded

See merge request espressif/esp-idf!30609
This commit is contained in:
Ivan Grokhotkov
2024-05-07 21:12:57 +08:00
3 changed files with 5 additions and 0 deletions

View File

@@ -206,6 +206,9 @@ def build_dir(
check_dirs = [f'build_{target}_{config}']
else:
check_dirs = []
build_dir_arg = request.config.getoption('build_dir', None)
if build_dir_arg:
check_dirs.append(build_dir_arg)
if target is not None and config is not None:
check_dirs.append(f'build_{target}_{config}')
if target is not None:

View File

@@ -478,6 +478,7 @@ Build Directories
By default, each test case looks for the required binary files in the following directories (in order):
- Directory set by ``--build-dir`` command line argument, if specified.
- ``build_<target>_<sdkconfig>``
- ``build_<target>``
- ``build_<sdkconfig>``

View File

@@ -574,6 +574,7 @@ CI 用于执行所有相关测试的命令为: ``pytest <parent_dir> --target
默认情况下pytest 脚本会按照以下顺序查找编译目录:
-``--build-dir`` 命令行参数设置的目录。(当指定时)
- ``build_<target>_<sdkconfig>``
- ``build_<target>``
- ``build_<sdkconfig>``