You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the output of wc is slightly different depending on the platform (linux/mac) or flavour (ubuntu, debian, etc.). The test does fail even if the job executes correctly, because it is checking the expected file size instead of the actual number of words in the file.
That was quite a white ago and a lot of things changed. I've re-pulled and re-installed everything, tried to run the tests, and got this:
(master) ~/repos_and_code/common-workflow-language (master) ~> ./run_test.sh
readlink: illegal option -- f
usage: readlink [-n] [file ...]
--- Running conformance test draft-2 on ---
./run_test.sh: line 54: : command not found
Test [1/36] Traceback (most recent call last):
File "/Users/guillem/anaconda/envs/master/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Users/guillem/anaconda/envs/master/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "build/bdist.macosx-10.5-x86_64/egg/cwltool/cwltest.py", line 171, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/cwltool/cwltest.py", line 156, in main
File "build/bdist.macosx-10.5-x86_64/egg/cwltool/cwltest.py", line 77, in run_test
File "/Users/guillem/anaconda/envs/master/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/Users/guillem/anaconda/envs/master/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/Users/guillem/anaconda/envs/master/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
1 tool tests failed
I have to say though that I haven't spent much time trying to figure out what is the problem. I'm posting it here for the record, in case you know at first sight what may be going on, otherwise I'll try to spot the problem.
Guillermo;
This looks like an issue with readlink differences on Macs, from the ./run_tests.sh script. Unfortunately the super handy readlink -f, for resolving symlinks, is not portable:
There is also an issue with tests that use sort because sorting is locale dependent. Sorting whale.txt gives different results depending on wether locale is C (expected by the test script) or en_US.UTF-8 (later will apparently sort case insensitive). All that in eg. revsort.cwl which should test simple workflow.
I think it's possible that the scripts could be executed in a container that doesn't have python, right?
Is there something in CWL spec/conformance that depends on word counting or sorting? If not, maybe the same tests can be written with ls or echo or cat
Activity
mr-c commentedon Oct 26, 2015
@guillermo-carrasco Is this still an issue?
guillermo-carrasco commentedon Oct 27, 2015
Hi @mr-c ,
That was quite a white ago and a lot of things changed. I've re-pulled and re-installed everything, tried to run the tests, and got this:
I have to say though that I haven't spent much time trying to figure out what is the problem. I'm posting it here for the record, in case you know at first sight what may be going on, otherwise I'll try to spot the problem.
Thanks!
chapmanb commentedon Oct 27, 2015
Guillermo;
This looks like an issue with readlink differences on Macs, from the
./run_tests.shscript. Unfortunately the super handyreadlink -f, for resolving symlinks, is not portable:http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac
I use this solution in shell scripts to avoid needing to use readlink:
https://github.com/bioconda/recipes/blob/9f1ccc4df492fa435d0a1204a93b3e13bd86d39b/recipes/varscan/varscan.sh#L8
guillermo-carrasco commentedon Oct 27, 2015
Hah, you're fast @chapmanb , thanks!
Indeed that was the problem. I've added a small fix (see PR) and all the tests passed... except that one, so yes @mr-c , it is still a problem.
buchanae commentedon Mar 1, 2017
Confirming:
On Ubuntu
On Mac
At least for test 18 "Test command execution in with stdin and stdout redirection", would replacing
wcwithechoorcatbe better?mr-c commentedon Mar 2, 2017
@buchanae Thank you for confirming
Does the output of something more specific like
wc --charsalso differ?Happy to get a patch for test 18 that uses
catmr-c commentedon Mar 2, 2017
And a belated thanks to @guillermo-carrasco for confirming a year ago!
StarvingMarvin commentedon Mar 2, 2017
There is also an issue with tests that use
sortbecause sorting is locale dependent. Sorting whale.txt gives different results depending on wether locale isC(expected by the test script) oren_US.UTF-8(later will apparently sort case insensitive). All that in eg. revsort.cwl which should test simple workflow.tetron commentedon Mar 2, 2017
Maybe we should replace those tools with Python scripts that have minimal behavior required for the test, but hopefully no variation among platforms?
buchanae commentedon Mar 3, 2017
I think it's possible that the scripts could be executed in a container that doesn't have python, right?
Is there something in CWL spec/conformance that depends on word counting or sorting? If not, maybe the same tests can be written with
lsorechoorcatRemove pathlib2 because it is only used for one thing but creates dep…
Squashed 'v1.1.0-dev1/salad/' changes from 98a5bea..27c20e8