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.47 2000/07/26 20:32:41 nilsson Exp $ */ + /* $Id: test_pike.pike,v 1.48 2000/07/28 00:46:22 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:157:    ({"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:339:    {    werror("Failed to read test file, errno="+errno()+".\n");    exit(1);    }       tests=tmp/"\n....\n";    tmp=0;    tests=tests[0..sizeof(tests)-2];       werror("Doing tests in %s (%d tests)\n",argv[f],sizeof(tests)); +  int qmade, qskipped, qmadep, qskipp;       for(e=start;e<sizeof(tests);e++)    {    signal_watchdog();       int skip=0;    string test,condition;    string|int type;    object o;    mixed a,b;
pike.git/bin/test_pike.pike:391:    successes++;    skipped++;    skip=1;    }    }          if(istty())    {    werror("%6d\r",e+1); -  }else if(!quiet) { +  }else if(quiet){ +  if(skip) { +  if(qmade) werror(" Made %d test%s.\n", qmade, qmade==1?"":"s"); +  qmade=0; +  qskipp=1; +  qskipped++; +  } +  else { +  if(qskipped) werror(" Skipped %d test%s.\n", qskipped, qskipped==1?"":"s"); +  qskipped=0; +  qmadep=1; +  qmade++; +  } +  }else{    /* 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:630:    exit(1);       if(!--end) exit(0);       a=b=0;    }       if(istty())    {    werror(" \r"); -  }else if(!quiet) { +  }else if(quiet){ +  if(!qskipp && !qmadep); +  else if(!qskipp) werror("Made all tests\n"); +  else if(!qmadep) werror("Skipped all tests\n"); +  else if(qmade) werror(" Made %d test%s.\n", qmade, qmade==1?"":"s"); +  else if(qskipped) werror(" Skipped %d test%s.\n", qskipped, qskipped==1?"":"s"); +  }else{    werror("\n");    }    }    if(mem)    {    int total;    tests=0;    gc();    mapping tmp=_memory_usage();    write(sprintf("%-10s: %6s %10s\n","Category","num","bytes"));