From 7281a5a0cccc9297cb942cdeab6e54f3532c944f Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Mon, 30 Nov 2020 11:45:16 +0800 Subject: [PATCH] Split component_ut tests based on targets - add more label in CIScanTest.py - fix the bug that will cause labels not iterate correctly --- tools/ci/config/target-test.yml | 12 +++++++++++- tools/ci/python_packages/ttfw_idf/CIScanTests.py | 11 ++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/tools/ci/config/target-test.yml b/tools/ci/config/target-test.yml index 4aa2aaf4df..71c3b625bc 100644 --- a/tools/ci/config/target-test.yml +++ b/tools/ci/config/target-test.yml @@ -72,6 +72,16 @@ # run test - python Runner.py $COMPONENT_UT_DIRS -c $CONFIG_FILE -e $ENV_FILE +.component_ut_32_template: + extends: + - .component_ut_template + - .rules:tests:unit_test_32 + +.component_ut_s2_template: # unused yet + extends: + - .component_ut_template + - .rules:tests:unit_test_s2 + .unit_test_template: extends: - .target_test_job_template @@ -336,7 +346,7 @@ test_app_test_004: - Example_GENERIC component_ut_test_001: - extends: .component_ut_template + extends: .component_ut_32_template tags: - ESP32 - COMPONENT_UT_GENERIC diff --git a/tools/ci/python_packages/ttfw_idf/CIScanTests.py b/tools/ci/python_packages/ttfw_idf/CIScanTests.py index 8d1c5e4ad8..462249d157 100644 --- a/tools/ci/python_packages/ttfw_idf/CIScanTests.py +++ b/tools/ci/python_packages/ttfw_idf/CIScanTests.py @@ -13,7 +13,9 @@ from idf_py_actions.constants import SUPPORTED_TARGETS, PREVIEW_TARGETS TEST_LABELS = { 'example_test': 'BOT_LABEL_EXAMPLE_TEST', 'test_apps': 'BOT_LABEL_CUSTOM_TEST', - 'component_ut': ['BOT_LABEL_UNIT_TEST', 'BOT_LABEL_UNIT_TEST_S2'], + 'component_ut': ['BOT_LABEL_UNIT_TEST', + 'BOT_LABEL_UNIT_TEST_32', + 'BOT_LABEL_UNIT_TEST_S2'], } BUILD_ALL_LABELS = [ @@ -45,11 +47,10 @@ def _judge_build_or_not(action, build_all): # type: (str, bool) -> (bool, bool) for label in labels: if os.getenv(label): - logging.info('Build test cases apps') + logging.info('Build only test cases apps') return True, False - else: - logging.info('Skip all') - return False, False + logging.info('Skip all') + return False, False def output_json(apps_dict_list, target, build_system, output_dir):