develooper Front page | perl.perl6.internals | Postings from January 2002

[PATCH lib/Parrot/Test.pm] More info about failed compiles

Thread Next
From:
Michael G Schwern
Date:
January 30, 2002 03:38
Subject:
[PATCH lib/Parrot/Test.pm] More info about failed compiles
Message ID:
20020130113805.GA1940@blackrider
This little patch makes command failures in tests (ie. if Parrot pukes
on compile) report the command and exit code like so:

# 'perl assemble.pl t/op/basic2.pasm --output t/op/basic2.pbc' failed with exit code 1

I don't know if that's informative enough, but its a start anyway.


--- lib/Parrot/Test.pm	29 Jan 2002 02:32:15 -0000	1.12
+++ lib/Parrot/Test.pm	30 Jan 2002 11:38:11 -0000
@@ -37,6 +37,8 @@
   }
 
   system "$^X -e \"$redir_string;system q{$command};\"";
+  my $exit_code = $? / 256;
+  $Builder->diag("'$command' failed with exit code $exit_code") if $exit_code;
 }
 
 my $count;


-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Perl Quality Assurance	    <perl-qa@perl.org>	       Kwalitee Is Job One
sort God kill 9, @ARGV;

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About