From 5a0a14504d99c681002b7efc90b131f5eb2c6a82 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Mon, 6 Jun 2022 16:10:41 +0800 Subject: [PATCH] ci: split pytest requirements to requirements.json --- .gitlab-ci.yml | 13 ++----------- tools/requirements.json | 6 ++++++ tools/requirements/requirements.pytest.txt | 10 ++++++++++ 3 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 tools/requirements/requirements.pytest.txt diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0c9d5112ea..217fafb60a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -74,7 +74,6 @@ variables: TEST_ENV_CONFIG_REPO: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/qa/ci-test-runner-configs.git" CI_AUTO_TEST_SCRIPT_REPO_URL: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/qa/auto_test_script.git" CI_AUTO_TEST_SCRIPT_REPO_BRANCH: "ci/v4.1" - PYTEST_EMBEDDED_VERSION: "0.7.1" # cache python dependencies PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" @@ -209,20 +208,12 @@ before_script: - *setup_tools_unless_target_test - fetch_submodules - *download_test_python_contraint_file - - $IDF_PATH/tools/idf_tools.py install-python-env + - $IDF_PATH/tools/idf_tools.py install-python-env --features pytest # TODO: remove this, IDFCI-1207 - pip install esptool -c ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE} - - pip install - "pytest-embedded-serial-esp~=$PYTEST_EMBEDDED_VERSION" - "pytest-embedded-idf~=$PYTEST_EMBEDDED_VERSION" - "pytest-embedded-qemu~=$PYTEST_EMBEDDED_VERSION" - pytest-rerunfailures - scapy - websocket-client - netifaces - -r tools/esp_prov/requirements.txt - export EXTRA_CFLAGS=${PEDANTIC_CFLAGS} - export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS} + - eval "$($IDF_PATH/tools/idf_tools.py export)" # use idf venv instead default: retry: diff --git a/tools/requirements.json b/tools/requirements.json index 8136e39488..df1993c7b3 100644 --- a/tools/requirements.json +++ b/tools/requirements.json @@ -12,6 +12,12 @@ "description": "Packages for supporting debugging from web browser", "optional": true, "requirement_path": "tools/requirements/requirements.gdbgui.txt" + }, + { + "name": "pytest", + "description": "Packages for CI with pytest", + "optional": true, + "requirement_path": "tools/requirements/requirements.pytest.txt" } ] } diff --git a/tools/requirements/requirements.pytest.txt b/tools/requirements/requirements.pytest.txt new file mode 100644 index 0000000000..4f58de5312 --- /dev/null +++ b/tools/requirements/requirements.pytest.txt @@ -0,0 +1,10 @@ +pytest-embedded-serial-esp +pytest-embedded-idf +pytest-embedded-qemu +pytest-rerunfailures +scapy +websocket-client +netifaces +rangehttpserver +dbus-python +protobuf