Author: metze
Date: 2005-06-09 08:12:20 +0000 (Thu, 09 Jun 2005)
New Revision: 7426

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7426

Log:
add an option to disable progress output

torture:progress=no

metze
Modified:
   branches/SAMBA_4_0/source/torture/local/iconv.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/local/iconv.c
===================================================================
--- branches/SAMBA_4_0/source/torture/local/iconv.c     2005-06-09 07:51:58 UTC 
(rev 7425)
+++ branches/SAMBA_4_0/source/torture/local/iconv.c     2005-06-09 08:12:20 UTC 
(rev 7426)
@@ -322,7 +322,9 @@
                }
 
                if (codepoint % 1000 == 0) {
-                       printf("codepoint=%u   \r", codepoint);
+                       if (!lp_parm_bool(-1, "torture", "progress", True)) {
+                               printf("codepoint=%u   \r", codepoint);
+                       }
                }
 
                ok = test_buffer(inbuf, size, "UTF-8");
@@ -332,7 +334,9 @@
        printf("Testing 5M random UTF-16LE sequences\n");
        for (i=0;ok && i<500000;i++) {
                if (i % 1000 == 0) {
-                       printf("i=%u              \r", i);
+                       if (!lp_parm_bool(-1, "torture", "progress", True)) {
+                               printf("i=%u              \r", i);
+                       }
                }
 
                size = random() % 100;

Reply via email to