summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-08-17 20:21:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:15 -0500
commit45719b6c80472972d43e9efd64d879448649d225 (patch)
tree9626493a5ebd8d6a0b4eb1b0722e8587522672b1
parentf41fc00624df538c3ee719260a317440550ed4a1 (diff)
downloadsamba-45719b6c80472972d43e9efd64d879448649d225.tar.gz
samba-45719b6c80472972d43e9efd64d879448649d225.tar.bz2
samba-45719b6c80472972d43e9efd64d879448649d225.zip
r17597: fix prefix path handling
(This used to be commit 25cde0f7300f37fec6c4a897ba0a80a3e5c26e15)
-rwxr-xr-xtestprogs/ejs/ldb.js36
-rwxr-xr-xtestprogs/ejs/samba3sam.js10
2 files changed, 23 insertions, 23 deletions
diff --git a/testprogs/ejs/ldb.js b/testprogs/ejs/ldb.js
index b1dbad773d..680420eefd 100755
--- a/testprogs/ejs/ldb.js
+++ b/testprogs/ejs/ldb.js
@@ -18,7 +18,7 @@ if (options == undefined) {
libinclude("base.js");
if (options.ARGV.length != 1) {
- println("Usage: ldap.js <HOST>");
+ println("Usage: ldb.js <prefix>");
return -1;
}
@@ -88,10 +88,10 @@ dn: cn=ROOTDSE
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 @@ caseattr2: Xz
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;
diff --git a/testprogs/ejs/samba3sam.js b/testprogs/ejs/samba3sam.js
index 15bcd42632..b25ca88d1d 100755
--- a/testprogs/ejs/samba3sam.js
+++ b/testprogs/ejs/samba3sam.js
@@ -27,7 +27,7 @@ prefix = options.ARGV[0];
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 @@ replicateEntries: @INDEXLIST
}
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 @@ delete: description
}
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;