Skip to content

Commit ef1f902

Browse files
author
Mohammad Azim Khan
committed
Automatically enabling coverage on test when it is enabled on any other module
1 parent 205a970 commit ef1f902

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/test_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2147,6 +2147,7 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
21472147
bin_file = None
21482148
test_case_folder_name = os.path.basename(test_path)
21492149

2150+
<<<<<<< 205a97083e8ff9c0fdf55d0221675efacf6e0a88
21502151
args = (src_path, test_build_path, target, toolchain_name)
21512152
kwargs = {
21522153
'jobs': jobs,
@@ -2160,7 +2161,8 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
21602161
'app_config': app_config,
21612162
'build_profile': build_profile,
21622163
'silent': True,
2163-
'coverage_filter': coverage_filter
2164+
# Coverage requires main(). So if enabled on any module, enable it on test as well.
2165+
'coverage_filter': ".*" if coverage_filter else [])
21642166
}
21652167

21662168
results.append(p.apply_async(build_test_worker, args, kwargs))

0 commit comments

Comments
 (0)