Branch: Tag:

2004-07-15

2004-07-15 09:35:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

find_testsuites() is now somewhat more robust.

Rev: bin/test_pike.pike:1.102

1:   #! /usr/bin/env pike    - /* $Id: test_pike.pike,v 1.101 2004/05/23 01:57:36 nilsson Exp $ */ + /* $Id: test_pike.pike,v 1.102 2004/07/15 09:35:08 grubba Exp $ */      #if !constant(_verify_internals)   #define _verify_internals()
37:    return;   }    + void report_size() + { + #if 0 +  werror("\n"); +  Process.system(sprintf("/usr/proc/bin/pmap %d|tail -1", getpid())); + #endif + } +    array find_testsuites(string dir)   {    array(string) ret=({});
45:    if(has_value(s,"no_testsuites")) return ret;    foreach(s, string file)    { +  string name=combine_path(dir||"",file); +  if(Stdio.is_dir(name)) { +  ret+=find_testsuites(name); +  continue; +  }    switch(file)    {    case "testsuite":
52:    ret+=({ combine_path(dir||"",file) });    }    } -  -  foreach(s, string file) -  { -  string name=combine_path(dir||"",file); -  if(Stdio.is_dir(name)) -  ret+=find_testsuites(name); +     } -  } +     return ret;   }   
487:    {    signal_watchdog();    +  if (!((e-start) % 10)) +  report_size(); +     int skip=0, prev_errors = errors;    object o;    mixed a,b;
975:    }    }    } +  report_size();    if(mem)    {    int total;