summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-10 00:19:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:28 -0500
commit2a08b290134eacc803389b20e604792a7e74eac4 (patch)
tree6d2f98d924624a12069904551655a26ebaee09d6 /source4/script
parent146c85410946540571fcaf01c85c3a0bffed8cb6 (diff)
downloadsamba-2a08b290134eacc803389b20e604792a7e74eac4.tar.gz
samba-2a08b290134eacc803389b20e604792a7e74eac4.tar.bz2
samba-2a08b290134eacc803389b20e604792a7e74eac4.zip
r8269: added automatic testing of rpc calls from ejs in 'make test'
(This used to be commit c760180119b4ac9307783bc50892a3dc57b2465e)
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/tests/selftest.sh1
-rwxr-xr-xsource4/script/tests/test_ejs.sh23
2 files changed, 24 insertions, 0 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
+