Skip to content

Commit

Permalink
[#407] Combine make coverage and gcov
Browse files Browse the repository at this point in the history
  • Loading branch information
Donnie-Ice committed Dec 18, 2024
1 parent 89968e2 commit 83f3dea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ jobs:
run: make config
- name: build-test
run: make build-test
- name: make test-fsw
run: make coverage
- name: Generate Coverage Report
run: make gcov
- name: Upload coverage reports to Codecov
Expand Down
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ endif

# The "LOCALTGTS" defines the top-level targets that are implemented in this makefile
# Any other target may also be given, in that case it will simply be passed through.
LOCALTGTS := all checkout clean clean-fsw clean-sim clean-gsw config debug fsw gsw launch log prep sim stop stop-gsw uninstall
LOCALTGTS := all checkout clean clean-fsw clean-sim clean-gsw config debug fsw gcov gsw launch log prep sim stop stop-gsw uninstall
OTHERTGTS := $(filter-out $(LOCALTGTS),$(MAKECMDGOALS))

# As this makefile does not build any real files, treat everything as a PHONY target
Expand Down Expand Up @@ -104,21 +104,19 @@ clean-gsw:
config:
./scripts/cfg/config.sh

coverage:
cd $(FSWBUILDDIR)/amd64-posix/default_cpu1 && rm -r /__w/nos3/nos3/fsw/apps/io_lib

debug:
./scripts/debug.sh

fsw:
./cfg/build/fsw_build.sh

gcov:
rm -rf $(FSWBUILDDIR)/../apps/io_lib
mkdir -p coverage
apt update && apt install lcov -y
$(MAKE) test-fsw
echo "=================== GCOV ===================="
lcov -c --directory . --exclude ./fsw/apps/io_lib/ --output-file ${COVERAGEDIR}/coverage.info
lcov -c --directory . --output-file ${COVERAGEDIR}/coverage.info
genhtml ${COVERAGEDIR}/coverage.info --output-directory ${COVERAGEDIR}/results

gsw:
Expand Down

0 comments on commit 83f3dea

Please sign in to comment.