[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.2-20090328-106-g6d4ba09)
The branch, master has been updated
via 6d4ba095d2894e9cc21e272d28af07b0d74a7b99 (commit)
from ca91e1be91ae1d0c0b4bbfddf814309be09e84b2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gsymcheck/tests/Makefile.am | 13 ++++++++++---
gsymcheck/tests/runtest.sh | 36 ++++++++++++++++++++----------------
2 files changed, 30 insertions(+), 19 deletions(-)
=================
Commit Messages
=================
commit 6d4ba095d2894e9cc21e272d28af07b0d74a7b99
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Commit: Dan McMahill <dan@xxxxxxxxxxxx>
Fix several minor bugs in the testsuite.
- Make the list of arguments passed into the runtest.sh script match
what the script actually expects.
- Make the use of temp files more secure.
- Be more consistent about the usage of the build directory versus
the source directory.
- When a single test fails, just increment a failed count and continue on.
Don't abort until all the tests have run.
:100644 100644 5a42109... cd58691... M gsymcheck/tests/Makefile.am
:100755 100755 667b56f... 10ba5f2... M gsymcheck/tests/runtest.sh
=========
Changes
=========
commit 6d4ba095d2894e9cc21e272d28af07b0d74a7b99
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Commit: Dan McMahill <dan@xxxxxxxxxxxx>
Fix several minor bugs in the testsuite.
- Make the list of arguments passed into the runtest.sh script match
what the script actually expects.
- Make the use of temp files more secure.
- Be more consistent about the usage of the build directory versus
the source directory.
- When a single test fails, just increment a failed count and continue on.
Don't abort until all the tests have run.
diff --git a/gsymcheck/tests/Makefile.am b/gsymcheck/tests/Makefile.am
index 5a42109..cd58691 100644
--- a/gsymcheck/tests/Makefile.am
+++ b/gsymcheck/tests/Makefile.am
@@ -45,15 +45,22 @@ tests:
# Cleanup
rm -f $(BUILDDIR)/new_*
+ fail=0 ; \
+ pass=0 ; \
for file in $(SRCDIR)/*.sym; do \
- $(SRCDIR)/runtest.sh $$file $(BUILDDIR) $(SRCDIR); \
+ $(SHELL) $(SRCDIR)/runtest.sh $$file $(BUILDDIR) $(SRCDIR); \
if [ $$? -ne 0 ]; then \
echo "$$file FAILED!"; \
- exit 1; \
+ fail=`expr $$fail + 1`; \
else \
echo "$$file passed."; \
+ pass=`expr $$pass + 1`; \
fi; \
- done
+ done ; \
+ echo "passed: $$pass" ; \
+ echo "failed: $$fail" ; \
+ exit $$fail
+
# Cleanup
# rm -f $(BUILDDIR)/new_*
diff --git a/gsymcheck/tests/runtest.sh b/gsymcheck/tests/runtest.sh
index 667b56f..10ba5f2 100755
--- a/gsymcheck/tests/runtest.sh
+++ b/gsymcheck/tests/runtest.sh
@@ -1,17 +1,19 @@
#!/bin/sh
INPUT=$1
-BACKEND=$2
-BUILDDIR=$3
-SRCDIR=$4
-EXTRADIFF=$5
+BUILDDIR=$2
+SRCDIR=$3
+
here=`pwd`
rundir=${here}/run
# create temporary run directory and required subdirs
-if [ ! -d $rundir ]
-then
- mkdir -p $rundir
+mkdir -m 0700 -p ${rundir}
+rc=$?
+if test $rc -ne 0 ; then
+ echo "Failed to create directory ${rundir} with appropriate permissions"
+ echo "mkdir returned $rc"
+ exit 1
fi
TESTDIR=${BUILDDIR}
@@ -19,26 +21,28 @@ export TESTDIR
symbasename=`basename $INPUT .sym`
-tmpfile=$rundir/tmp$$
-../src/gsymcheck -vv $INPUT 1> $tmpfile 2> $rundir/allerrors.output
+in="${SRCDIR}/${INPUT}"
+ref="${SRCDIR}/${symbasename}.output"
+new="${rundir}/new_${symbasename}.output"
+tmpfile=${rundir}/tmp$$
+
+${BUILDDIR}/../src/gsymcheck -vv ${in} 1> ${tmpfile} 2> ${rundir}/allerrors.output
-cat $tmpfile | \
+cat ${tmpfile} | \
grep -v "gEDA/gsymcheck version" | \
grep -v "ABSOLUTELY NO WARRANTY" | \
grep -v "This is free software" | \
grep -v "the COPYING file" | \
grep -v "Checking: " | \
- grep -v '^$' > $rundir/${BUILDDIR}/new_${symbasename}.output
-rm -f $tmpfile
+ grep -v '^$' > ${new}
+rm -f ${tmpfile}
-diff $EXTRADIFF ${BUILDDIR}/${symbasename}.output \
- $rundir/${BUILDDIR}/new_${symbasename}.output
+diff "${ref}" "${new}"
status=$?
rm -rf $rundir
-if [ "$status" != 0 ]
-then
+if test $status -ne 0; then
exit 2
fi
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs