summaryrefslogtreecommitdiff
path: root/test/RegressTests.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/RegressTests.py')
-rwxr-xr-xtest/RegressTests.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/RegressTests.py b/test/RegressTests.py
index 0fef2127..a5bab42d 100755
--- a/test/RegressTests.py
+++ b/test/RegressTests.py
@@ -57,9 +57,6 @@ class RegressFile(object):
in_error = False
line = self.fd.readline()
- if not line:
- print >>sys.stderr, "WARNING: Empty testfile detected: %s" % (self.filename)
- return False
#print "line =", line
while line:
if line.startswith("test "):
@@ -167,6 +164,10 @@ class RegressFile(object):
harness.failure(os.path.basename(self.filename))
def run_tests(self):
+ if os.path.getsize(self.filename) == 0:
+ print >>sys.stderr, "WARNING: Empty testfile detected: %s" % (self.filename)
+ harness.failure(os.path.basename(self.filename))
+ return False
test = self.read_test()
while test:
self.run_test(test)