Adding a temporary workaround to keep template tests from borking on very large templates
authorChris Nighswonger <cnighswonger@foundations.edu>
Thu, 7 Oct 2010 03:31:57 +0000 (23:31 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Thu, 7 Oct 2010 11:07:50 +0000 (07:07 -0400)
NOTE: This should be properly fixed at some point in 3.4

This may help:

http://www.perlmonks.org/?node_id=150748

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

xt/author/valid-templates.t

index 95825a6..df7c515 100644 (file)
@@ -69,11 +69,14 @@ sub gen_template_test {
         my $pid = open3(\*CHILD_IN, \*CHILD_OUT, \*CHILD_ERR, 
                         "$FindBin::Bin/test_template.pl", $File::Find::name, $include_dir);
         my @errors = ();
+        while (<CHILD_OUT>) {
+            #FIXME: This is here just to ensure that STDOUT is read which avoids a deadlock in some instances, but probably not all
+            #FIXME: The real solution probably lies within the information found here: http://www.perlmonks.org/?node_id=150748
+        }
         while (<CHILD_ERR>) {
             push @errors, $_;
         }
         waitpid($pid, 0);
-
         @errors = grep { ! /^EXPR:.*non-initialized variable/ } @errors; # ignoring EXPR errors for now
         my $rel_filename = File::Spec->abs2rel($File::Find::name);
         ok(@errors == 0, "no errors in $rel_filename") or diag(join("", @errors) );