diff options
-rw-r--r-- | .gitlab-ci.yml | 48 | ||||
-rwxr-xr-x | zephyr/firmware_builder.py | 21 |
2 files changed, 62 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 83f5df5eec..fd31410ca0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -166,10 +166,28 @@ before_script: "${EC_DIR}/zephyr/drivers/**" "${EC_DIR}/zephyr/include/drivers/**" "${EC_DIR}/zephyr/shim/chip/**" "${EC_DIR}/zephyr/shim/core/**" "${EC_DIR}/zephyr/projects/**" "/usr/include/x86_64-linux-gnu/**" - "${EC_DIR}/build/*/build-*/zephyr/*/generated/**" "${EC_DIR}/test/**" + "${EC_DIR}/build/*/build-*/zephyr/*/generated/**" "${EC_DIR}/zephyr/shim/chip/npcx/npcx_monitor/**" - "${EC_DIR}/zephyr/emul/**" "${EC_DIR}/zephyr/test/**" - "**/testsuite/**" "**/subsys/emul/**" + "${EC_DIR}/test/**" + "${EC_DIR}/include/tests/**" + "${EC_DIR}/private/test/**" + "${EC_DIR}/private/fingerprint/google-fpalg/mcutest/**" + "${EC_DIR}/zephyr/test/**" + "${EC_DIR}/include/mock/**" + "${EC_DIR}/common/mock/**" + "${EC_DIR}/board/host/**" + "${EC_DIR}/chip/host/**" + "${EC_DIR}/core/host/**" + "${EC_DIR}/zephyr/emul/**" + "${EC_DIR}/zephyr/mock/**" + "**/*_test.c" + "**/*_test.h" + "**/*_emul.c" + "**/*_emul.h" + "${EC_DIR}/include/test_util.h" + "${EC_DIR}/common/test_util.c" + "${EC_DIR}/zephyr/shim/src/test_util.c" + "${EC_DIR}/zephyr/shim/src/ztest_system.c" - /usr/bin/genhtml --branch-coverage -q -o "${BUILD_DIR}/${PROJECT}/output/filtered_no_zephyr_rpt" -t "${PROJECT} coverage w/o zephyr" @@ -321,10 +339,28 @@ merged_coverage: "${EC_DIR}/zephyr/drivers/**" "${EC_DIR}/zephyr/include/drivers/**" "${EC_DIR}/zephyr/shim/chip/**" "${EC_DIR}/zephyr/shim/core/**" "${EC_DIR}/zephyr/projects/**" "/usr/include/x86_64-linux-gnu/**" - "${EC_DIR}/build/*/build-*/zephyr/*/generated/**" "${EC_DIR}/test/**" + "${EC_DIR}/build/*/build-*/zephyr/*/generated/**" "${EC_DIR}/zephyr/shim/chip/npcx/npcx_monitor/**" - "${EC_DIR}/zephyr/emul/**" "${EC_DIR}/zephyr/test/**" - "**/testsuite/**" "**/subsys/emul/**" + "${EC_DIR}/test/**" + "${EC_DIR}/include/tests/**" + "${EC_DIR}/private/test/**" + "${EC_DIR}/private/fingerprint/google-fpalg/mcutest/**" + "${EC_DIR}/zephyr/test/**" + "${EC_DIR}/include/mock/**" + "${EC_DIR}/common/mock/**" + "${EC_DIR}/board/host/**" + "${EC_DIR}/chip/host/**" + "${EC_DIR}/core/host/**" + "${EC_DIR}/zephyr/emul/**" + "${EC_DIR}/zephyr/mock/**" + "**/*_test.c" + "**/*_test.h" + "**/*_emul.c" + "**/*_emul.h" + "${EC_DIR}/include/test_util.h" + "${EC_DIR}/common/test_util.c" + "${EC_DIR}/zephyr/shim/src/test_util.c" + "${EC_DIR}/zephyr/shim/src/ztest_system.c" - grep -h "SF:" ${BUILD_DIR}/zephyr/all_builds[0-9]*.info | sort -u | sed -e 's|^SF:||' | xargs lcov --rc lcov_branch_coverage=1 -o "${BUILD_DIR}/all_builds_filtered.info" diff --git a/zephyr/firmware_builder.py b/zephyr/firmware_builder.py index 6081c774fa..1e46603faa 100755 --- a/zephyr/firmware_builder.py +++ b/zephyr/firmware_builder.py @@ -346,13 +346,32 @@ def test(opts): ) test_patterns = [ + # Exclude tests platform_ec / "test/**", + platform_ec / "include/tests/**", + platform_ec / "private/test/**", platform_ec / "private/fingerprint/google-fpalg/mcutest/**", zephyr_dir / "test/**", + third_party / "zephyr/main/subsys/testsuite/**", + # Exclude mocks & emulators + platform_ec / "include/mock/**", + platform_ec / "common/mock/**", + platform_ec / "board/host/**", + platform_ec / "chip/host/**", + platform_ec / "core/host/**", zephyr_dir / "emul/**", zephyr_dir / "mock/**", third_party / "zephyr/main/subsys/emul/**", - third_party / "zephyr/main/subsys/testsuite/**", + # Exclude all files ending in _test.[ch] or _emul.[ch] + "**/*_test.c", + "**/*_test.h", + "**/*_emul.c", + "**/*_emul.h", + # Exclude some special cases that don't match the other patterns + platform_ec / "include/test_util.h", + platform_ec / "common/test_util.c", + zephyr_dir / "shim/src/test_util.c", + zephyr_dir / "shim/src/ztest_system.c", ] generated_and_system_patterns = [ |