Lines Matching +full:files +full:- +full:exclude

3 # Copyright (c) 2018-2022 Intel Corporation
4 # SPDX-License-Identifier: Apache-2.0
72 hex_dump = sp[1][:-1]
100 # Iteratively call gcov-tool (not gcov) to merge the files
101 merge_tool = self.gcov_tool + '-tool'
102 for d1, d2 in zip(dirs[:-1], dirs[1:], strict=False):
103 cmd = [merge_tool, 'merge', d1, d2, '--output', d2]
107 with open(f'{dirs[-1]}/tmp.gcda', 'rb') as fp:
108 return fp.read(-1).hex()
112 logger.debug("Generating gcda files")
117 filename = (filename[:-4]) + "gcno"
199 ['lcov', '--version'],
228 # The --ignore-errors source option is added for genhtml as well as
232 "--ignore-errors", "inconsistent,inconsistent",
233 "--ignore-errors", "negative,negative",
234 "--ignore-errors", "unused,unused",
235 "--ignore-errors", "empty,empty",
236 "--ignore-errors", "mismatch,mismatch",
247 # Default: --parallel=0 will autodetect appropriate parallelism
248 parallel = ["--parallel", "0"]
253 parallel = ["--parallel", str(self.jobs)]
259 "lcov", "--gcov-tool", self.gcov_tool,
260 "--rc", branch_coverage,
268 cmd = ["--capture", "--directory", outdir, "--output-file", coveragefile]
272 cmd = ["--extract", coveragefile,
274 "--output-file", ztestfile]
278 cmd = ["--remove", ztestfile,
280 "--output-file", ztestfile]
283 files = [coveragefile, ztestfile]
285 files = [coveragefile]
288 cmd = ["--remove", coveragefile, i, "--output-file", coveragefile]
294 cmd = ["genhtml", "--legend", "--branch-coverage",
295 "--prefix", self.base_dir,
296 "-output-directory", os.path.join(outdir, "coverage")] + files
312 ['gcovr', '--version'],
350 excludes = Gcovr._interleave_list("-e", self.ignores)
354 excludes += ["--exclude-branches-by-pattern", merged_regex]
356 # Different ifdef-ed implementations of the same function should not be
358 mode_options = ["--merge-mode-functions=separate"]
361 cmd = ["gcovr", "-r", self.base_dir,
362 "--gcov-ignore-parse-errors=negative_hits.warn_once_per_file",
363 "--gcov-executable", self.gcov_tool,
364 "-e", "tests/*"]
365 cmd += excludes + mode_options + ["--json", "-o", coveragefile, outdir]
370 subprocess.call(["gcovr", "-r", self.base_dir, "--gcov-executable",
371 self.gcov_tool, "-f", "tests/ztest", "-e",
372 "tests/ztest/test/*", "--json", "-o", ztestfile,
376 files = [coveragefile, ztestfile]
378 files = [coveragefile]
383 tracefiles = self._interleave_list("--add-tracefile", files)
385 # Convert command line argument (comma-separated list) to gcovr flags
387 "html": ["--html", os.path.join(subdir, "index.html"), "--html-details"],
388 "xml": ["--xml", os.path.join(subdir, "coverage.xml"), "--xml-pretty"],
389 "csv": ["--csv", os.path.join(subdir, "coverage.csv")],
390 "txt": ["--txt", os.path.join(subdir, "coverage.txt")],
391 "coveralls": ["--coveralls", os.path.join(subdir, "coverage.coveralls.json"),
392 "--coveralls-pretty"],
393 "sonarqube": ["--sonarqube", os.path.join(subdir, "coverage.sonarqube.xml")]
400 ["gcovr", "-r", self.base_dir] \
417 "x86_64-zephyr-elf/bin/x86_64-zephyr-elf-gcov")
422 llvm_cov = shutil.which("llvm-cov", path=llvm_path)
436 "Can't find a suitable gcov tool. Use --gcov-tool or set ZEPHYR_SDK_INSTALL_DIR."
442 logger.info("Generating coverage files...")