glsl/tests/glcpp: reinstate "error out if no tests found"
With the recent rework of converting the shell script to a python one
the check for actual tests was dropped.
Bring that back, since it was explicitly added considering we had a ~2
year period, during which the tests were not run.
v2: use raise Exception() over print() & return false (Dylan)
Fixes: db8cd8e367
("glcpp/tests: Convert shell scripts to a python
script")
Cc: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:

committed by
Emil Velikov

parent
a2f5292c82
commit
d589eddc8b
@@ -119,6 +119,9 @@ def test_unix(args):
|
||||
for l in diff:
|
||||
print(l, file=sys.stderr)
|
||||
|
||||
if not total:
|
||||
raise Exception('Could not find any tests.')
|
||||
|
||||
print('{}/{}'.format(passed, total), 'tests returned correct results')
|
||||
return total == passed
|
||||
|
||||
@@ -155,6 +158,9 @@ def _replace_test(args, replace):
|
||||
for l in diff:
|
||||
print(l, file=sys.stderr)
|
||||
|
||||
if not total:
|
||||
raise Exception('Could not find any tests.')
|
||||
|
||||
print('{}/{}'.format(passed, total), 'tests returned correct results')
|
||||
return total == passed
|
||||
|
||||
@@ -197,6 +203,9 @@ def test_valgrind(args):
|
||||
print('FAIL')
|
||||
print(log, file=sys.stderr)
|
||||
|
||||
if not total:
|
||||
raise Exception('Could not find any tests.')
|
||||
|
||||
print('{}/{}'.format(passed, total), 'tests returned correct results')
|
||||
return total == passed
|
||||
|
||||
|
Reference in New Issue
Block a user