From: Thomas Rast Date: Mon, 12 Mar 2012 15:10:05 GMT Subject: [PATCH 09/11] perf/run: allow skipping some revisions Message-ID: <20160e2ec785353a5e1203a7c769b0bc5881b83d.1331561353.git.trast@student.ethz.ch> In-Reply-To: You may want to compare two revisions/dirs A and B, but have already tested one of them, say A. './run A B' would re-run the tests for both, which is very time-consuming. You could invoke ./run B && ./aggregate.perl A B but that is tedious. Make it so that a ^ prefix means "aggregate this revision, but do not test it"; i.e., you can say ./run ^A B to achieve what you want. Signed-off-by: Thomas Rast --- t/perf/aggregate.perl | 1 + t/perf/run | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/t/perf/aggregate.perl b/t/perf/aggregate.perl index 4db685d..747f885 100755 --- a/t/perf/aggregate.perl +++ b/t/perf/aggregate.perl @@ -65,6 +65,7 @@ sub format_times { my $arg = $ARGV[0]; my $dir; last if -f $arg or $arg eq "--"; + $arg =~ s/^\^// if (! -d $arg); if (! -d $arg) { my $rev = Git::command_oneline(qw(rev-parse --verify), $arg."^{commit}"); $dir = "build/".$rev; diff --git a/t/perf/run b/t/perf/run index e4f9c22..bc66067 100755 --- a/t/perf/run +++ b/t/perf/run @@ -37,6 +37,11 @@ build_git_rev () { run_dirs_helper () { mydir=${1%/} + case "$mydir" in + ^*) + return + ;; + esac shift while test $# -gt 0 -a "$1" != -- -a ! -f "$1"; do shift -- 1.7.10.rc0.230.g16d90