-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
24 lines (20 loc) · 1 KB
/
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
.PHONY: test fmt report download
# Runs the tests.
test:
go test -v -cover ./...
# Formats the code and runs the linter.
fmt:
go mod tidy
gofmt -s -w .
goarrange run -r .
golangci-lint run ./...
# Generates a test report for the W3C test suite.
report:
TEST_SUITE_REPORT=true go test ./...
# Downloads the latest test suite from the W3C website.
download:
rm ntriples/testdata/suite/* && curl -s -L https://www.w3.org/2013/N-TriplesTests/TESTS.tar.gz | tar xvz - -C ntriples/testdata/suite
rm nquads/testdata/suite/* && curl -s -L https://www.w3.org/2013/N-QuadsTests/TESTS.tar.gz | tar xvz - -C nquads/testdata/suite
rm turtle/testdata/suite/* && curl -s -L https://www.w3.org/2013/TurtleTests/TESTS.tar.gz | tar xvz - -C turtle/testdata/suite
mv turtle/testdata/suite/TurtleTests/* turtle/testdata/suite && rmdir turtle/testdata/suite/TurtleTests # move files up one level
rm trig/testdata/suite/* && curl -s -L https://www.w3.org/2013/TrigTests/TESTS.tar.gz | tar xvz - -C trig/testdata/suite