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
3
3
BUILD_ARGUMENTS = -scheme SQLite -sdk $(BUILD_SDK )
4
4
5
5
XCPRETTY := $(shell command -v xcpretty)
6
+ SWIFTCOV := $(shell command -v swiftcov)
7
+ GCOVR := $(shell command -v gcovr)
6
8
7
9
default : test
8
10
16
18
$(BUILD_TOOL) $(BUILD_ARGUMENTS) test
17
19
endif
18
20
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
+
19
42
clean :
20
43
$(BUILD_TOOL ) $(BUILD_ARGUMENTS ) clean
44
+ rm -r coverage
21
45
22
46
repl :
23
47
@$(BUILD_TOOL ) $(BUILD_ARGUMENTS ) -derivedDataPath $(TMPDIR ) /SQLite.swift > /dev/null && \
26
50
sloc :
27
51
@zsh -c " grep -vE '^ *//|^$$ ' SQLite/*.{swift,h,c} | wc -l"
28
52
53
+ .PHONY : test coverage clean repl sloc
You can’t perform that action at this time.
0 commit comments