From 4513eaea71d7fde16a91be86a134d50411cbfa86 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Tue, 27 Oct 2015 09:46:51 +0200 Subject: [PATCH] 'make perf': New target. --- Makefile | 11 +++++++++++ tests/README.md | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/Makefile b/Makefile index 8a14bd2..cc4e57b 100644 --- a/Makefile +++ b/Makefile @@ -29,4 +29,15 @@ test: done | $(ZSH) -f tests/tap-colorizer.zsh; \ exit $$result +perf: + @result=0; \ + for test in highlighters/*; do \ + if [ -d $$test/test-data ]; then \ + echo "Running test $${test##*/}"; \ + $(ZSH) -f tests/test-perfs.zsh "$${test##*/}"; \ + : $$(( result |= $$? )); \ + fi \ + done; \ + exit $$result + .PHONY: all install test diff --git a/tests/README.md b/tests/README.md index 15aacd8..e82a64b 100644 --- a/tests/README.md +++ b/tests/README.md @@ -32,3 +32,7 @@ performance test [`test-perfs.zsh`](tests/test-perfs.zsh) measures the time spent doing the highlighting. Usage: zsh test-perfs.zsh + +All tests may be run with + + make perf