Skip to content

Commit

Permalink
Adding make lcov for Fortran unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Sep 28, 2017
1 parent 5f4b9d1 commit 3164365
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -25,4 +25,6 @@ tests/fortran/*.gcda
tests/fortran/*.gcno
tests/fortran/*.o
tests/fortran/*.mod
tests/fortran/coverage.info
tests/fortran/lcov-html/
tests/fortran/test-bin
13 changes: 12 additions & 1 deletion tests/fortran/Makefile
Expand Up @@ -49,11 +49,22 @@ $(CURR_DIR)/test-bin: $(F77_OBJS) $(F90_OBJS) $(TEST_OBJS) $(CURR_DIR)/test.f90
$(TEST_OBJS) \
$(CURR_DIR)/test.f90

lcov: $(CURR_DIR)/test-bin
$(CURR_DIR)/test-bin
lcov --capture \
--directory $(CURR_DIR) \
-output-file $(CURR_DIR)/coverage.info
genhtml \
$(CURR_DIR)/coverage.info \
--output-directory $(CURR_DIR)/lcov-html

clean:
rm -f $(CURR_DIR)/*.gcno
rm -f $(CURR_DIR)/*.gcda
rm -f $(CURR_DIR)/*.mod
rm -f $(CURR_DIR)/*$(OBJ)
rm -f $(CURR_DIR)/test-bin
rm -f $(CURR_DIR)/coverage.info
rm -fr $(CURR_DIR)/lcov-html

.PHONY: all test clean
.PHONY: test lcov clean

0 comments on commit 3164365

Please sign in to comment.