From 7610e535ea2a0630a66df14cca13761d854fa02d Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 19 Jul 2023 10:20:13 +0800 Subject: [PATCH 1/3] ci: ignore test scripts under `managed_components` --- tools/ci/idf_ci_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/idf_ci_utils.py b/tools/ci/idf_ci_utils.py index 6bd4a45d49e..c8335a738d4 100644 --- a/tools/ci/idf_ci_utils.py +++ b/tools/ci/idf_ci_utils.py @@ -214,7 +214,7 @@ def get_pytest_files(paths: List[str]) -> List[str]: pytest_scripts: Set[str] = set() for p in paths: path = Path(p) - pytest_scripts.update(str(_p) for _p in path.glob('**/pytest_*.py')) + pytest_scripts.update(str(_p) for _p in path.glob('**/pytest_*.py') if 'managed_components' not in _p.parts) return list(pytest_scripts) From e872b69c12b1dbb90b848e2b2291940c31de42ab Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 19 Jul 2023 11:50:53 +0800 Subject: [PATCH 2/3] ci: show mr.env env file --- .gitlab/ci/pre_check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/ci/pre_check.yml b/.gitlab/ci/pre_check.yml index 0680e1f8217..a363c797a95 100644 --- a/.gitlab/ci/pre_check.yml +++ b/.gitlab/ci/pre_check.yml @@ -201,6 +201,7 @@ mr_variables: if echo "$CI_MERGE_REQUEST_LABELS" | egrep "(^|,)BUILD_AND_TEST_ALL_APPS(,|$)"; then echo "BUILD_AND_TEST_ALL_APPS=1" >> mr.env fi + - cat mr.env artifacts: reports: dotenv: mr.env From f5984d482a49c48c96d148e6dc2ca82764c12d7a Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 19 Jul 2023 10:19:44 +0800 Subject: [PATCH 3/3] ci: fix skipping qemu test always --- .gitlab/ci/host-test.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.gitlab/ci/host-test.yml b/.gitlab/ci/host-test.yml index e5c5aa737ec..425dc44ebf9 100644 --- a/.gitlab/ci/host-test.yml +++ b/.gitlab/ci/host-test.yml @@ -4,7 +4,7 @@ image: $ESP_ENV_IMAGE tags: - host_test - dependencies: [] + dependencies: # set dependencies to null to avoid missing artifacts issue # run host_test jobs immediately, only after upload cache needs: - job: upload-pip-cache @@ -13,6 +13,8 @@ - job: upload-submodules-cache optional: true artifacts: false + - job: mr_variables + optional: true # only MR pipelines would have this test_nvs_on_host: extends: .host_test_template @@ -98,7 +100,6 @@ test_gdbstub_on_host: - cd components/esp_gdbstub/test_gdbstub_host - make test - test_idf_py: extends: .host_test_template variables: @@ -301,9 +302,6 @@ test_pytest_qemu: - .host_test_template - .before_script_build_jobs image: $QEMU_IMAGE - needs: - - job: mr_variables - optional: true # only MR pipelines would have this artifacts: when: always paths: @@ -325,7 +323,7 @@ test_pytest_qemu: --modified-components ${MR_MODIFIED_COMPONENTS} --modified-files ${MR_MODIFIED_FILES} - retry_failed git clone $KNOWN_FAILURE_CASES_REPO known_failure_cases - - pytest + - run_cmd pytest --target $IDF_TARGET -m qemu --embedded-services idf,qemu @@ -337,9 +335,6 @@ test_pytest_linux: extends: - .host_test_template - .before_script_build_jobs - needs: - - job: mr_variables - optional: true # only MR pipelines would have this artifacts: when: always paths: