mirror of
https://github.com/robertkrimen/otto
synced 2025-10-26 20:28:49 +08:00
Tidy tests (make release, make check, etc.)
This commit is contained in:
33
Makefile
33
Makefile
@@ -1,14 +1,16 @@
|
||||
.PHONY: test assets todo fixme otto run test-all release test-synopsis test-i test262 check
|
||||
.PHONY: assets todo fixme otto run test-all release test-synopsis test262
|
||||
.PHONY: test test-race test-check test-all
|
||||
.PHONY: underscore
|
||||
|
||||
TEST := -v --run
|
||||
TEST := .
|
||||
|
||||
test: test-i
|
||||
go test $(TEST)
|
||||
CHECK_GO := GOROOT= GOPATH=$(PWD)/.test/check/:$(GOPATH) $(HOME)/go/release/bin/go
|
||||
CHECK_OTTO := $(PWD)/.test/check/src/github.com/robertkrimen/otto
|
||||
|
||||
test-i:
|
||||
test:
|
||||
go test -i
|
||||
go test $(TEST)
|
||||
|
||||
assets:
|
||||
mkdir -p .assets
|
||||
@@ -26,17 +28,26 @@ otto:
|
||||
run:
|
||||
go run -a ./otto/main.go ./otto.js
|
||||
|
||||
test-all: test-i
|
||||
go test .
|
||||
test-all:
|
||||
go test -i
|
||||
go test
|
||||
|
||||
release: check test-all test-synopsis
|
||||
release: test-check test-race test-all test-synopsis
|
||||
for package in . underscore registry; do (cd $$package && godocdown --signature > README.markdown); done
|
||||
|
||||
check:
|
||||
GOROOT= $(HOME)/go/release/bin/go test -a .
|
||||
test-race:
|
||||
go test -race -i
|
||||
go test -race
|
||||
|
||||
test-synopsis: .test test-i otto
|
||||
$(MAKE) -C .test/synopsis
|
||||
test-check:
|
||||
@mkdir -p $(CHECK_OTTO)
|
||||
@find . -name \*.go ! -path ./.\* -maxdepth 2 | rsync -a --files-from - ./ $(CHECK_OTTO)/
|
||||
$(CHECK_GO) version
|
||||
$(CHECK_GO) test -i
|
||||
$(CHECK_GO) test
|
||||
|
||||
test-synopsis: .test otto
|
||||
$(MAKE) -C .test/synopsis 1>/dev/null
|
||||
|
||||
test262: .test
|
||||
$(MAKE) -C .test/test262 test
|
||||
|
||||
Reference in New Issue
Block a user