summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource4/script/tests/selftest.sh1
-rwxr-xr-xsource4/script/tests/test_ejs.sh23
-rw-r--r--testprogs/ejs/echo.js1
-rw-r--r--testprogs/ejs/samr.js3
4 files changed, 27 insertions, 1 deletions
diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh
index d99857f2d0..2993b0590e 100755
--- a/source4/script/tests/selftest.sh
+++ b/source4/script/tests/selftest.sh
@@ -107,6 +107,7 @@ START=`date`
bin/nmblookup -U localhost localhost
failed=0
+ $SRCDIR/script/tests/test_ejs.sh localhost $USERNAME $PASSWORD || failed=`expr $failed + $?`
$SRCDIR/script/tests/test_ldap.sh localhost $USERNAME $PASSWORD || failed=`expr $failed + $?`
$SRCDIR/script/tests/test_quick.sh //localhost/cifs $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
$SRCDIR/script/tests/test_rpc.sh localhost $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
diff --git a/source4/script/tests/test_ejs.sh b/source4/script/tests/test_ejs.sh
new file mode 100755
index 0000000000..83a16c631b
--- /dev/null
+++ b/source4/script/tests/test_ejs.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# test some simple EJS operations
+
+if [ $# -lt 3 ]; then
+cat <<EOF
+Usage: test_ejs.sh SERVER USERNAME PASSWORD
+EOF
+exit 1;
+fi
+
+SERVER="$1"
+USERNAME="$2"
+PASSWORD="$3"
+
+incdir=`dirname $0`
+. $incdir/test_functions.sh
+
+SCRIPTDIR=../testprogs/ejs
+
+for f in samr.js echo.js; do
+ testit "$f" bin/smbscript $SCRIPTDIR/$f ncacn_np:$SERVER -U$USERNAME%$PASSWORD || failed=`expr $failed + 1`
+done
+
diff --git a/testprogs/ejs/echo.js b/testprogs/ejs/echo.js
index 2040a4663e..9607466b0e 100644
--- a/testprogs/ejs/echo.js
+++ b/testprogs/ejs/echo.js
@@ -260,3 +260,4 @@ test_TestSurrounding(conn);
test_TestDoublePointer(conn);
print("All OK\n");
+return 0;
diff --git a/testprogs/ejs/samr.js b/testprogs/ejs/samr.js
index df54ca6062..1a1ca50569 100644
--- a/testprogs/ejs/samr.js
+++ b/testprogs/ejs/samr.js
@@ -179,7 +179,7 @@ print("Connecting to " + binding + "\n");
status = rpc_connect(conn, binding, "samr");
if (status.is_ok != true) {
print("Failed to connect to " + binding + " - " + status.errstr + "\n");
- return;
+ return -1;
}
handle = test_Connect(conn);
@@ -187,3 +187,4 @@ test_EnumDomains(conn, handle);
test_Close(conn, handle);
print("All OK\n");
+return 0;