Author: tpot
Date: 2006-03-30 04:39:37 +0000 (Thu, 30 Mar 2006)
New Revision: 14798

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14798

Log:
Get swig building again (by commenting out dcerpc stuff for now).

Add the start of a test framework for swigged functionality.

Added:
   branches/SAMBA_4_0/source/script/tests/test_swig.sh
   branches/SAMBA_4_0/source/scripting/swig/torture/torture_tdb.py
Modified:
   branches/SAMBA_4_0/source/main.mk
   branches/SAMBA_4_0/source/scripting/config.mk


Changeset:
Modified: branches/SAMBA_4_0/source/main.mk
===================================================================
--- branches/SAMBA_4_0/source/main.mk   2006-03-30 03:51:49 UTC (rev 14797)
+++ branches/SAMBA_4_0/source/main.mk   2006-03-30 04:39:37 UTC (rev 14798)
@@ -304,6 +304,9 @@
 unused_macros:
        ./script/find_unused_macros.pl `find . -name "*.[ch]"` | sort
 
+swigtest: swig
+       ./script/tests/test_swig.sh
+
 ###############################################################################
 # File types
 ###############################################################################

Added: branches/SAMBA_4_0/source/script/tests/test_swig.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_swig.sh 2006-03-30 03:51:49 UTC 
(rev 14797)
+++ branches/SAMBA_4_0/source/script/tests/test_swig.sh 2006-03-30 04:39:37 UTC 
(rev 14798)
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+if [ $# -ne 0 ]; then
+    cat <<EOF
+Usage: test_swig.sh
+EOF
+    exit 1;
+fi
+
+incdir=`dirname $0`
+. $incdir/test_functions.sh
+
+failed=0
+
+export PYTHONPATH=scripting/swig:$PYTHONPATh
+
+scripting/swig/torture/torture_tdb.py || failed=`expr $failed + 1`
+
+testok $0 $failed


Property changes on: branches/SAMBA_4_0/source/script/tests/test_swig.sh
___________________________________________________________________
Name: svn:executable
   + *

Modified: branches/SAMBA_4_0/source/scripting/config.mk
===================================================================
--- branches/SAMBA_4_0/source/scripting/config.mk       2006-03-30 03:51:49 UTC 
(rev 14797)
+++ branches/SAMBA_4_0/source/scripting/config.mk       2006-03-30 04:39:37 UTC 
(rev 14798)
@@ -22,14 +22,15 @@
 #######################
 
 # Swig extensions
-swig: scripting/swig/_tdb.so scripting/swig/_ldb.so scripting/swig/_dcerpc.so
+swig: scripting/swig/_tdb.so scripting/swig/_ldb.so
 
 scripting/swig/tdb_wrap.c: scripting/swig/tdb.i
        swig -python scripting/swig/tdb.i
 
-scripting/swig/_tdb.so: scripting/swig/tdb_wrap.o 
$(LIBRARY_swig_tdb_DEPEND_LIST)
-       $(SHLD) $(SHLD_FLAGS) -o scripting/swig/_tdb.so 
scripting/swig/tdb_wrap.o \
-               $(LIBRARY_swig_tdb_LINK_LIST) $(LIBRARY_swig_tdb_LINK_FLAGS)
+scripting/swig/_tdb.so: scripting/swig/tdb_wrap.o 
bin/subsystems/LIBRARY_LIBTDB.o
+       $(SHLD) $(SHLD_FLAGS) -o scripting/swig/_tdb.so \
+               scripting/swig/tdb_wrap.o \
+               bin/subsystems/LIBRARY_LIBTDB.o
 
 scripting/swig/ldb_wrap.c: scripting/swig/ldb.i
        swig -python scripting/swig/ldb.i

Added: branches/SAMBA_4_0/source/scripting/swig/torture/torture_tdb.py
===================================================================
--- branches/SAMBA_4_0/source/scripting/swig/torture/torture_tdb.py     
2006-03-30 03:51:49 UTC (rev 14797)
+++ branches/SAMBA_4_0/source/scripting/swig/torture/torture_tdb.py     
2006-03-30 04:39:37 UTC (rev 14798)
@@ -0,0 +1,10 @@
+#!/usr/bin/python
+
+import sys, tdb
+from os import *
+
+t = tdb.open('foo.tdb', 0, 0, O_RDWR | O_CREAT, 0600)
+tdb.close(t)
+
+unlink('foo.tdb')
+


Property changes on: 
branches/SAMBA_4_0/source/scripting/swig/torture/torture_tdb.py
___________________________________________________________________
Name: svn:executable
   + *

Reply via email to