Roxen.git / server / etc / test / tests / pike_test_common.pike

version» Context lines:

Roxen.git/server/etc/test/tests/pike_test_common.pike:1:   int current_test, tests_failed;   int verbose;    + constant single_thread = 0; + // If this constant is set then the test will run in the backend + // thread while all handler threads are on hold (which implies the + // background_run queue is on hold as well). Otherwise tests are run + // in one handler thread while another one is free to execute + // background jobs right away. +    void create( int vb ) { verbose = vb; }         string describe_test (function|string cb, array args)   {    if (!stringp (cb)) {    object describer = master()->Describer();    return describer->describe (cb) +    "(" + describer->describe_comma_list (args, 512) + ")";    }
Roxen.git/server/etc/test/tests/pike_test_common.pike:77:   {    if (!stringp (err)) err = describe_backtrace (err);    if (has_suffix (err, "\n")) err = err[..<1];    return indent(2, err) + "\n";   }      void report_test_failure( mixed err,    function|string|array cb, array args, int st )   {    if( verbose ) -  report_debug(" FAILED\n"); +  report_debug(" ################ FAILED\n");    else {    if (arrayp (cb)) {    // Got line number info. -  report_debug (indent (2, sprintf ("%s:%d: FAILED", +  report_debug (indent (2, sprintf ("################ %s:%d: FAILED",    cb[0], cb[1])) + "\n" +    do_describe_error(describe_test (cb[2], args)));    }    else -  report_debug(do_describe_error(describe_test (cb, args) + " FAILED")); +  report_debug(indent (2, "################ " + +  describe_test (cb, args) + " FAILED\n"));    }       if( err )    report_debug( do_describe_error( err ) );    report_debug ("\n");    tests_failed++;   }         void report_test_ok( mixed err, function|string|array cb, array args, int st )
Roxen.git/server/etc/test/tests/pike_test_common.pike:322:      void run_tests( Configuration c );      void low_run_tests( Configuration c,    function go_on )   {    mixed err = catch {    run_tests( c );    };    if( err ) { -  write( describe_backtrace( err ) ); +  write( "################ " + describe_backtrace( err ) );    go_on (++current_test, ++tests_failed);    }    else    go_on (++current_test, tests_failed);   }