Skip to content

Commit 16a5c76

Browse files
committed
update logic on required tests & unsupported features
1 parent 3f9858a commit 16a5c76

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

cwltest/__init__.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,23 @@ def main(): # type: () -> int
250250
test_result = job.result()
251251
test_case = test_result.create_test_case(tests[i])
252252
total += 1
253-
if test_result.return_code == 1 or \
254-
(test_result.return_code == UNSUPPORTED_FEATURE and test_case.category == REQUIRED):
253+
return_code = test_result.return_code
254+
category = test_case.category
255+
if return_code == 0:
256+
passed += 1
257+
elif return_code != 0 and return_code != UNSUPPORTED_FEATURE:
258+
failures += 1
259+
test_case.add_failure_info(output=test_result.message)
260+
elif return_code == UNSUPPORTED_FEATURE and category == REQUIRED:
255261
failures += 1
256262
test_case.add_failure_info(output=test_result.message)
257-
elif test_result.return_code == UNSUPPORTED_FEATURE:
263+
elif category != REQUIRED and return_code == UNSUPPORTED_FEATURE:
258264
unsupported += 1
259265
test_case.add_skipped_info("Unsupported")
260266
else:
261-
passed += 1
267+
raise Exception(
268+
"This is impossible, return_code: {}, category: "
269+
"{}".format(return_code, category))
262270
report.test_cases.append(test_case)
263271
except KeyboardInterrupt:
264272
for job in jobs:

0 commit comments

Comments
 (0)