diff --git a/src/modules/files/socktest.pike b/src/modules/files/socktest.pike index a2ffc67d7692c55312acffa6e5a20313d99c6e3f..bfee56ea42a228ae37b5e7195b2172322d4349d5 100755 --- a/src/modules/files/socktest.pike +++ b/src/modules/files/socktest.pike @@ -1,6 +1,6 @@ #!/usr/local/bin/pike -/* $Id: socktest.pike,v 1.13 1999/08/06 22:15:40 hubbe Exp $ */ +/* $Id: socktest.pike,v 1.14 2000/10/13 17:15:58 nilsson Exp $ */ import Stdio; @@ -125,12 +125,12 @@ void die() } int counter; - +int quiet; void got_callback() { counter++; - if(!(counter & 0xf)) + if(!quiet && !(counter & 0xf)) predef::write(sprintf("%c\b","|/-\\" [ (counter>>4) & 3 ])); remove_call_out(die); call_out(die,20); @@ -369,6 +369,12 @@ void accept_callback() int main() { + string testargs=getenv()->TESTARGS; + if(testargs && + (has_value(testargs/" ", "-q") || + has_value(testargs/" ", "-quiet") ) ) + quiet=1; + if(!port1::bind(0, accept_callback)) { werror("Bind failed. (%d)\n",port1::errno()); diff --git a/src/testsuite.in b/src/testsuite.in index a99680049abd3bde93db937e05fa5f7385d7c889..21ddbbd9a5adb75fe6f298c2663b4d6bf71bb279 100644 --- a/src/testsuite.in +++ b/src/testsuite.in @@ -1,4 +1,4 @@ -test_true([["$Id: testsuite.in,v 1.339 2000/10/02 10:28:15 grubba Exp $"]]); +test_true([["$Id: testsuite.in,v 1.340 2000/10/13 17:20:46 nilsson Exp $"]]); cond([[all_constants()->_verify_internals]], [[ @@ -631,6 +631,7 @@ int tests; #define indent(X) (X) int maxdepth; +int quiet; void low_generate(int depth, array(string) code, @@ -647,7 +648,8 @@ void low_generate(int depth, if(!(tests & 63)) { __signal_watchdog(); - werror("\r%d: %d ",maxdepth,tests); + if(!quiet) + werror("\r%d: %d ",maxdepth,tests); } string test=code*"\n"+"\n" @@ -709,6 +711,14 @@ void low_generate(int depth, int a() { werror("Testing vtables and scope access.\n"); + + string testargs=getenv()->TESTARGS; + if(testargs && + (has_value(testargs/" ", "-q") || + has_value(testargs/" ", "-quiet") ) ) + quiet=1; + return 1; + int total_tests; for(maxdepth=1;maxdepth<9 && !errors;maxdepth++) { @@ -716,7 +726,10 @@ int a() ({ "string X(){return \"X\";}" }), "X", "X",0); - werror("\r%d: %d\n",maxdepth,tests); + if(quiet) + werror("Maxdepth %d\n",maxdepth); + else + werror("\r%d: %d\n",maxdepth,tests); total_tests+=tests; tests=0; } @@ -2905,6 +2918,14 @@ test_any([[{ // }}), }); + int quiet; + string testargs=getenv()->TESTARGS; + if(testargs && + (has_value(testargs/" ", "-q") || + has_value(testargs/" ", "-quiet") ) ) + quiet=1; + return 1; + int test_failed = 0; for (int test = 0; test < sizeof (destruct_order_tests); test++) { [int nlive, int ndead, int nlnested, int ndnested, function(void:void) setup] = @@ -2913,7 +2934,8 @@ test_any([[{ array(int) idx = indices (allocate (objs)); int n = 1; for (int f = nlive + ndead; f > 1; f--) n *= f; - werror ("GC destruct order test %d, %d permutations \r", test, n); + if(!quiet) + werror ("GC destruct order test %d, %d permutations \r", test, n); while (n--) { array(int) alloc_order = Array.permute (idx, n); array(int) create_order = ({});