From: Moritz Bunkus Date: Tue, 30 Oct 2012 12:39:15 +0000 (+0100) Subject: Aufruf einzelner Test-Scripts via Test::Harness ermöglichen X-Git-Tag: release-3.0.0beta1~70 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=84826d21de00eb56c2bbd7a4369df453a6d30ecd;p=kivitendo-erp.git Aufruf einzelner Test-Scripts via Test::Harness ermöglichen Syntax ist trivialerweise: Um alle Tests auszuführen: ./t/test.sh Um nur bestimmte auszuführen: ./t/test.sh t/unicorns/charlie.t t/chunky/bacon.t --- diff --git a/t/test.sh b/t/test.sh index 761f9021f..f5b031a59 100755 --- a/t/test.sh +++ b/t/test.sh @@ -1 +1,9 @@ -find t | grep "\.t$" | grep -v '^t/old' | HARNESS_OPTIONS=j:c xargs perl -Imodules/override -MTest::Harness -e 'BEGIN { push @INC, "modules/fallback" } runtests(@ARGV)' +#!/bin/bash + +{ + if [[ -z $1 ]]; then + find t -type f -name '*.t' + else + echo -- "$@" + fi +} | HARNESS_OPTIONS=j:c xargs perl -Imodules/override -MTest::Harness -e 'BEGIN { push @INC, "modules/fallback" } runtests(@ARGV)'