From: David Bremner Date: Mon, 3 Dec 2012 23:56:20 +0000 (-0400) Subject: perf-test: add argument parsing for performance tests X-Git-Tag: 0.15_rc1~98 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e7c661d31a23d1f711a84e6eca85eea9b67f11fe;p=notmuch.git perf-test: add argument parsing for performance tests This patch just sets (non-exported) variables. The variable $debug is already used, and $corpus_size will be used in following commits. --- diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test-lib.sh index fb15028f..3a4a23dc 100644 --- a/performance-test/perf-test-lib.sh +++ b/performance-test/perf-test-lib.sh @@ -1,5 +1,30 @@ . ./version.sh +corpus_size=large + +while test "$#" -ne 0 +do + case "$1" in + -d|--debug) + debug=t; + shift + ;; + -s|--small) + corpus_size=small; + shift + ;; + -m|--medium) + corpus_size=medium; + shift + ;; + -l|--large) + corpus_size=large; + shift + ;; + *) + echo "error: unknown performance test option '$1'" >&2; exit 1 ;; + esac +done . ../test/test-lib-common.sh set -e