summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2015-06-16 20:20:54 +0800
committerSam Spilsbury <smspillaz@gmail.com>2015-06-16 20:20:54 +0800
commit744c1907d4f30efdaa482da2c2b5dfe7cd210c28 (patch)
treea10f073ac820aa0b384be563338d9c6a57746698 /m4
parent7bddb73b72e0fe82ea08d33ad3c64a39638fe845 (diff)
eos-coverage.m4: Don't add blacklisted files to --coverage-prefix
Often these files are blacklisted for a reason, like the fact that they are minified, which can wreak havoc with the coverage machinery.
Diffstat (limited to 'm4')
-rw-r--r--m4/eos-coverage.m413
1 files changed, 8 insertions, 5 deletions
diff --git a/m4/eos-coverage.m4 b/m4/eos-coverage.m4
index 14e0952..c78e725 100644
--- a/m4/eos-coverage.m4
+++ b/m4/eos-coverage.m4
@@ -306,10 +306,13 @@ _eos_coverage_outputs += $(_eos_js_coverage_data_output_file)
# The pseudocode for this line looks something like this:
# paths = []
# foreach (p in EOS_JS_COVERAGE_FILES) {
- # if (path.replace(':', ' ').split(' ')[0] == 'resource') {
- # paths.push(p) # resource:// style path, unmodified
- # } else {
- # paths.push(absolute_path_to(p)) # Absolute path
+ # if (path not in EOS_COVERAGE_BLACKLIST_PATTERNS and
+ # path not in [p.withoutprefix("*/") for p in EOS_BLACKLIST_PATTERNS]) {
+ # if (path.replace(':', ' ').split(' ')[0] == 'resource') {
+ # paths.push(p) # resource:// style path, unmodified
+ # } else {
+ # paths.push(absolute_path_to(p)) # Absolute path
+ # }
# }
# }
#
@@ -333,7 +336,7 @@ _eos_coverage_outputs += $(_eos_js_coverage_data_output_file)
# cond evalutes to a non-empty string. The documentation on this
# point suggests that conditional operators can be used. This is
# misleading.
- EOS_JS_COVERAGE_LOG_FLAGS='$(addprefix --coverage-prefix=,$(foreach p,$(EOS_JS_COVERAGE_FILES),$(if $(filter resource,$(firstword $(subst :, ,$(p)))),$(p),$(abspath $(p))))) --coverage-output=$(_eos_js_coverage_trace_path)'
+ EOS_JS_COVERAGE_LOG_FLAGS='$(addprefix --coverage-prefix=,$(foreach p,$(filter-out $(subst */,,$(EOS_COVERAGE_BLACKLIST_PATTERNS)),$(filter-out $(subst *,%,$(EOS_COVERAGE_BLACKLIST_PATTERNS)),$(EOS_JS_COVERAGE_FILES))),$(if $(filter resource,$(firstword $(subst :, ,$(p)))),$(p),$(abspath $(p))))) --coverage-output=$(_eos_js_coverage_trace_path)'
], [
EOS_JS_COVERAGE_RULES=''
])