diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile | 7 | ||||
-rw-r--r-- | test/data/bindings/htmldocument.bnd | 4 | ||||
-rw-r--r-- | test/data/idl/document.idl (renamed from test/document.idl) | 0 | ||||
-rw-r--r-- | test/data/idl/eventtarget.idl (renamed from test/eventtarget.idl) | 0 | ||||
-rw-r--r-- | test/data/idl/htmldocument.idl (renamed from test/htmldocument.idl) | 0 | ||||
-rw-r--r-- | test/data/idl/window.idl (renamed from test/window.idl) | 0 | ||||
-rw-r--r-- | test/htmldocument.bnd | 3 | ||||
-rwxr-xr-x | test/testrunner.sh | 43 |
8 files changed, 54 insertions, 3 deletions
diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 0000000..0e5236e --- /dev/null +++ b/test/Makefile @@ -0,0 +1,7 @@ + +TEST_TARGETS := $(TEST_TARGETS) test_bindings + +test_bindings: + $(Q)$(SHAREDLDPATH) $(TESTRUNNER) $(BUILDDIR) $(CURDIR)/test + +include $(NSBUILD)/Makefile.subdir diff --git a/test/data/bindings/htmldocument.bnd b/test/data/bindings/htmldocument.bnd new file mode 100644 index 0000000..4f3095f --- /dev/null +++ b/test/data/bindings/htmldocument.bnd @@ -0,0 +1,4 @@ +/* test binding docuemnt */ + +webidlfile "htmldocument.idl"; + diff --git a/test/document.idl b/test/data/idl/document.idl index afab566..afab566 100644 --- a/test/document.idl +++ b/test/data/idl/document.idl diff --git a/test/eventtarget.idl b/test/data/idl/eventtarget.idl index 2cfd15e..2cfd15e 100644 --- a/test/eventtarget.idl +++ b/test/data/idl/eventtarget.idl diff --git a/test/htmldocument.idl b/test/data/idl/htmldocument.idl index 923aa08..923aa08 100644 --- a/test/htmldocument.idl +++ b/test/data/idl/htmldocument.idl diff --git a/test/window.idl b/test/data/idl/window.idl index 7114709..7114709 100644 --- a/test/window.idl +++ b/test/data/idl/window.idl diff --git a/test/htmldocument.bnd b/test/htmldocument.bnd deleted file mode 100644 index 6f02c75..0000000 --- a/test/htmldocument.bnd +++ /dev/null @@ -1,3 +0,0 @@ -/* test binding docuemnt */ - -webidlfile "htmldocument.idl" diff --git a/test/testrunner.sh b/test/testrunner.sh new file mode 100755 index 0000000..b717e34 --- /dev/null +++ b/test/testrunner.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +outline() { +echo >>${LOGFILE} +echo "-----------------------------------------------------------" >>${LOGFILE} +echo >>${LOGFILE} +} + +BUILDDIR=$1 +TESTDIR=$2 + +# locations +LOGFILE=${BUILDDIR}/testlog + +GENJSBIND=${BUILDDIR}/genjsbind + +BINDINGDIR=${TESTDIR}/data/bindings +BINDINGTESTS=$(ls ${BINDINGDIR}/*.bnd) + +IDLDIR=${TESTDIR}/data/idl + +echo "$*" >${LOGFILE} + +for TEST in ${BINDINGTESTS};do + + TESTNAME=$(basename ${TEST} .bnd) + + echo -n " TEST: ${TESTNAME}......" + outline + + echo ${GENJSBIND} -d -v -I ${IDLDIR} -o ${BUILDDIR}/test_${TESTNAME}.c ${TEST} >>${LOGFILE} 2>&1 + + ${GENJSBIND} -d -v -I ${IDLDIR} -o ${BUILDDIR}/test_${TESTNAME}.c ${TEST} >>${LOGFILE} 2>&1 + + if [ $? -eq 0 ]; then + echo "PASS" + else + echo "FAIL" + fi + + +done + |