http://qs321.pair.com?node_id=1116659


in reply to make test hangs

Ignore "make test" for right now. Tests will run with perl or prove, so let's use them. I tried not to make it too complex but simple, the way you wrote it. Here's my version that I ran:
#!/usr/bin/perl BEGIN { $ENV{'HARNESS_ACTIVE'} = 1; $ENV{'HARNESS_VERBOSE'} = 1; } use strict; use warnings; use Test::More tests => 1; my $log_file = './test_log'; my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = localtime(time); my $timestamp = sprintf( "%4d-%02d-%02d %02d:%02d:%02d", $year + 1900, $mon + 1, $mday, $hour, $min, $sec ); open( OUT, '>', $log_file ) or die "Could not open OUT! $!\n"; binmode OUT, ":encoding(UTF-8)"; print OUT "### START################################################## +##\n"; print OUT "\t $timestamp \n"; ok 1, "running the test $0..."; print OUT "ok 1 - running the test $0"; close(OUT);
You'll notice that I used environmental variables. It sure makes things easier. I also used binmode. If I'm going to open a file, then I usually binmode it. Don't forget to close the file or filehandle.

Here's the result, using perl:

###START#################################################### 2015-02-13 11:44:06 ok 1 - running the test /root/Desktop/test_hangs.t.tdy
Here's the result, using prove
###START#################################################### 2015-02-13 11:22:31 ok 1 - running the test /root/Desktop/test_hangs.t
One last thing: Most of the tests that fail can be unhung by using your keyboard. You can use Esc, or Pause/Break. Give it try. It'll take some experimentation and some time. Be patient:). I usually use Num/Lock--Pause/Break--back arrow.