coverage: use "cd" with gcovr (#10594)

This makes the invocation compatible for the upcoming gcovr 4.2 release,
and is the correct way of invoking it.

Ref: https://github.com/gcovr/gcovr/commit/a782972#commitcomment-34420728
This commit is contained in:
Daniel Hahler 2019-07-25 01:11:17 +02:00 committed by GitHub
parent b8fcf62da9
commit d1faf900b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,10 @@ if ! [ -f "$codecov_sh" ]; then
python3 -m pip install --quiet --user gcovr
fi
python3 -m gcovr --branches --exclude-unreachable-branches --print-summary -j 2 --exclude '.*/auto/.*' --root build --delete -o coverage.xml --xml
(
cd build
python3 -m gcovr --branches --exclude-unreachable-branches --print-summary -j 2 --exclude '.*/auto/.*' --root .. --delete -o ../coverage.xml --xml
)
# Upload to codecov.
# -X gcov: disable gcov, done manually above.