Author: idra Date: 2006-08-17 20:21:14 +0000 (Thu, 17 Aug 2006) New Revision: 17597
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17597 Log: fix prefix path handling Modified: branches/SAMBA_4_0/testprogs/ejs/ldb.js branches/SAMBA_4_0/testprogs/ejs/samba3sam.js Changeset: Modified: branches/SAMBA_4_0/testprogs/ejs/ldb.js =================================================================== --- branches/SAMBA_4_0/testprogs/ejs/ldb.js 2006-08-17 20:06:43 UTC (rev 17596) +++ branches/SAMBA_4_0/testprogs/ejs/ldb.js 2006-08-17 20:21:14 UTC (rev 17597) @@ -18,7 +18,7 @@ libinclude("base.js"); if (options.ARGV.length != 1) { - println("Usage: ldap.js <HOST>"); + println("Usage: ldb.js <prefix>"); return -1; } @@ -88,10 +88,10 @@ defaultNamingContext: cn=Test dn: @PARTITION -partition: cn=SideTest:" + prefix + "testside.ldb -partition: cn=Sub,cn=PartTest:" + prefix + "testsub.ldb -partition: cn=PartTest:" + prefix + "testpartition.ldb -partition: cn=Sub,cn=Sub,cn=PartTest:" + prefix + "testsubsub.ldb +partition: cn=SideTest:" + prefix + "/" + "testside.ldb +partition: cn=Sub,cn=PartTest:" + prefix + "/" + "testsub.ldb +partition: cn=PartTest:" + prefix + "/" + "testpartition.ldb +partition: cn=Sub,cn=Sub,cn=PartTest:" + prefix + "/" + "testsubsub.ldb replicateEntries: @SUBCLASSES replicateEntries: @ATTRIBUTES replicateEntries: @INDEXLIST @@ -349,31 +349,31 @@ sys = sys_init(); var dbfile = "test.ldb"; -sys.unlink(prefix + dbfile); -sys.unlink(prefix + "testpartition.ldb"); -sys.unlink(prefix + "testsub.ldb"); -sys.unlink(prefix + "testsubsub.ldb"); -sys.unlink(prefix + "testside.ldb"); +sys.unlink(prefix + "/" + dbfile); +sys.unlink(prefix + "/" + "testpartition.ldb"); +sys.unlink(prefix + "/" + "testsub.ldb"); +sys.unlink(prefix + "/" + "testsubsub.ldb"); +sys.unlink(prefix + "/" + "testside.ldb"); -var ok = ldb.connect("tdb://" + prefix + dbfile); +var ok = ldb.connect("tdb://" + prefix + "/" + dbfile); assert(ok); basic_tests(ldb); setup_modules(ldb); ldb = ldb_init(); -var ok = ldb.connect("tdb://" + prefix + dbfile); +var ok = ldb.connect("tdb://" + prefix + "/" + dbfile); assert(ok); parttestldb = ldb_init(); -var ok = parttestldb.connect("tdb://" + prefix + "testpartition.ldb"); +var ok = parttestldb.connect("tdb://" + prefix + "/" + "testpartition.ldb"); assert(ok); modules_test(ldb, parttestldb); -sys.unlink(prefix + dbfile); -sys.unlink(prefix + "testpartition.ldb"); -sys.unlink(prefix + "testsub.ldb"); -sys.unlink(prefix + "testsubsub.ldb"); -sys.unlink(prefix + "testside.ldb"); +sys.unlink(prefix + "/" + dbfile); +sys.unlink(prefix + "/" + "testpartition.ldb"); +sys.unlink(prefix + "/" + "testsub.ldb"); +sys.unlink(prefix + "/" + "testsubsub.ldb"); +sys.unlink(prefix + "/" + "testside.ldb"); return 0; Modified: branches/SAMBA_4_0/testprogs/ejs/samba3sam.js =================================================================== --- branches/SAMBA_4_0/testprogs/ejs/samba3sam.js 2006-08-17 20:06:43 UTC (rev 17596) +++ branches/SAMBA_4_0/testprogs/ejs/samba3sam.js 2006-08-17 20:21:14 UTC (rev 17597) @@ -27,7 +27,7 @@ datadir = options.ARGV[1]; function setup_modules(sys, ldb, from, to) { - var ldif = sys.file_load(datadir + "provision_samba3sam.ldif"); + var ldif = sys.file_load(datadir + "/" + "provision_samba3sam.ldif"); ldif = substitute_var(ldif, from); assert(ldif != undefined); var ok = ldb.add(ldif); @@ -52,7 +52,7 @@ } function setup_data(sys, ldb, remote) { - var ldif = sys.file_load(datadir + "samba3.ldif"); + var ldif = sys.file_load(datadir + "/" + "samba3.ldif"); ldif = substitute_var(ldif, remote); assert(ldif != undefined); var ok = ldb.add(ldif); @@ -216,16 +216,16 @@ } sys = sys_init(); -var ldbfile = prefix + "test.ldb"; +var ldbfile = prefix + "/" + "test.ldb"; var ldburl = "tdb://" + ldbfile; var samba4 = new Object("samba4 partition info"); -var samba4.FILE = prefix + "samba4.ldb"; +var samba4.FILE = prefix + "/" + "samba4.ldb"; var samba4.URL = "tdb://" + samba4.FILE; var samba4.BASEDN = "dc=vernstok,dc=nl"; var samba3 = new Object("samba3 partition info"); -var samba3.FILE = prefix + "samba3.ldb"; +var samba3.FILE = prefix + "/" + "samba3.ldb"; var samba3.URL = "tdb://" + samba3.FILE; var samba3.BASEDN = "cn=Samba3Sam," + samba4.BASEDN;