[WinForms] Fix #18506 ActiveTracker, do not propagate message to control when it...
[mono-project.git] / mono / benchmark / test-driver
blob4f5ed6777e2e9c96fcd08744faaddc6f7fe05034
1 #!/usr/bin/perl -w
3 my $interpreter = shift;
4 my $test = shift;
5 my $output = $test;
6 my $stdout = $test.'.stdout';
7 my $stderr = $test.'.stderr';
9 $output =~ s/\.exe$/.output/;
11 $| = 0;
12 print "Testing $test... ";
14 for ($c = 20 - length ($test); $c > 0; $c--) { print " "; }
16 my $res = system("/usr/bin/time -o .res -f '%U' $interpreter @ARGV $test 2>/dev/null 1>$stdout");
18 if ($res) {
19 printf ("failed $? (%d) signal (%d).\n", $? >> 8, $? & 127);
20 exit (1);
21 } elsif (-f $output) {
22 print "failed output.\n" if (read_file ($output) ne read_file ($stdout));
23 exit (1);
24 } else {
25 $t = `cat .res`;
26 $t =~ s/\n//;
27 print "pass. $t\n";
28 #unlink ($result);
30 exit (0);
32 sub read_file {
33 local ($/);
34 my $out = shift;
35 open (F, "<$out") || die $!;
36 $out = <F>;
37 close(F);
38 return $out;