ci: remove --enable-pytest from install.sh

This commit is contained in:
Fu Hanxi
2025-05-21 13:37:49 +02:00
parent bc15de99e1
commit 0d5b3e60ac
16 changed files with 23 additions and 59 deletions

View File

@@ -296,8 +296,6 @@ generate_build_child_pipeline:
variables: variables:
PYTEST_IGNORE_COLLECT_IMPORT_ERROR: "1" PYTEST_IGNORE_COLLECT_IMPORT_ERROR: "1"
script: script:
# requires basic pytest dependencies
- run_cmd bash install.sh --enable-pytest
- run_cmd python tools/ci/dynamic_pipelines/scripts/generate_build_child_pipeline.py - run_cmd python tools/ci/dynamic_pipelines/scripts/generate_build_child_pipeline.py
build_child_pipeline: build_child_pipeline:

View File

@@ -149,19 +149,13 @@ variables:
section_start "running_install_sh" "Running install.sh" section_start "running_install_sh" "Running install.sh"
if [[ "${CI_JOB_STAGE}" == "build_doc" ]]; then if [[ "${CI_JOB_STAGE}" == "build_doc" ]]; then
run_cmd bash install.sh --enable-ci --enable-docs run_cmd bash install.sh --enable-ci --enable-docs
elif [[ "${CI_JOB_STAGE}" == "build" ]]; then
run_cmd bash install.sh --enable-ci
else else
if ! echo "${CI_JOB_NAME}" | egrep ".*pytest.*"; then
run_cmd bash install.sh --enable-ci run_cmd bash install.sh --enable-ci
else
run_cmd bash install.sh --enable-ci --enable-pytest --enable-test-specific
fi
fi fi
section_end "running_install_sh" section_end "running_install_sh"
else else
section_start "install_python_env" "Install Python environment" section_start "install_python_env" "Install Python environment"
run_cmd python tools/idf_tools.py install-python-env --features ci,pytest,test-specific run_cmd python tools/idf_tools.py install-python-env --features ci,test-specific
section_end "install_python_env" section_end "install_python_env"
fi fi

View File

@@ -120,7 +120,6 @@ check_test_scripts_build_test_rules:
PYTEST_IGNORE_COLLECT_IMPORT_ERROR: "1" PYTEST_IGNORE_COLLECT_IMPORT_ERROR: "1"
script: script:
# requires basic pytest dependencies # requires basic pytest dependencies
- run_cmd bash install.sh --enable-pytest
- python tools/ci/check_build_test_rules.py check-test-scripts examples/ tools/test_apps components - python tools/ci/check_build_test_rules.py check-test-scripts examples/ tools/test_apps components
check_configure_ci_environment_parsing: check_configure_ci_environment_parsing:

View File

@@ -60,7 +60,7 @@ test_tools_win:
PYTHONPATH: "$PYTHONPATH;$IDF_PATH\\tools;$IDF_PATH\\tools\\esp_app_trace;$IDF_PATH\\components\\partition_table;$IDF_PATH\\tools\\ci\\python_packages" PYTHONPATH: "$PYTHONPATH;$IDF_PATH\\tools;$IDF_PATH\\tools\\esp_app_trace;$IDF_PATH\\components\\partition_table;$IDF_PATH\\tools\\ci\\python_packages"
script: script:
- python -m pip install jsonschema - python -m pip install jsonschema
- .\install.ps1 --enable-ci --enable-pytest - .\install.ps1 --enable-ci
- .\export.ps1 - .\export.ps1
- python "${SUBMODULE_FETCH_TOOL}" -s "all" - python "${SUBMODULE_FETCH_TOOL}" -s "all"
- cd ${IDF_PATH}/tools/test_idf_py - cd ${IDF_PATH}/tools/test_idf_py
@@ -78,7 +78,7 @@ test_tools_win:
after_script: [] after_script: []
timeout: 4 hours timeout: 4 hours
script: script:
- .\install.ps1 --enable-ci --enable-pytest - .\install.ps1 --enable-ci
- . .\export.ps1 - . .\export.ps1
- python "${SUBMODULE_FETCH_TOOL}" -s "all" - python "${SUBMODULE_FETCH_TOOL}" -s "all"
- cd ${IDF_PATH}\tools\test_build_system - cd ${IDF_PATH}\tools\test_build_system

View File

@@ -21,7 +21,7 @@ upload-pip-cache:
policy: push policy: push
script: script:
- rm -rf .cache/pip # clear old packages - rm -rf .cache/pip # clear old packages
- bash install.sh --enable-ci --enable-pytest - bash install.sh --enable-ci --enable-test-specific
parallel: parallel:
matrix: matrix:
- GEO: [ 'shiny', 'brew' ] - GEO: [ 'shiny', 'brew' ]

View File

@@ -16,7 +16,7 @@
```bash ```bash
cd $IDF_PATH cd $IDF_PATH
bash install.sh --enable-ci --enable-pytest bash install.sh --enable-ci
. ./export.sh . ./export.sh
``` ```

View File

@@ -213,7 +213,7 @@ When all the hardware have been configured and prepared, the Test can be run via
The description is provided, assuming that the test is run under Linux and Host board has a /dev/ttyACM0 path, Mocked Device has a /dev/ttyUSB0 path, and we are in the esp-idf root folder. The description is provided, assuming that the test is run under Linux and Host board has a /dev/ttyACM0 path, Mocked Device has a /dev/ttyUSB0 path, and we are in the esp-idf root folder.
To run the pytest, esp-idf must be installed and configured with ```--enable-pytest```. To run the pytest, esp-idf must be installed and configured with `--enable-ci`.
### Prepare Host ### Prepare Host

View File

@@ -33,13 +33,13 @@ On the host side, ESP-IDF employs the pytest framework (alongside certain pytest
Installation Installation
============ ============
All basic dependencies could be installed by running the ESP-IDF install script with the ``--enable-pytest`` argument: All basic dependencies could be installed by running the ESP-IDF install script with the ``--enable-ci`` argument:
.. code-block:: bash .. code-block:: bash
$ install.sh --enable-pytest $ install.sh --enable-ci
Additional test script specific dependencies could be installed separately by running the ESP-IDF install script with the ``--enable-pytest-specific`` argument: Additional test script specific dependencies could be installed separately by running the ESP-IDF install script with the ``--enable-test-specific`` argument:
.. code-block:: bash .. code-block:: bash
@@ -494,7 +494,7 @@ First you need to install ESP-IDF with additional Python requirements:
.. code-block:: shell .. code-block:: shell
$ cd $IDF_PATH $ cd $IDF_PATH
$ bash install.sh --enable-ci --enable-pytest $ bash install.sh --enable-ci
$ . ./export.sh $ . ./export.sh
Build Directories Build Directories

View File

@@ -33,13 +33,13 @@ ESP-IDF 在主机端使用 pytest 框架(以及一些 pytest 插件)来自
安装 安装
============ ============
基础依赖项可以通过执行 ESP-IDF 安装脚本 ``--enable-pytest`` 进行安装: 基础依赖项可以通过执行 ESP-IDF 安装脚本 ``--enable-ci`` 进行安装:
.. code-block:: bash .. code-block:: bash
$ install.sh --enable-pytest $ install.sh --enable-ci
额外的测试脚本依赖项可以通过执行 ESP-IDF 安装脚本 ``--enable-pytest-specific`` 进行安装: 额外的测试脚本依赖项可以通过执行 ESP-IDF 安装脚本 ``--enable-test-specific`` 进行安装:
.. code-block:: bash .. code-block:: bash
@@ -494,7 +494,7 @@ CI 的工作流程如下所示:
.. code-block:: shell .. code-block:: shell
$ cd $IDF_PATH $ cd $IDF_PATH
$ bash install.sh --enable-ci --enable-pytest $ bash install.sh --enable-ci
$ . ./export.sh $ . ./export.sh
编译目录 编译目录

View File

@@ -56,7 +56,7 @@ They can also be run locally. Ref: [ESP-IDF Tests with Pytest Guide](https://doc
Example: Example:
```bash ```bash
$ cd $IDF_PATH $ cd $IDF_PATH
$ bash install.sh --enable-pytest $ bash install.sh --enable-ci
$ . ./export.sh $ . ./export.sh
$ cd examples/protocols/sockets/tcp_client $ cd examples/protocols/sockets/tcp_client
$ python $IDF_PATH/tools/ci/ci_build_apps.py . --target esp32 -vv --pytest-apps $ python $IDF_PATH/tools/ci/ci_build_apps.py . --target esp32 -vv --pytest-apps

View File

@@ -111,7 +111,7 @@ This requires the following python libraries to run:
To install the dependency packages needed, please run the following command: To install the dependency packages needed, please run the following command:
```shell ```shell
bash install.sh --enable-pytest bash install.sh --enable-ci
``` ```
**Note:** For troubleshooting errors with BLE transport, please refer this [link](https://bleak.readthedocs.io/en/latest/troubleshooting.html). **Note:** For troubleshooting errors with BLE transport, please refer this [link](https://bleak.readthedocs.io/en/latest/troubleshooting.html).

View File

@@ -24,9 +24,9 @@ def action_extract_features(args: str) -> None:
# features to be enabled have prefix '+', disabled have prefix '-' # features to be enabled have prefix '+', disabled have prefix '-'
for arg in args.split(): for arg in args.split():
if arg.startswith(arg_enable_prefix): if arg.startswith(arg_enable_prefix):
features.append('+' + arg[len(arg_enable_prefix):]) features.append('+' + arg[len(arg_enable_prefix) :])
elif arg.startswith(arg_disable_prefix): elif arg.startswith(arg_disable_prefix):
features.append('-' + arg[len(arg_disable_prefix):]) features.append('-' + arg[len(arg_disable_prefix) :])
elif arg.startswith('-'): elif arg.startswith('-'):
raise SystemExit(f'ERROR: Invalid feature specifier: {arg}') raise SystemExit(f'ERROR: Invalid feature specifier: {arg}')
features = list(set(features)) features = list(set(features))
@@ -72,13 +72,13 @@ def action_print_help(script_extension: str) -> None:
optional arguments: optional arguments:
targets-to-install 'all', a single target (e.g. 'esp32s2'), or a comma-separated list of targets (e.g. 'esp32,esp32c3,esp32h2') targets-to-install 'all', a single target (e.g. 'esp32s2'), or a comma-separated list of targets (e.g. 'esp32,esp32c3,esp32h2')
--enable-* a specific feature to enable (e.g. '--enable-pytest' will enable feature pytest) --enable-* a specific feature to enable (e.g. '--enable-ci' will enable feature ci)
--disable-* a specific feature to disable (e.g. '--disable-pytest' will disable feature pytest) --disable-* a specific feature to disable (e.g. '--disable-pytest' will disable feature pytest)
supported features: {', '.join(features)} supported features: {', '.join(features)}
{help_opts} show this help message and exit {help_opts} show this help message and exit
For more information, please see https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/tools/idf-tools.html#install-scripts For more information, please see https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/tools/idf-tools.html#install-scripts
""") # noqa: E222 """) # noqa: E222, E501
def main() -> None: def main() -> None:

View File

@@ -7,12 +7,6 @@
"optional": false, "optional": false,
"requirement_path": "tools/requirements/requirements.core.txt" "requirement_path": "tools/requirements/requirements.core.txt"
}, },
{
"name": "pytest",
"description": "Packages for CI with pytest",
"optional": true,
"requirement_path": "tools/requirements/requirements.pytest.txt"
},
{ {
"name": "test-specific", "name": "test-specific",
"description": "Packages for specific test scripts", "description": "Packages for specific test scripts",

View File

@@ -1,21 +0,0 @@
# Python package requirements for pytest in ESP-IDF.
# This feature can be enabled by running "install.{sh,bat,ps1,fish} --enable-pytest"
#
# This file lists Python packages without version specifiers. Version details
# are stored in a separate constraints file. For more information, visit:
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/tools/idf-tools.html
pytest-embedded-serial-esp
pytest-embedded-idf
pytest-embedded-jtag
pytest-embedded-qemu
pytest-rerunfailures
pytest-timeout
pytest-ignore-test-results
# ci
minio
# build
python-gitlab
idf-build-apps

View File

@@ -102,7 +102,7 @@ Under `Security features`
- Install pytest requirements - Install pytest requirements
``` ```
bash $IDF_PATH/install.sh --enable-pytest bash $IDF_PATH/install.sh --enable-ci
``` ```
### Build and test ### Build and test

View File

@@ -9,7 +9,7 @@ This directory contains tests for the build system and build-related tools. Thes
## Running the tests locally ## Running the tests locally
1. Install pytest using `install.{sh,bat,ps1,fish} --enable-pytest`. 1. Install pytest using `install.{sh,bat,ps1,fish} --enable-ci`.
1. Activate the IDF shell environment using `export.{sh,bat,ps1,fish}`. 1. Activate the IDF shell environment using `export.{sh,bat,ps1,fish}`.
1. To run all the tests, go to `$IDF_PATH/tools/test_build_system` directory, then run: 1. To run all the tests, go to `$IDF_PATH/tools/test_build_system` directory, then run:
``` ```