svn commit: samba r18406 - in branches/SAMBA_4_0/source/torture/local: .

tridge at samba.org tridge at samba.org
Mon Sep 11 22:16:48 GMT 2006


Author: tridge
Date: 2006-09-11 22:16:47 +0000 (Mon, 11 Sep 2006)
New Revision: 18406

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

Log:

disable local iconv test as well when iconv:native=false

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	2006-09-11 22:09:29 UTC (rev 18405)
+++ branches/SAMBA_4_0/source/torture/local/iconv.c	2006-09-11 22:16:47 UTC (rev 18406)
@@ -387,17 +387,23 @@
 struct torture_suite *torture_local_iconv(TALLOC_CTX *mem_ctx)
 {
 	static iconv_t cd;
-	struct torture_suite *suite = torture_suite_create(mem_ctx, "LOCAL-ICONV");
+	struct torture_suite *suite;
 
-    srandom(time(NULL));
+	if (!lp_parm_bool(-1, "iconv", "native", True)) {
+		printf("system iconv disabled - skipping test\n");
+		return NULL;
+	}
 
 	cd = iconv_open("UTF-16LE", "UCS-4LE");
 	if (cd == (iconv_t)-1) {
 		printf("unable to test - system iconv library does not support UTF-16LE -> UCS-4LE\n");
-		return suite;
+		return NULL;
 	}
 	iconv_close(cd);
 
+	suite = torture_suite_create(mem_ctx, "LOCAL-ICONV");
+	srandom(time(NULL));
+
 	torture_suite_add_simple_tcase(suite, "next_codepoint()",
 								   test_next_codepoint, NULL);
 



More information about the samba-cvs mailing list