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.95 2004/04/23 15:17:22 grubba Exp $ */ + /* $Id: test_pike.pike,v 1.96 2004/04/23 15:20:22 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:397:    while(loop--)    {    successes=errors=0;    if (forked) {    array(string) args = ({ argv[0] });    if (!use_watchdog) args += ({ "--no-watchdog" });    if (!maybe_tty) args += ({ "--notty" });    if (verbose) args += ({ "--verbose=" + verbose });    if (prompt) args += ({ "--prompt=" + prompt });    if (start) args += ({ "--start-test=" + (start+1) }); +  // FIXME: end handling is not quite correct.    if (end != 0x7fffffff) args += ({ "--end-after=" + end });    if (fail) args += ({ "--fail" });    // forked is handled here.    // loop is handled here.    if (t) args += ({ "--trace=" + t });    if (check) args += ({ "--check=" + check });    if (asmdebug) args += ({ "--asm=" + asmdebug });    if (mem) args += ({ "--memory" });    // auto already handled.    if (all_constants()->regression) args += ({ "--regression" });
pike.git/bin/test_pike.pike:434:    werror("Failed to parse subresult for testsuite %O (exitcode:%d):\n"    "%s", 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;    } +  if (fail && errors) { +  exit(1);    } -  +  }    } else {    testloop:    foreach(testsuites, string testsuite)    {    tests = read_tests( testsuite );       werror("Doing tests in %s (%d tests)\n", testsuite, sizeof(tests));    int qmade, qskipped, qmadep, qskipp;       int testno, testline;
pike.git/bin/test_pike.pike:1026:    run.    3 Every test is printed out.    4 Time spent in individual tests are printed out.    10 The actual Pike code compiled, including wrappers, is    printed.   -p, --prompt The user will be asked before every test is run.   -sX, --start-test=X Where in the testsuite testing should start, e.g. ignores X    tests in every testsuite.   -eX, --end-after=X How many tests should be run.   -f, --fail If set, the test program exits on first failure. + -F, --forking If set, each testsuite will run in a separate process.   -lX, --loop=X The number of times the testsuite should be run. Default is    1.   -tX, --trace=X Run tests with trace level X.   -c[X], --check[=X] The level of extra Pike consistency checks performed.    1 _verify_internals is run before every test.    2 _verify_internals is run after every compilation.    3 _verify_internals is run after every test.    4 An extra gc and _verify_internals is run before    every test.    X<0 For values below zero, _verify_internals will be run    before every n:th test, where n=abs(X).   -m, --mem, --memory Print out memory allocations after the tests.   -a, --auto[=dir] Let the test program find the testsuits self.   -T, --notty Format output for non-tty.   -d, --debug Opens a debug port.   ";