summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-02-07 17:05:49 (GMT)
committer Vincent Sanders <vince@kyllikki.org>2016-02-07 17:05:49 (GMT)
commite619a76bef4c207a015834e1644ccfd9d6aea761 (patch)
treed52d4d124a8b6b9fbdc1050d29907bc210381414
parent42a18510a3dbfb097a6b3846dcc827c9e902ecf3 (diff)
downloadnsgenbind-e619a76bef4c207a015834e1644ccfd9d6aea761.tar.gz
nsgenbind-e619a76bef4c207a015834e1644ccfd9d6aea761.tar.bz2
fix testrunner to use correct comamndline
-rw-r--r--test/data/bindings/blankidl.bnd8
-rw-r--r--test/data/bindings/emptyidl.bnd8
-rwxr-xr-xtest/testrunner.sh34
3 files changed, 38 insertions, 12 deletions
diff --git a/test/data/bindings/blankidl.bnd b/test/data/bindings/blankidl.bnd
index dfd7a4a..74cf144 100644
--- a/test/data/bindings/blankidl.bnd
+++ b/test/data/bindings/blankidl.bnd
@@ -1 +1,7 @@
-webidlfile "blank.idl";
+/*
+ * Test with IDL file full of whitespace
+ */
+
+binding duk_libdom {
+ webidl "blank.idl";
+};
diff --git a/test/data/bindings/emptyidl.bnd b/test/data/bindings/emptyidl.bnd
index e746325..c04c321 100644
--- a/test/data/bindings/emptyidl.bnd
+++ b/test/data/bindings/emptyidl.bnd
@@ -1 +1,7 @@
-webidlfile "empty.idl";
+/*
+ * Test with empty IDL file
+ */
+
+binding duk_libdom {
+ webidl "empty.idl";
+};
diff --git a/test/testrunner.sh b/test/testrunner.sh
index 30a5116..3099c65 100755
--- a/test/testrunner.sh
+++ b/test/testrunner.sh
@@ -7,32 +7,46 @@ echo >>${LOGFILE}
}
BUILDDIR=$1
-TESTDIR=$2
+TESTSRCDIR=$2
# locations
-LOGFILE=${BUILDDIR}/testlog
-RESFILE=${BUILDDIR}/testres
-ERRFILE=${BUILDDIR}/testerr
+# test output
+TESTOUTDIR=${BUILDDIR}/test
+# test overall output
+LOGFILE=${TESTOUTDIR}/testlog
-GENJSBIND=${BUILDDIR}/nsgenbind
+# genbind tool
+NSGENBIND=${BUILDDIR}/nsgenbind
-BINDINGDIR=${TESTDIR}/data/bindings
+#bindings
+BINDINGDIR=${TESTSRCDIR}/data/bindings
BINDINGTESTS=$(ls ${BINDINGDIR}/*.bnd)
-IDLDIR=${TESTDIR}/data/idl
+IDLDIR=${TESTSRCDIR}/data/idl
+
+mkdir -p ${TESTOUTDIR}
echo "$*" >${LOGFILE}
for TEST in ${BINDINGTESTS};do
+ outline
+
TESTNAME=$(basename ${TEST} .bnd)
+ TESTDIR=${TESTOUTDIR}/${TESTNAME}
echo -n " TEST: ${TESTNAME}......"
- outline
+ echo " TEST: ${TESTNAME}......" >>${LOGFILE}
+
+ mkdir -p ${TESTDIR}
+ # per test results
+ RESFILE=${TESTDIR}/testres
+ # per test errors
+ ERRFILE=${TESTDIR}/testerr
- echo ${GENJSBIND} -v -I ${IDLDIR} -o ${BUILDDIR}/test_${TESTNAME}.c -h ${BUILDDIR}/test_${TESTNAME}.h ${TEST} >>${LOGFILE} 2>&1
+ echo ${NSGENBIND} -v -D -g -I ${IDLDIR} ${TEST} ${TESTOUTDIR}/${TESTNAME} >>${LOGFILE} 2>&1
- ${GENJSBIND} -v -I ${IDLDIR} -o ${BUILDDIR}/test_${TESTNAME}.c -h ${BUILDDIR}/test_${TESTNAME}.h ${TEST} >${RESFILE} 2>${ERRFILE}
+ ${NSGENBIND} -v -D -g -I ${IDLDIR} ${TEST} ${TESTOUTDIR}/${TESTNAME} >${RESFILE} 2>${ERRFILE}
RESULT=$?