-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (28 loc) · 1.12 KB
/
Makefile
File metadata and controls
40 lines (28 loc) · 1.12 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
PRNGS := mt19937 splitmix64 xorshift128plus xorshift1024star xoroshiro128plus
PRNGS_LONG := $(addsuffix -long, $(PRNGS))
PRNGS_COVERAGE := $(addsuffix -coverage, $(PRNGS))
DISTRIBUTIONS := uniform normal lognormal cauchy
DISTRIBUTIONS_COVERAGE := $(addsuffix -coverage, $(DISTRIBUTIONS))
default: test
test:
go test -race -cover -covermode=atomic -v ./...
$(PRNGS):
go test -race -cover -covermode=atomic -v ./prng/$@
$(PRNGS_LONG):
go test -race -cover -covermode=atomic -v ./prng/$(patsubst %-long,%,$@) -long -timeout 1h
$(PRNGS_COVERAGE):
$(eval package := $(patsubst %-coverage,%,$@))
go test -race -covermode=atomic -coverprofile=$(package).out -v ./prng/$(package)
go tool cover -html=$(package).out -o $(package).html
open $(package).html
$(DISTRIBUTIONS):
go test -race -cover -covermode=atomic -v ./distribution/$@
$(DISTRIBUTIONS_COVERAGE):
$(eval package := $(patsubst %-coverage,%,$@))
go test -race -covermode=atomic -coverprofile=$(package).out -v ./distribution/$(package)
go tool cover -html=$(package).out -o $(package).html
open $(package).html
clean:
rm *.out *.html
bench:
go test -bench=. ./...