in reply to make test hangs

The test script ran fine for me (on Windows) as
dmake test TEST_VERBOSE=1
I can't see any reason that it shouldn't do the same on other systems but I didn't actually test.

One thing that might help isolate the cause is to insert some warnings at various points inside the script and see if any of them are output before the hang starts:
#!perl -w use strict; warn "\nstrict.pm loaded\n"; my $LOG; my $LOG_FILE = './test_log'; warn "\nvariables declared\n"; .... and so on
What happens if you don't set verbosity ?
Do you get the same problem with other modules ?
What else is in the /tmp/DBI-1.633 folder ?

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: make test hangs
by WolliK (Acolyte) on Feb 13, 2015 at 08:29 UTC

    Hi Rob,

    like i mentioned when I posted this question any output of the script itself is discharged by the TEST::HARNESS module!.
    So also the warnings!
    Thats is why I output to a log and write some informations to check if the script runs.
    It looks that is runs o.k, but I have no idea if it exits or not. When it does not exit the pove or TEST::HARNESS can not proceed and will hang.
    I need to understand who the control gets back to the module that calls my script when I do either a prove or a make test.
    WolliK

Re^2: make test hangs
by WolliK (Acolyte) on Feb 13, 2015 at 08:31 UTC

    Hi Rob,
    the situation is the same either with or without the TEST_VERBOSE option is set.
    WolliK

      I put your 00_simple_test.t script into t directory on my Ubuntu and running "prove -v" did not hang. Could you, please, try to put the following into 00_simple_test.t and post the results of prove -v?
      #!/usr/bin/perl -w use strict; use Test::More qw( no_plan ); ok(1);
      Next, if you insist on using "make test" for your testing, could you please post the Makefile as choroba has requested? Thanks!

        Hi,
        I got the same hang where I have to use the break key to get my shell back even if I'm using TEST::MORE like you mentioned. Here is how my script looks and what was logged during my tests:

        /tmp/DBI-1.633> /tmp/DBI-1.633>cat t/00simple_test.t #!perl -w use strict; my $LOG; my $LOG_FILE = './test_log'; open ($LOG, '>>', $LOG_FILE ) or die "Could not open the file $LOG_FILE!\n$!\n"; print $LOG "###################################\n"; print $LOG "Step_00: (START of script:$0)\n"; print "ok 1 - running the test $0\n"; print $LOG "Step_01:\n"; 1; print $LOG "Step_02:\n"; use Test::More qw( no_plan ); print $LOG "Step_03:\n"; ok(1); print $LOG "Step_04: (END of scrit:$0)\n"; /tmp/DBI-1.633> /tmp/DBI-1.633>rm test_log /tmp/DBI-1.633> /tmp/DBI-1.633> /tmp/DBI-1.633>perl t/00simple_test.t ok 1 - running the test t/00simple_test.t ok 1 1..1 /tmp/DBI-1.633>cat test_log ################################### Step_00: (START of script:t/00simple_test.t) Step_01: Step_02: Step_03: Step_04: (END of scrit:t/00simple_test.t) /tmp/DBI-1.633>prove -v t/00simple_test.t t/00simple_test.t .. /tmp/DBI-1.633>cat test_log ################################### Step_00: (START of script:t/00simple_test.t) Step_01: Step_02: Step_03: Step_04: (END of scrit:t/00simple_test.t) ################################### Step_00: (START of script:t/00simple_test.t) Step_01: Step_02: Step_03: Step_04: (END of scrit:t/00simple_test.t) /tmp/DBI-1.633> /tmp/DBI-1.633> /tmp/DBI-1.633>make test t/00simple_test.t PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::H +arness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/l +ib', 'blib/arch')" t/*.t t/00simple_test.t ............... make: *** [test_dynamic] Interrupt /tmp/DBI-1.633> /tmp/DBI-1.633> /tmp/DBI-1.633>cat tes_log cat: tes_log: No such file or directory /tmp/DBI-1.633>cat test_log ################################### Step_00: (START of script:t/00simple_test.t) Step_01: Step_02: Step_03: Step_04: (END of scrit:t/00simple_test.t) ################################### Step_00: (START of script:t/00simple_test.t) Step_01: Step_02: Step_03: Step_04: (END of scrit:t/00simple_test.t) ################################### Step_00: (START of script:t/00simple_test.t) Step_01: Step_02: Step_03: Step_04: (END of scrit:t/00simple_test.t) /tmp/DBI-1.633>

        So it looks that it's not a aproblem with the script it is the procedured how the script will be called and how the control will be given back to the calling module.
        wollik