zephyr/scripts
Tristan Honscheid 4a8ffee1d8 twister: Don't run coverage report when --build-only is used
When doing a split build and test with coverage enabled, (i.e.
`twister --coverage --build-only` followed by `twister --coverage
--test-only`), Twister attempts to run coverage reports immediately
after building, which fails because tests haven't actually run yet
and causes several error messages to print in to the log.

This change causes twister to skip the call to `run_coverage()` if
`--build-only` is set and print an info message. This suppresses the
error messages from the coverage report tool complaining about missing
coverage files, but still instruments the built code for coverage data
collection. When twister is invoked again, but with `--test-only`
instead, the coverage files will be emitted and the reports
successfully generated.

 #### Testing

I ran...

```
$ zephyr/scripts/twister -T zephyr/tests/lib/cmsis_dsp/basicmath/
--coverage -p native_posix --build-only
$ zephyr/scripts/twister -T zephyr/tests/lib/cmsis_dsp/basicmath/
--coverage -p native_posix --test-only
```

... followed by a combined build and test ...

```
$ zephyr/scripts/twister -T zephyr/tests/lib/cmsis_dsp/basicmath/
--coverage -p native_posix
```

... as a control and diffed the HTML coverage reports, which were
identical other than a timestamp.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-07-28 05:58:52 -04:00
..
build scripts: move gen_cfb_font_header.py to scripts/build 2022-07-12 10:03:45 +02:00
checkpatch scripts: checkpatch: add Atmel Pwm typedef 2022-07-12 17:51:23 +02:00
ci ci: testplan: still run default tests with global changes 2022-07-22 11:00:23 -04:00
coccinelle everywhere: fix typos 2022-03-18 13:24:08 -04:00
coredump debug: coredump: add xtensa intel adsp, support toolchains 2022-06-23 15:44:45 -04:00
dts dts: Add simple script to generate Kconfig.dts based on bindings 2022-07-19 09:39:49 -07:00
footprint scripts: fpdiff: Initialise Colorama during start-up 2022-05-24 09:00:16 -07:00
gitlint scripts: gitlint: block Change-Id tags in commit message 2022-04-20 20:59:33 -04:00
kconfig kconfig: add support for warnings when enabling deprecated features 2022-07-15 09:53:08 -05:00
logging/dictionary scripts: dictionary: Initialise Colorama during module load 2022-05-24 09:00:16 -07:00
net net: scripts: Make test runner script fully generic 2020-11-20 16:07:59 +02:00
pylib/twister twister: verify all platform names 2022-07-26 20:42:20 -04:00
release scripts: release: list_backports: use older python dict merge method 2022-07-19 00:20:13 +09:00
schemas/twister twister: add support for platform_type filter 2022-05-14 14:49:59 -04:00
support
tests scripts: pylib: twister: twisterlib: fix typo 2022-07-19 11:41:54 -04:00
tracing scripts: tracing: Initialise Colorama during module load 2022-05-24 09:00:16 -07:00
utils scripts: utils: add include migration script 2022-05-11 10:55:35 +02:00
west_commands scripts: runners: improvements for spi_burn west runner 2022-07-19 12:23:47 +00:00
.gitignore
checkpatch.pl scripts: checkpatch: allow leading spaces in multi-lines macros 2022-06-17 10:18:37 +02:00
checkstack.pl First commit 2015-04-10 16:44:37 -07:00
coccicheck scripts: Allow use of bash outside of /bin 2022-03-08 11:11:10 +01:00
dump_bugs_pickle.py scripts: add dump_bugs_pickle.py 2022-06-03 19:19:25 -05:00
gen_gcov_files.py
get_maintainer.py scripts: get_maintainer: Use SafeLaoder for yaml 2022-04-13 13:48:18 -07:00
github_helpers.py scripts: add github_helpers.py 2022-05-24 18:48:03 +02:00
list_boards.py
make_bugs_pickle.py scripts: add make_bugs_pickle.py 2022-05-24 18:48:03 +02:00
requirements-base.txt requirements: bump pyelftools to >=0.27 2022-06-10 09:46:31 +02:00
requirements-build-test.txt
requirements-compliance.txt python: Fix the requirement for libmagic to be installed 2022-06-30 13:34:26 +02:00
requirements-doc.txt doc: enable sphinx-copybutton extension 2022-03-25 15:05:13 -07:00
requirements-extras.txt scripts: move gen_cfb_font_header.py to scripts/build 2022-07-12 10:03:45 +02:00
requirements-run-test.txt requirements: add netifaces, needed by adsp runner 2022-07-04 16:33:03 +02:00
requirements.txt
series-push-hook.sh
set_assignees.py scripts: set_assignee: handle exceptions 2022-07-18 21:41:22 -04:00
spelling.txt
tags.sh
twister twister: Don't run coverage report when --build-only is used 2022-07-28 05:58:52 -04:00
valgrind.supp
west-commands.yml
zephyr_module.py twister: Fix dependency on west when checking for projects 2022-05-09 13:48:17 -07:00