From: Adam Langley Date: Tue, 12 Jan 2010 23:43:20 +0000 (-0800) Subject: Add 'bench' target to makefiles. X-Git-Tag: weekly.2010-01-13~18 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=cbd3b2e8d594ac0298b32de111bf99319342c494;p=gostls13.git Add 'bench' target to makefiles. R=rsc, agl, r CC=golang-dev https://golang.org/cl/188043 --- diff --git a/src/Make.pkg b/src/Make.pkg index d4196b6e84..3dd57b7104 100644 --- a/src/Make.pkg +++ b/src/Make.pkg @@ -53,6 +53,9 @@ clean: test: $(QUOTED_GOBIN)/gotest +bench: + $(QUOTED_GOBIN)/gotest -benchmarks=. -match="Do not run tests" + nuke: clean rm -f $(pkgdir)/$(TARG).a diff --git a/src/pkg/Makefile b/src/pkg/Makefile index 0caa0dd3fd..4f001db855 100644 --- a/src/pkg/Makefile +++ b/src/pkg/Makefile @@ -134,13 +134,20 @@ NOTEST=\ testing/iotest\ xgb\ +NOBENCH=\ + container/vector\ + TEST=\ $(filter-out $(NOTEST),$(DIRS)) +BENCH=\ + $(filter-out $(NOBENCH),$(TEST)) + clean.dirs: $(addsuffix .clean, $(DIRS)) install.dirs: $(addsuffix .install, $(DIRS)) nuke.dirs: $(addsuffix .nuke, $(DIRS)) test.dirs: $(addsuffix .test, $(TEST)) +bench.dirs: $(addsuffix .bench, $(BENCH)) %.clean: +cd $* && $(QUOTED_GOBIN)/gomake clean @@ -154,12 +161,17 @@ test.dirs: $(addsuffix .test, $(TEST)) %.test: +cd $* && $(QUOTED_GOBIN)/gomake test +%.bench: + +cd $* && $(QUOTED_GOBIN)/gomake bench + clean: clean.dirs install: install.dirs test: test.dirs +bench: bench.dirs + nuke: nuke.dirs rm -rf "$(GOROOT)"/pkg/*