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

2002-01-30 Thread Michael G Schwern

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 -  1.12
+++ lib/Parrot/Test.pm  30 Jan 2002 11:38:11 -
@@ -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   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
sort God kill 9, @ARGV;



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

2002-01-30 Thread Simon Cozens

begin quote from Michael G Schwern:
 This little patch makes command failures in tests (ie. if Parrot pukes
 on compile) report the command and exit code like so:

Thank you. This is quite wonderful.

-- 
I want you to know that I create nice things like this because it
pleases the Author of my story.  If this bothers you, then your notion
of Authorship needs some revision.  But you can use perl anyway. :-)
- Larry Wall