File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ BUILD_SDK = macosx
33BUILD_ARGUMENTS = -scheme SQLite -sdk $(BUILD_SDK )
44
55XCPRETTY := $(shell command -v xcpretty)
6+ SWIFTCOV := $(shell command -v swiftcov)
7+ GCOVR := $(shell command -v gcovr)
68
79default : test
810
1618 $(BUILD_TOOL) $(BUILD_ARGUMENTS) test
1719endif
1820
21+ coverage :
22+ ifdef SWIFTCOV
23+ $(SWIFTCOV) generate --output coverage \
24+ $(BUILD_TOOL) $(BUILD_ARGUMENTS) -configuration Release test \
25+ -- ./SQLite/*.swift
26+ ifdef GCOVR
27+ $(GCOVR) \
28+ --root . \
29+ --use-gcov-files \
30+ --html \
31+ --html-details \
32+ --output coverage/index.html \
33+ --keep
34+ else
35+ @echo gcovr must be installed for HTML output: https://github.com/gcovr/gcovr
36+ endif
37+ else
38+ @echo swiftcov must be installed for coverage: https://github.com/realm/SwiftCov
39+ @exit 1
40+ endif
41+
1942clean :
2043 $(BUILD_TOOL ) $(BUILD_ARGUMENTS ) clean
44+ rm -r coverage
2145
2246repl :
2347 @$(BUILD_TOOL ) $(BUILD_ARGUMENTS ) -derivedDataPath $(TMPDIR ) /SQLite.swift > /dev/null && \
2650sloc :
2751 @zsh -c " grep -vE '^ *//|^$$ ' SQLite/*.{swift,h,c} | wc -l"
2852
53+ .PHONY : test coverage clean repl sloc
You can’t perform that action at this time.
0 commit comments