github.com/xaionaro-go/rand@v0.0.0-20191005105903-aba1befc54a5/mathrand/Makefile (about)

     1  
     2  default:
     3  	echo 'no action'
     4  
     5  generate-report:
     6  	@echo '|func|passed|weak|failed|score|'
     7  	@echo '|----|------|----|------|-----|'
     8  	@bash -ec 'for FN in docs/dieharder-results/*.txt; do f="$${FN##*prngSample-}"; f="$${f%%.bin.txt}"; LINK="$$(grep -A 5 "$$f" *.go | grep "See also:" | awk -F "also: " "{print \$$2}" | head -1)"; if [ "$$LINK" = "" ]; then NAME="$$f"; else NAME="[$$f]($$LINK)"; fi; grep -E "(PASSED|WEAK|FAILED)" "$$FN" | awk -F "|" "{print \$$6}" | sort | uniq -c | awk "{if(\$$2==\"FAILED\"){failed=\$$1}; if(\$$2==\"PASSED\"){passed=\$$1}; if(\$$2==\"WEAK\"){weak=\$$1};} END {print \"|$$NAME|\"passed\"|\"weak\"|\"failed\"|[\"(passed + weak*0.5)\"](./$$FN)|\"}"; done'
     9  
    10  dieharder-tests:
    11  	go run ../internal/autogen/
    12  	go fmt ./...
    13  	go test ./...
    14  	bash -exc 'for f in /tmp/prngSample-*bin; do FNAME=docs/dieharder-results/"$$(basename $$f)".txt; if [ -f "$$FNAME" ]; then continue; fi; timeout 7200 dieharder -g 201 -f "$$f" -a > $$FNAME& done'