summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-11 22:16:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:24 -0500
commit10b54fdb52ba2a55d0327eeee9c40a8748bce634 (patch)
tree9d0590fe9d95c63ee727a62d8bc4076aad3916f0 /source4
parentac3e41af378cc7a462b5731473909bca3c841d42 (diff)
downloadsamba-10b54fdb52ba2a55d0327eeee9c40a8748bce634.tar.gz
samba-10b54fdb52ba2a55d0327eeee9c40a8748bce634.tar.bz2
samba-10b54fdb52ba2a55d0327eeee9c40a8748bce634.zip
r18406: disable local iconv test as well when iconv:native=false
(This used to be commit 77e6a09e6b1a313db2bf289ac954fe4393b569fe)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/local/iconv.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/torture/local/iconv.c b/source4/torture/local/iconv.c
index bcda657da4..de48d52657 100644
--- a/source4/torture/local/iconv.c
+++ b/source4/torture/local/iconv.c
@@ -387,17 +387,23 @@ static BOOL test_random_5m(struct torture_context *test, const void *data)
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);