Skip to content
Commit fae9923f authored by Yuval Peress's avatar Yuval Peress Committed by Anas Nashif
Browse files

unittest: update coverage library non gcc toolchains



When building with clang, the unittests were giving us an error:
```
error: undefined symbol: llvm_gcda_start_file
```

This seems to be from linking in `gcov` regardless of the toolchain.
It appears that clang doesn't need any special library for coverage.
With this change the following now produce identical coverage reports:

```
$ ZEPHYR_TOOLCHAIN_VARIANT=zephyr ./scripts/twister -p unit_testing \
  --coverage -i -T tests/unit/intmath/
$ ZEPHYR_TOOLCHAIN_VARIANT=host ./scripts/twister -p unit_testing \
  --coverage -i -T tests/unit/intmath/
$ ZEPHYR_TOOLCHAIN_VARIANT=llvm ./scripts/twister -p unit_testing \
  --coverage -i --coverage-tool lcov                              \
  --gcov-tool $(pwd)/scripts/utils/llvm-gcov.sh                   \
  -T tests/unit/intmath/
```

Signed-off-by: default avatarYuval Peress <peress@google.com>
parent 59f3316d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment