svn commit: samba r8269 - in branches/SAMBA_4_0:
source/script/tests testprogs/ejs
tridge at samba.org
tridge at samba.org
Sun Jul 10 00:19:41 GMT 2005
Author: tridge
Date: 2005-07-10 00:19:41 +0000 (Sun, 10 Jul 2005)
New Revision: 8269
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8269
Log:
added automatic testing of rpc calls from ejs in 'make test'
Added:
branches/SAMBA_4_0/source/script/tests/test_ejs.sh
Modified:
branches/SAMBA_4_0/source/script/tests/selftest.sh
branches/SAMBA_4_0/testprogs/ejs/echo.js
branches/SAMBA_4_0/testprogs/ejs/samr.js
Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/selftest.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/selftest.sh 2005-07-10 00:08:48 UTC (rev 8268)
+++ branches/SAMBA_4_0/source/script/tests/selftest.sh 2005-07-10 00:19:41 UTC (rev 8269)
@@ -107,6 +107,7 @@
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 + $?`
Added: branches/SAMBA_4_0/source/script/tests/test_ejs.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_ejs.sh 2005-07-10 00:08:48 UTC (rev 8268)
+++ branches/SAMBA_4_0/source/script/tests/test_ejs.sh 2005-07-10 00:19:41 UTC (rev 8269)
@@ -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
+
Property changes on: branches/SAMBA_4_0/source/script/tests/test_ejs.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: branches/SAMBA_4_0/testprogs/ejs/echo.js
===================================================================
--- branches/SAMBA_4_0/testprogs/ejs/echo.js 2005-07-10 00:08:48 UTC (rev 8268)
+++ branches/SAMBA_4_0/testprogs/ejs/echo.js 2005-07-10 00:19:41 UTC (rev 8269)
@@ -260,3 +260,4 @@
test_TestDoublePointer(conn);
print("All OK\n");
+return 0;
Modified: branches/SAMBA_4_0/testprogs/ejs/samr.js
===================================================================
--- branches/SAMBA_4_0/testprogs/ejs/samr.js 2005-07-10 00:08:48 UTC (rev 8268)
+++ branches/SAMBA_4_0/testprogs/ejs/samr.js 2005-07-10 00:19:41 UTC (rev 8269)
@@ -179,7 +179,7 @@
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_Close(conn, handle);
print("All OK\n");
+return 0;
More information about the samba-cvs
mailing list