On Thu, May 04, 2006 at 05:54:57PM -0400, Randy W. Sims wrote:
> Steve Peters wrote:
> >>Change 28045 by [EMAIL PROTECTED] on 2006/05/02 02:47:43
> >>
> >>    Escape prompts with #'s to avoid causing tests to fail from
> >>    the unexpected output.
> >>
> >
> >Since the above change there's been no change in the results, and, for 
> >me at least, no change in my inability to replicate this problem.  
> >Interestingly enough, this error didn't occur with my Linux icc smoke.
> >
> >Is anyone else able to replicate this problem at all?
> 
> Sorry, I've been away from my email for the last couple of days, and I 
> haven't been watching the smokes. I'll try to take a look at this 
> tonight and see if I can reproduce it on any of my other systems (I 
> didn't see it when testing on Ubuntu linux).
> 

I just figured out the problem a few moments ago and have committed the 
fix to bleadperl.  The problem was that the test depended on STDIN 
input, but when running a smoke through cron, STDIN is closed.  The 
change skips the failing tests if "fileno(STDIN)" returns undef.

Can you all please apply this patch back to Module::Build?

Thanks,

Steve Peters
[EMAIL PROTECTED]

Change 28108 by [EMAIL PROTECTED] on 2006/05/05 16:26:48

        These Module::Build tests depended on STDIN.  Unfortunately, 
cron
        closes STDIN, so these build failures were only seen while 
        running smokes through cron.

Affected files ...

... //depot/perl/lib/Module/Build/t/extend.t#4 edit

Differences ...

==== //depot/perl/lib/Module/Build/t/extend.t#4 (text) ====

@@ -227,38 +227,41 @@
   eval{ $mb->y_n('Prompt?', 'invalid default') };
   like $@, qr/Invalid default/, "y_n() requires a default of 'y' or 
'n'";
 
+  SKIP:{
 
-  $ENV{PERL_MM_USE_DEFAULT} = 1;
+    skip "No available STDIN", 7 unless -t STDIN;
 
-  eval{ $mb->y_n("# Is this a question?") };
-  like $@, qr/ERROR:/, 'Do not allow default-less y_n() for unattended 
builds';
+    $ENV{PERL_MM_USE_DEFAULT} = 1;
 
-  eval{ $ans = $mb->prompt('# Is this a question?') };
-  like $@, qr/ERROR:/, 'Do not allow default-less prompt() for 
unattended builds';
+    eval{ $mb->y_n("# Is this a question?") };
+    like $@, qr/ERROR:/, 'Do not allow default-less y_n() for 
unattended builds';
 
+    eval{ $ans = $mb->prompt('# Is this a question?') };
+    like $@, qr/ERROR:/, 'Do not allow default-less prompt() for 
unattended builds';
 
-  $ENV{PERL_MM_USE_DEFAULT} = 0;
+    $ENV{PERL_MM_USE_DEFAULT} = 0;
 
-  $ans = $mb->prompt('# Is this a question?');
-  print "\n"; # fake <enter> after input
-  is $ans, 'y', "prompt() doesn't require default for interactive 
builds";
+    $ans = $mb->prompt('# Is this a question?');
+    print "\n"; # fake <enter> after input
+    is $ans, 'y', "prompt() doesn't require default for interactive 
builds";
 
-  $ans = $mb->y_n('# Say yes');
-  print "\n"; # fake <enter> after input
-  ok $ans, "y_n() doesn't require default for interactive build";
+    $ans = $mb->y_n('# Say yes');
+    print "\n"; # fake <enter> after input
+    ok $ans, "y_n() doesn't require default for interactive build";
 
 
-  # Test Defaults
-  *{Module::Build::_readline} = sub { '' };
+    # Test Defaults
+    *{Module::Build::_readline} = sub { '' };
 
-  $ans = $mb->prompt("# Is this a question");
-  is $ans, '', "default for prompt() without a default is ''";
+    $ans = $mb->prompt("# Is this a question");
+    is $ans, '', "default for prompt() without a default is ''";
 
-  $ans = $mb->prompt("# Is this a question", 'y');
-  is $ans, 'y', "  prompt() with a default";
+    $ans = $mb->prompt("# Is this a question", 'y');
+    is $ans, 'y', "  prompt() with a default";
 
-  $ans = $mb->y_n("# Is this a question", 'y');
-  ok $ans, "  y_n() with a default";
+    $ans = $mb->y_n("# Is this a question", 'y');
+    ok $ans, "  y_n() with a default";
+  }
 }
 
 # cleanup

Attachment: signature.asc
Description: Digital signature

Reply via email to