Branch: Tag:

2002-10-01

2002-10-01 21:28:44 by Martin Nilsson <mani@lysator.liu.se>

There is always signum; Updated #ifs. Fixed a verbosity level bug.

Rev: bin/test_pike.pike:1.72

1:   #!/usr/local/bin/pike    - /* $Id: test_pike.pike,v 1.71 2002/08/20 23:07:33 nilsson Exp $ */ + /* $Id: test_pike.pike,v 1.72 2002/10/01 21:28:44 nilsson Exp $ */      import Stdio;   
122:   #define WATCHDOG_PIPE   object watchdog_pipe;   #else - #if constant(signal) && constant(signum) + #if constant(kill)   #define WATCHDOG   #define WATCHDOG_SIGNAL   #endif
165: Inside #if defined(WATCHDOG) and #if defined(WATCHDOG_PIPE)
   }    exit_quietly=1;    }); - #endif + #endif // WATCHDOG_PIPE      #ifdef WATCHDOG_SIGNAL    werror("Setting signal (1)\n");
180: Inside #if defined(WATCHDOG) and #if defined(WATCHDOG_SIGNAL)
   else {    exit(1);    } - #endif + #endif // WATCHDOG_SIGNAL       while(1)    {
216:    }   #else    _exit(1); - #endif + #endif // else WATCHDOG   }      //
235:    string extra_info="";    int shift;    - #if constant(signal) && constant(signum) +     if(signum("SIGQUIT")>=0)    {    signal(signum("SIGQUIT"),lambda()
254: Inside #if constant(signal) && constant(signum)
   }    });    } - #endif +        array(string) args=backtrace()[0][3];    array(string) testsuites=({});    args=args[..sizeof(args)-1-argc]; -  add_constant("RUNPIKE",Array.map(args,Process.sh_quote)*" "); +  add_constant("RUNPIKE", map(args, Process.sh_quote)*" ");       foreach(Getopt.find_all_options(argv,aggregate(    ({"no-watchdog",Getopt.NO_ARG,({"--no-watchdog"})}),
367:    add_constant("__signal_watchdog",signal_watchdog);   #else    add_constant("__signal_watchdog",lambda(){}); - #endif + #endif // else WATCHDOG_PIPE       testsuites += Getopt.get_args(argv, 1)[1..];    if(!sizeof(testsuites))
457:    string pad_on_error = "\n";    if(istty())    { -  if(!verbose) { +  if(verbose<2) {    werror("test %d, line %d\r", e+1, testline);    pad_on_error = " \r";    }
871: Inside #if defined(WATCHDOG_PIPE)
   if(use_watchdog)    {    destruct(watchdog_pipe); - #if constant(signum) +     catch { watchdog->kill(signum("SIGKILL")); }; - #endif +     watchdog->wait();    }   #endif