Skip to content

Commit

Permalink
Merge pull request #63 from common-workflow-language/required_is_requ…
Browse files Browse the repository at this point in the history
…ired

update logic on required tests & unsupported features
  • Loading branch information
mr-c authored Mar 19, 2018
2 parents 3f9858a + 16a5c76 commit 65ec76c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions cwltest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,23 @@ def main(): # type: () -> int
test_result = job.result()
test_case = test_result.create_test_case(tests[i])
total += 1
if test_result.return_code == 1 or \
(test_result.return_code == UNSUPPORTED_FEATURE and test_case.category == REQUIRED):
return_code = test_result.return_code
category = test_case.category
if return_code == 0:
passed += 1
elif return_code != 0 and return_code != UNSUPPORTED_FEATURE:
failures += 1
test_case.add_failure_info(output=test_result.message)
elif return_code == UNSUPPORTED_FEATURE and category == REQUIRED:
failures += 1
test_case.add_failure_info(output=test_result.message)
elif test_result.return_code == UNSUPPORTED_FEATURE:
elif category != REQUIRED and return_code == UNSUPPORTED_FEATURE:
unsupported += 1
test_case.add_skipped_info("Unsupported")
else:
passed += 1
raise Exception(
"This is impossible, return_code: {}, category: "
"{}".format(return_code, category))
report.test_cases.append(test_case)
except KeyboardInterrupt:
for job in jobs:
Expand Down

0 comments on commit 65ec76c

Please sign in to comment.