Skip to content

Test failure from installation page #615

Closed

Description

@rmccole

Expected Behavior

Tests should complete. Tests are run using command
py.test --ignore cwltool/schemas/ --pyarg cwltool

Actual Behavior

Test failed. Output:

`==================================================== FAILURES ====================================================
__________________________________________ TestOverride.test_overrides ___________________________________________

self = <cwltool.tests.test_override.TestOverride testMethod=test_overrides>

@pytest.mark.skipif(onWindows(),
                    reason="Instance of Cwltool is used, On windows that invoke a default docker Container")
def test_overrides(self):
    sio = StringIO()

    self.assertEquals(main([get_data('tests/override/echo.cwl'),
                            get_data('tests/override/echo-job.yml')],
                           stdout=sio), 0)
  self.assertEquals({"out": "zing hello1"}, json.loads(sio.getvalue()))

E AssertionError: {'out': 'zing hello1'} != {u'out': u'-n zing hello1\n'}
E - {'out': 'zing hello1'}
E + {u'out': u'-n zing hello1\n'}
E ? + + +++ ++

anaconda/envs/CWLtest/lib/python2.7/site-packages/cwltool/tests/test_override.py:26: AssertionError`

Workflow Code

`py.test --ignore cwltool/schemas/ --pyarg cwltool`

Full Traceback

Paste the full traceback in case there is an exception
Run the workflow with ``--debug`` flag for more verbose logging 

Your Environment

  • cwltool version:
    cwltool 1.0.20180116213856
    Check using cwltool --version
    OS: Mac OS 10.12.6

Activity

  1. anton-khodak commented on Jan 27, 2018

    @anton-khodak
    Member

    The problem is that the standard shell for executing commands from a string in cwltool is /bin/sh which does not support -n argument to echo on MacOS. We can either change the default shell to /bin/bash for MacOS specifically or for cwltool in general. Are there specific reasons to use /bin/sh by default, @tetron ?

  2. mr-c commented on Jan 28, 2018

    @mr-c
    Member

    @anton-khodak Good catch. I'm guessing the assumption of the availability of -n was an oversight. The shell needs to be a POSIX shell, so the use of /bin/sh is correct.

  3. mr-c commented on Jan 28, 2018

    @mr-c
    Member

    @anton-khodak I think it would be fine to drop the -n and amend the tests to expect the newline character

  4. added a commit that references this issue on Mar 20, 2018
  5. added a commit that references this issue on Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions