Skip to content

Commit dae6cd8

Browse files
xccov (#4)
1 parent 7db5818 commit dae6cd8

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

Makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ TARGET_NAME = SQLime
22
OUTPUD_DIR = ./Build
33
DERIVED_DATA_PATH = $(OUTPUD_DIR)/DerivedData
44

5-
.PHONY: clean test test-macos test-ios
5+
.PHONY: clean lint format test test-macos test-ios
66

77
clean:
88
swift package clean
@@ -21,13 +21,19 @@ format:
2121
test:
2222
swift test
2323

24+
test-macos: $(OUTPUD_DIR)/test-macos.xcresult
25+
test-ios: $(OUTPUD_DIR)/test-ios.xcresult
26+
2427
XCODEBUILD_TEST = xcodebuild test -quiet -scheme $(TARGET_NAME)
28+
XCCOV = xcrun xccov view --files-for-target $(TARGET_NAME)
2529

26-
test-macos:
27-
$(XCODEBUILD_TEST) -destination 'platform=macOS'
30+
$(OUTPUD_DIR)/test-macos.xcresult:
31+
$(XCODEBUILD_TEST) -destination 'platform=macOS' -resultBundlePath $@
32+
$(XCCOV) --report $@
2833

29-
test-ios:
30-
$(XCODEBUILD_TEST) -destination 'platform=iOS Simulator,name=iPhone 16'
34+
$(OUTPUD_DIR)/test-ios.xcresult:
35+
$(XCODEBUILD_TEST) -destination 'platform=iOS Simulator,name=iPhone 16' -resultBundlePath $@
36+
$(XCCOV) --report $@
3137

3238
# MARK: - DocC
3339

0 commit comments

Comments
 (0)