From f888b5e5b6c9bc554f81bac8307cdff754835125 Mon Sep 17 00:00:00 2001 From: Tomoya Tanjo Date: Wed, 20 Dec 2017 16:17:04 +0900 Subject: [PATCH 1/3] Add known failure testing capability --- cwltest/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cwltest/__init__.py b/cwltest/__init__.py index fd56cda..452aa8f 100755 --- a/cwltest/__init__.py +++ b/cwltest/__init__.py @@ -220,6 +220,8 @@ def run_test(args, i, tests): # type: (argparse.Namespace, int, List[Dict[str, except subprocess.CalledProcessError as err: if err.returncode == UNSUPPORTED_FEATURE: return TestResult(UNSUPPORTED_FEATURE, outstr, outerr, duration, args.classname) + elif t.get("should_fail", False): + return TestResult(0, outstr, outerr, duration, args.classname) else: _logger.error(u"""Test failed: %s""", " ".join([pipes.quote(tc) for tc in test_command])) _logger.error(t.get("doc")) @@ -237,6 +239,12 @@ def run_test(args, i, tests): # type: (argparse.Namespace, int, List[Dict[str, fail_message = '' + if t.get("should_fail", False): + _logger.warn(u"""Test failed: %s""", " ".join([pipes.quote(tc) for tc in test_command])) + _logger.warn(t.get("doc")) + _logger.warn(u"Returned zero but it should be non-zero") + return TestResult(1, outstr, outerr, duration, args.classname) + try: compare(t.get("output"), out) except CompareFail as ex: From 97dc3654bd1aac5c325891cf4caef4e0fdbfcc10 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Wed, 20 Dec 2017 10:36:14 +0200 Subject: [PATCH 2/3] pip -> pip2 https://github.com/travis-ci/travis-ci/issues/8829#issuecomment-348735335 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 602e116..20691da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ matrix: python: 2.7 install: - - pip install tox-travis + - pip2 install tox-travis script: tox notifications: email: false From e0cde1c005a2a33e2c4e5dff727f2026c0f4d178 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Wed, 20 Dec 2017 10:37:59 +0200 Subject: [PATCH 3/3] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 20691da..bb8b278 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ matrix: python: 2.7 install: - - pip2 install tox-travis + - pip2 install tox-travis || pip3 install tox-travis script: tox notifications: email: false