Author: ben
Date: 2007-07-05 14:02:58 -0700 (Thu, 05 Jul 2007)
New Revision: 5595
Modified:
openlaszlo/branches/legals/build-tools/runlztest.sh
Log:
Change 20070705-ben-C by [EMAIL PROTECTED] on 2007-07-05 14:01:24 PDT
in /Users/ben/src/svn/openlaszlo/branches/legals
for http://svn.openlaszlo.org/openlaszlo/branches/legals
Summary: improvements to runlztest to run more tests, more quietly
Bugs Fixed: LPP-4236 runlztest should run to completion, not bail on first
failure
Technical Reviewer: hqm (pending)
QA Reviewer: frisco
Doc Reviewer: (pending)
Documentation:
This change tweaks build-tools/runlztest.sh to be less verbose about
standard operations, and to run an entire batch of tests. Before this
change, runlztest stopped after a single test failure. Now it runs
all tests, then reports a list of all tests that failed.
Also removed some sleeps so that skipped tests take approx no time,
instead of 2 seconds per skipped test.
Tests:
When there are tests in the smokecheck which fail in lztest:
$ build-tools/runlztest.sh
Output should end with something like:
ERRORS in tests
0,test/lztest/lztest-lzdataelement.lzx,test/lztest/lztest-view.lzx,test/lztest/lztest-textheight.lzx
When the smokecheck fails in lztest, the output of
$ ant lztest
should end with something like this:
[exec] error: In suite Test LzURL, test 0, failed assertion: FAIL:
assertTrue('false') failed
[exec] error: Failed 1 suites, Test LzURL
[exec] FAILED a test in runlztest.sh: test/lztest/lztest-lzurl.lzx
[exec] ERRORS in tests: 0,test/lztest/lztest-lzurl.lzx
[exec] ERRORS in tests 0,test/lztest/lztest-lzurl.lzx
BUILD FAILED
/Users/ben/src/svn/openlaszlo/branches/legals-clean/build.xml:877: exec
returned: 1
When the smokecheck passes in lztest, the output of
$ ant lztest
should end with...
[exec] no errors. done.
BUILD SUCCESSFUL
Total time: 2 minutes 26 seconds
Modified: openlaszlo/branches/legals/build-tools/runlztest.sh
===================================================================
--- openlaszlo/branches/legals/build-tools/runlztest.sh 2007-07-05 17:08:17 UTC
(rev 5594)
+++ openlaszlo/branches/legals/build-tools/runlztest.sh 2007-07-05 21:02:58 UTC
(rev 5595)
@@ -11,6 +11,7 @@
if [ "${tags}" = "" ]; then
tags=ANY
fi
+errored=0
# If we can't find java, look in some other likely places for it
JAVA_EXEC=`which java`
@@ -31,8 +32,6 @@
# write several tests into that file
for i in $paths; do
- echo "testing $i .............."
-
if [ ! -f $i ]; then
echo "Test file does not exist: $i"
echo "Please edit the list of tests, which is $tests. "
@@ -43,15 +42,14 @@
if [ $tags != "ANY" ]; then
# replace commas by \| for regexp
tagpat=`echo $tags | sed 's/,/\\\|/g'`
- echo "checking $i for coverage of tags ${tagpat}..."
- sleep 1
- # search for the tags regexp in the test file source
- echo grep ".*covers-tags.*\(${tagpat}\)" $i
- sleep 1
+ # echo "checking $i for coverage of tags ${tagpat}..."
+ # search for the tags regexp in the test file source
grep ".*covers-tags.*\(${tagpat}\)" $i
if [ $? != 0 ]; then
echo "skipping ${i}, does not match tags ${tagpat}"
continue
+ else
+ echo "testing ${i}..........."
fi
fi
@@ -70,7 +68,8 @@
# If the compile failed, the tests should fail.
if [ $? != 0 ] ; then
echo "FAILED to compile test $i in runlztest.sh"
- exit 1;
+ errored="$errored,$i"
+ echo "errored is $errored"
fi
# make the file with all the tests load in that compiled file
@@ -85,10 +84,16 @@
# Stop testing if we failed a test
if [ $? != 0 ] ; then
- echo "FAILED a test in runlztest.sh";
- exit 1;
+ echo "FAILED a test in runlztest.sh: $i";
+ errored="$errored,$i"
+ echo "ERRORS in tests: $errored"
fi
done
-echo "Done."
+if [ $errored != 0 ]; then
+ echo "ERRORS in tests $errored"
+ exit 1
+fi
+
+echo "no errors. done."
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins