summaryrefslogtreecommitdiff
path: root/test/RegressTests.py
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2015-10-27 18:16:24 +0100
committerAlexis Hildebrandt <afh@surryhill.net>2015-10-27 18:16:24 +0100
commitd97b8341077d6e5c9dc7312ae098f1a59b41731d (patch)
tree89662e8e442fed300cdc59035186b89aec758a81 /test/RegressTests.py
parent2959d06adc38edb1620fc67f4c7433dc4f493c89 (diff)
downloadfork-ledger-d97b8341077d6e5c9dc7312ae098f1a59b41731d.tar.gz
fork-ledger-d97b8341077d6e5c9dc7312ae098f1a59b41731d.tar.bz2
fork-ledger-d97b8341077d6e5c9dc7312ae098f1a59b41731d.zip
[tests] Fix empty testfile check
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)