summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Make.pkg3
-rw-r--r--src/pkg/Makefile12
2 files changed, 15 insertions, 0 deletions
diff --git a/src/Make.pkg b/src/Make.pkg
index d4196b6e8..3dd57b710 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 0caa0dd3f..4f001db85 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/*