From 7693be8b921de9519b5e290294f72b0be571640d Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sat, 24 Aug 2013 10:38:48 -0700 Subject: Overhaul of partest-ack. Seems like many/most options to partest are broken. Working around as much as I can to make this thing useful again, plus lots of improvements in robustness. Spaces and such are preserved properly now, and I added a new way of selecting tests based on time. tools/partest-ack -s 1.week.ago % tests modified since time ... 66 tools/partest-ack 'case object (Foo|Bar)' % tests with matching paths ... 0 % tests with matching code ... 7 File paths and file contents are uniformly acked now, so for instance this works as expected. tools/partest-ack -i VIRTPAT % tests with matching paths ... 41 % tests with matching code ... 11 # 43 tests to run. --- tools/partest-ack | 158 +++++++++++++++++++++++++++--------------------------- 1 file changed, 79 insertions(+), 79 deletions(-) (limited to 'tools/partest-ack') diff --git a/tools/partest-ack b/tools/partest-ack index f7d5063292..551f92684f 100755 --- a/tools/partest-ack +++ b/tools/partest-ack @@ -2,18 +2,29 @@ # # wrapper around partest for fine-grained test selection via ack -declare quiet failed update partest_debug file_regex partest_args ack_args cotouched +declare quiet failed update partest_debug +declare cotouched since sortCommand +declare -a ack_args partest_args scalac_args + +base="$(cd "$(dirname "$0")"/.. && pwd)" +cd "$base" || { echo "Could not change to base directory $base" && exit 1; } +filesdir="test/files" +sortCommand="sort -u" + +# have to enumerate good test dirs since partest chokes and fails +# on continuations, bench, etc. tests +pathRegex="$filesdir/(pos|neg|jvm|run|scalap|presentation)/[^/.]+([.]scala)?\$" [[ $# -gt 0 ]] || { cat < [-dfquvp] [ack options] - -d pass --debug to partest -f pass --failed to partest - -q DON'T pass --show-log and --show-diff to partest + -q pass --terse to partest -u pass --update-check to partest - -v pass --verbose to partest -p select tests appearing in commits where was also modified + -s