pike.git / bin / test_pike.pike

version» Context lines:

pike.git/bin/test_pike.pike:1:   #!/usr/local/bin/pike    - /* $Id: test_pike.pike,v 1.49 2000/07/17 14:53:08 grubba Exp $ */ + /* $Id: test_pike.pike,v 1.50 2000/07/26 16:56:42 nilsson Exp $ */      import Stdio;      #if !constant(_verify_internals)   #define _verify_internals()   #endif      #if !constant(_dmalloc_set_name)   void _dmalloc_set_name(mixed ... args) {}   #endif
pike.git/bin/test_pike.pike:118: Inside #if defined(WATCHDOG) and #if defined(WATCHDOG)
   watchdog->kill(signum("SIGQUIT"));   #endif    }   #endif   }   #endif      int main(int argc, array(string) argv)   {    int e, verbose, successes, errors, t, check; -  int skipped; +  int skipped, quiet;    array(string) tests;    string tmp;    program testprogram;    int start, fail, mem;    int loop=1;    int end=0x7fffffff;    string extra_info="";    int shift;      #if constant(signal) && constant(signum)
pike.git/bin/test_pike.pike:148:    array(string) args=backtrace()[0][3];    array(string) testsuites=({});    args=args[..sizeof(args)-1-argc];    add_constant("RUNPIKE",Array.map(args,Process.sh_quote)*" ");       foreach(Getopt.find_all_options(argv,aggregate(    ({"no-watchdog",Getopt.NO_ARG,({"--no-watchdog"})}),    ({"watchdog",Getopt.HAS_ARG,({"--watchdog"})}),    ({"help",Getopt.NO_ARG,({"-h","--help"})}),    ({"verbose",Getopt.MAY_HAVE_ARG,({"-v","--verbose"})}), +  ({"quiet",Getopt.NO_ARG,({"-q","--quiet"})}),    ({"start",Getopt.HAS_ARG,({"-s","--start-test"})}),    ({"end",Getopt.HAS_ARG,({"--end-after"})}),    ({"fail",Getopt.MAY_HAVE_ARG,({"-f","--fail"})}),    ({"loop",Getopt.MAY_HAVE_ARG,({"-l","--loop"})}),    ({"trace",Getopt.MAY_HAVE_ARG,({"-t","--trace"})}),    ({"check",Getopt.MAY_HAVE_ARG,({"-c","--check"})}),    ({"mem",Getopt.MAY_HAVE_ARG,({"-m","--mem","--memory"})}),    ({"auto",Getopt.MAY_HAVE_ARG,({"-a","--auto"})}), -  ({"notty",Getopt.NO_ARG,({"-t","--notty"})}), +  ({"notty",Getopt.NO_ARG,({"-T","--notty"})}),   #ifdef HAVE_DEBUG    ({"debug",Getopt.MAY_HAVE_ARG,({"-d","--debug"})}),   #endif    )),array opt)    {    switch(opt[0])    {    case "no-watchdog":    use_watchdog=0;    break;
pike.git/bin/test_pike.pike:249:       case "notty":    istty_cache=-1;    break;       case "help":    werror("Usage: "+argv[e]+" [-v | --verbose] [-h | --help] [-t <testno>] <testfile>\n");    return 0;       case "verbose": verbose+=foo(opt[1]); break; +  case "quiet": quiet=1; istty_cache=-1; break;    case "start": start=foo(opt[1]); start--; break;    case "end": end=foo(opt[1]); break;    case "fail": fail+=foo(opt[1]); break;    case "loop": loop+=foo(opt[1]); break;    case "trace": t+=foo(opt[1]); break;    case "check": check+=foo(opt[1]); break;    case "mem": mem+=foo(opt[1]); break;       case "auto":    testsuites=find_testsuites(".");
pike.git/bin/test_pike.pike:399:    skipped++;    skip=1;    }    }          if(istty())    {    if(!verbose)    werror("%6d\r",e+1); -  }else{ +  }else if(!quiet) {    /* Use + instead of . so that sendmail and    * cron will not cut us off... :(    */    switch( (e-start) % 50)    {    case 0:    werror("%5d: ",e);    break;       case 9:
pike.git/bin/test_pike.pike:658:    exit(1);       if(!--end) break;       a=b=0;    }       if(istty())    {    werror(" \r"); -  }else{ +  }else if(!quiet) {    werror("\n");    }    }    if(mem)    {    int total;    tests=0;    gc();    mapping tmp=_memory_usage();    write(sprintf("%-10s: %6s %10s\n","Category","num","bytes"));