pike.git / lib / modules / testsuite.in

version» Context lines:

pike.git/lib/modules/testsuite.in:1: - dnl $Id: testsuite.in,v 1.37 2006/01/31 10:15:59 mast Exp $ + dnl $Id: testsuite.in,v 1.38 2007/10/06 16:23:39 grubba Exp $      START_MARKER      dnl - Array      test_equal(Array.diff(({ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }),    ({ 6, 7, 8, 9, 3, 4, 5, 1, 2, 0 })),    ({ ({ ({ 0, 1, 2, 3, 4, 5 }),    ({ 6, 7, 8, 9 }), ({}) }),    ({ ({}), ({ 6, 7, 8, 9 }),
pike.git/lib/modules/testsuite.in:734:    test_any([[    object o=Process.create_process(({"/bin/cat","/dev/null"}));    if(Process.create_process(({"/bin/cat","/dev/null"}))->wait()) return 99;    sleep(1);    return kill(o->pid(), 9);    ]],0);       dnl Some OSs have a delay before PIDs are reused.    dnl Be nice, and let them reuse some.    test_do([[ sleep(2); ]]); -  test_any([[ for(int x=0;x<10;x++) { for(int e=0;e<100;e++) if(Process.create_process(({"/bin/cat","/dev/null"}))->wait()) return e; __signal_watchdog(); } return -1;]],-1) +  test_any([[ + #ifdef DISABLE_SLOW_TESTS +  return -1; + #endif +  for(int x=0;x<10;x++) { for(int e=0;e<100;e++) if(Process.create_process(({"/bin/cat","/dev/null"}))->wait()) return e; __signal_watchdog(); } return -1;]],-1)   ]])      cond([[ file_stat("/bin/cat") && file_stat("/dev/null") && all_constants()->thread_create && (cpp("__NT__")/"\n")[1]=="__NT__" ]],   [[    test_any([[ -  + #ifdef DISABLE_SLOW_TESTS +  return ({}); + #endif    return allocate(10, thread_create) (    lambda() {    for (int x=0; x<10; x++) {    for (int e=0; e<50; e++)    if (Process.create_process(({"/bin/cat","/dev/null"}))->wait())    return e;    __signal_watchdog();    }    return -1;    }    )->wait() - ({-1})]],({}))   ]])      cond([[ file_stat("/bin/cat") && file_stat("/dev/null") && all_constants()->thread_create && (cpp("__NT__")/"\n")[1]=="__NT__" ]],   [[    test_do([[ -  + #ifdef DISABLE_SLOW_TESTS +  return 0; + #endif    for(int q=0;q<100;q++)    {    array fnord=({});    Thread.Fifo fifo=Thread.Fifo();       for(int e=0;e<10;e++)    {    fnord+=({ thread_create(lambda() {    Process.create_process(({"/bin/cat","/dev/null"}));    fifo->read();
pike.git/lib/modules/testsuite.in:784:    ]])   ]])      cond([[ file_stat("/bin/sleep") && all_constants()->thread_create && (cpp("__NT__")/"\n")[1]=="__NT__" ]],   [[   test_any([[    class Fnord    {   int gnapp(int t)   { + #ifdef DISABLE_SLOW_TESTS +  return -1; + #endif    int e;    for(e=0;e<7;e++)    {    for(int d=0;d<150;d++)    {    object o=Process.create_process(({"/bin/sleep","99999"}));    kill( o->pid(), 9 );    o->wait();    __signal_watchdog();    }