pike.git / bin / test_pike.pike

version» Context lines:

pike.git/bin/test_pike.pike:1:   #! /usr/bin/env pike    - /* $Id: test_pike.pike,v 1.105 2004/08/31 15:54:22 grubba Exp $ */ + /* $Id: test_pike.pike,v 1.106 2004/10/22 13:10:01 grubba Exp $ */      #if !constant(_verify_internals)   #define _verify_internals()   #endif      #if !constant(_dmalloc_set_name)   void _dmalloc_set_name(mixed ... args) {}   #endif      int foo(string opt)
pike.git/bin/test_pike.pike:467:    string raw_results;    string results = lower_case(raw_results = p->read());    int err = pid->wait();    int total = 0;    int failed = 0;    int skip = 0;    if (((sscanf(results, "%*sfailed tests:%d", failed) != 2) +    (sscanf(results, "%*stotal tests:%d", total) != 2) +    (sscanf(results, "%*s(%d tests skipped)", skip) != 2)) == 3) {    // Failed to parse the result totally. -  werror("Failed to parse subresult for testsuite %O (exitcode:%d):\n" +  if (err == -1) { +  werror("Failed to parse subresult for testsuite %O " +  "(died of signal %d).\n" +  "%O", testsuite, pid->last_signal(), raw_results); +  } else { +  werror("Failed to parse subresult for testsuite %O " +  "(exitcode:%d):\n"    "%O", testsuite, err, raw_results); -  +  }    errors++;    } else {    werror("Subresult: %d tests, %d failed, %d skipped\n",    total, failed, skip);    errors += failed;    successes += total - failed;    skipped += skip; -  +  werror("Accumulated: %d tests, %d failed, %d skipped\n", +  successes + errors, errors, skipped);    }    if (fail && errors) {    exit(1);    }    }    } else {    testloop:    foreach(testsuites, string testsuite)    {    tests = read_tests( testsuite );