From: Martin Mares Date: Sun, 25 May 2008 20:05:20 +0000 (+0200) Subject: mo-merge-tests removed X-Git-Tag: python-dummy-working~169 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=6a91ddfed026de3524b3de76af9c11bddd90b564;p=moe.git mo-merge-tests removed Merging is already handled by both mo-score and mo-report. --- diff --git a/mop/mo-merge-tests b/mop/mo-merge-tests deleted file mode 100755 index 03ef1ef..0000000 --- a/mop/mo-merge-tests +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/perl - -# This script recalculates points according to grouping of testcases. -# This is no longer necessary, because the score table and report generators -# already know how to handle merging of groups, but we still keep it as an example. - -@ARGV == 1 or die "Usage: mo-merge \n"; -my $task = $ARGV[0]; -foreach my $s (`ls -d testing/*/$task`) { - chomp $s; - if (! -s "$s/points.old") { - if (-s "$s/points") { - rename "$s/points", "$s/points.old" or die "Rename $s/points failed: $!"; - } else { - print "$s: NO POINTS?\n"; - next; - } - } - open X, "$s/points.old" or die; - my %tests = (); - my %cmts = (); - while () { - chomp; - my ($test, $subtest, $pts, $cmt) = /^(\d+)([a-z]*)\s+(\d+)\s*(.*)/ or die; - if (!exists($tests{$test}) || $tests{$test} > $pts) { - $tests{$test} = $pts; - $cmts{$test} = $cmt; - } - } - close X; - open X, ">$s/points" or die; - foreach my $test (sort { $a <=> $b } keys %tests) { - print X "$test $tests{$test} $cmts{$test}\n"; - } - close X; -}