Test Framework for WIDL [1/2]

Dan Hipschman dsh at linux.ucla.edu
Wed Jul 19 16:09:45 CDT 2006


This sets up a regression testing framework for WIDL (it could be used
in other places, too).  You'll need the next patch to actually do "make
test" in tools/widl/tests, but this patch contains the test script and
list of test cases.  The test cases contain all the header files used by
Wine that are generated from IDL files.  Note that the TLB files are
commented out for now since they contain a timestamp and hence can't be
directly compared with known good copies.  It's still better to at least
have a test for the headers and work on getting a test for the TLB files
soon.

ChangeLog:
* Add regression testing framework for WIDL
---
 tools/tooltest             |   27 ++++++++++++++++++++++
 tools/widl/tests/tests.txt |   55 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 0 deletions(-)

diff --git a/tools/tooltest b/tools/tooltest
new file mode 100755
index 0000000..b404af3
--- /dev/null
+++ b/tools/tooltest
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+while read EXPECTED OUTPUT COMMAND ; do
+    # Ignore blank lines
+    if test -z "$EXPECTED" ; then
+        continue
+    fi
+
+    # Ignore comment lines
+    echo "$EXPECTED" | egrep "^#" > /dev/null
+    if test $? -eq 0 ; then
+        continue
+    fi
+
+    $COMMAND
+    if test $? -ne 0 ; then
+        echo "$COMMAND failed!"
+        exit 1
+    fi
+
+    diff "$EXPECTED" "$OUTPUT"
+    RESULT=$?
+    rm -f "$OUTPUT"
+    if test $RESULT -ne 0 ; then
+        exit 1
+    fi
+done
diff --git a/tools/widl/tests/tests.txt b/tools/widl/tests/tests.txt
new file mode 100644
index 0000000..8c2cec8
--- /dev/null
+++ b/tools/widl/tests/tests.txt
@@ -0,0 +1,55 @@
+#
+# Regression test for WIDL
+#
+
+# Expected	  Output	  Command
+#----------	----------	----------
+activscp.ok	activscp.h	../widl -I../../../include -h -H activscp.h activscp.idl
+amstream.ok	amstream.h	../widl -I../../../include -h -H amstream.h amstream.idl
+amvideo.ok	amvideo.h	../widl -I../../../include -h -H amvideo.h amvideo.idl
+atliface.ok	atliface.h	../widl -I../../../include -D__WINESRC__ -h -H atliface.h atliface.idl
+austream.ok	austream.h	../widl -I../../../include -h -H austream.h austream.idl
+comcat.ok	comcat.h	../widl -I../../../include -h -H comcat.h comcat.idl
+control.ok	control.h	../widl -I../../../include -h -H control.h control.idl
+dcom.ok		dcom.h		../widl -I../../../include -D__WINESRC__ -D_OLE32_ -DCOM_NO_WINDOWS_H  -h -H dcom.h dcom.idl
+ddstream.ok	ddstream.h	../widl -I../../../include -h -H ddstream.h ddstream.idl
+dispex.ok	dispex.h	../widl -I../../../include -h -H dispex.h dispex.idl
+docobj.ok	docobj.h	../widl -I../../../include -h -H docobj.h docobj.idl
+downloadmgr.ok	downloadmgr.h	../widl -I../../../include -h -H downloadmgr.h downloadmgr.idl
+exdisp.ok	exdisp.h	../widl -I../../../include -h -H exdisp.h exdisp.idl
+hlink.ok	hlink.h		../widl -I../../../include -h -H hlink.h hlink.idl
+htiframe.ok	htiframe.h	../widl -I../../../include -h -H htiframe.h htiframe.idl
+iads.ok		iads.h		../widl -I../../../include -h -H iads.h iads.idl
+indexsvr.ok	indexsvr.h	../widl -I../../../include -h -H indexsvr.h indexsvr.idl
+mediaobj.ok	mediaobj.h	../widl -I../../../include -h -H mediaobj.h mediaobj.idl
+mimeinfo.ok	mimeinfo.h	../widl -I../../../include -h -H mimeinfo.h mimeinfo.idl
+mlang.ok	mlang.h		../widl -I../../../include -h -H mlang.h mlang.idl
+mmstream.ok	mmstream.h	../widl -I../../../include -h -H mmstream.h mmstream.idl
+mshtmhst.ok	mshtmhst.h	../widl -I../../../include -h -H mshtmhst.h mshtmhst.idl
+mshtml.ok	mshtml.h	../widl -I../../../include -h -H mshtml.h mshtml.idl
+msxml.ok	msxml.h		../widl -I../../../include -h -H msxml.h msxml.idl
+msxml2.ok	msxml2.h	../widl -I../../../include -h -H msxml2.h msxml2.idl
+nsiface.ok	nsiface.h	../widl -I../../../include -D__WINESRC__ -DCOM_NO_WINDOWS_H  -h -H nsiface.h nsiface.idl
+oaidl.ok	oaidl.h		../widl -I../../../include -h -H oaidl.h oaidl.idl
+objidl.ok	objidl.h	../widl -I../../../include -h -H objidl.h objidl.idl
+objsafe.ok	objsafe.h	../widl -I../../../include -h -H objsafe.h objsafe.idl
+ocidl.ok	ocidl.h		../widl -I../../../include -h -H ocidl.h ocidl.idl
+oleidl.ok	oleidl.h	../widl -I../../../include -h -H oleidl.h oleidl.idl
+optary.ok	optary.h	../widl -I../../../include -h -H optary.h optary.idl
+propidl.ok	propidl.h	../widl -I../../../include -h -H propidl.h propidl.idl
+pstore.ok	pstore.h	../widl -I../../../include -h -H pstore.h pstore.idl
+richole.ok	richole.h	../widl -I../../../include -h -H richole.h richole.idl
+sensevts.ok	sensevts.h	../widl -I../../../include -h -H sensevts.h sensevts.idl
+servprov.ok	servprov.h	../widl -I../../../include -h -H servprov.h servprov.idl
+shldisp.ok	shldisp.h	../widl -I../../../include -h -H shldisp.h shldisp.idl
+shobjidl.ok	shobjidl.h	../widl -I../../../include -h -H shobjidl.h shobjidl.idl
+shtypes.ok	shtypes.h	../widl -I../../../include -h -H shtypes.h shtypes.idl
+#std_ole_v1.ok	std_ole_v1.tlb	../widl -I../../../include -D__WINESRC__ -t -T std_ole_v1.tlb std_ole_v1.idl
+#std_ole_v2.ok	std_ole_v2.tlb	../widl -I../../../include -D__WINESRC__ -t -T std_ole_v2.tlb std_ole_v2.idl
+strmif.ok	strmif.h	../widl -I../../../include -h -H strmif.h strmif.idl
+tom.ok		tom.h		../widl -I../../../include -h -H tom.h tom.idl
+unknwn.ok	unknwn.h	../widl -I../../../include -h -H unknwn.h unknwn.idl
+urlmon.ok	urlmon.h	../widl -I../../../include -h -H urlmon.h urlmon.idl
+wtypes.ok	wtypes.h	../widl -I../../../include -h -H wtypes.h wtypes.idl
+xmldom.ok	xmldom.h	../widl -I../../../include -h -H xmldom.h xmldom.idl
+xmldso.ok	xmldso.h	../widl -I../../../include -h -H xmldso.h xmldso.idl



More information about the wine-patches mailing list