forked from pointfreeco/swift-issue-reporting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
25 lines (22 loc) · 646 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
PASS = \033[1;7;32m PASS \033[0m
FAIL = \033[1;7;31m FAIL \033[0m
XCT_FAIL = \033[34mXCTFail\033[0m
EXPECTED_STRING = This is expected to fail!
EXPECTED = \033[31m\"$(EXPECTED_STRING)\"\033[0m
test:
@swift test --enable-test-discovery 2>&1 | grep '$(EXPECTED_STRING)' > /dev/null \
&& (echo "$(PASS) $(XCT_FAIL) was called with $(EXPECTED)" && exit) \
|| (echo "$(FAIL) expected $(XCT_FAIL) to be called with $(EXPECTED)" >&2 && exit 1)
test-linux:
@docker run \
--rm \
-v "$(PWD):$(PWD)" \
-w "$(PWD)" \
swift:5.3 \
bash -c "make test"
format:
@swift format \
--ignore-unparsable-files \
--in-place \
--recursive \
.