Closed endrebak closed 8 years ago
All the tests do is check for exit code 0. So if ASCIIGenome exits 1 after printing the help (like a lot of tools do), then you'll need to test for that specifically, e.g,
ASCIIGenome -h || [[ $? == 1]]
and once that's working, make the output quieter for the travis logs:
ASCIIGenome -h > /dev/null 2>&1 || [[ $? == 1]]
Thanks! I tried ASCIIGenome -h && True
, which was the same idea, but absolutely moronic execution.
@daler
With your suggestion
test:
commands:
- ASCIIGenome -h || [[ $? == 1]]
I get the error:
/Users/labsenter/anaconda3/conda-bld/test-tmp_dir/run_test.sh: line 3: unexpected EOF while looking for `]]'
This works however:
- ASCIIGenome -h || True
Edit: the last command did not work in docker and it is bad anyways, as it would accept other error codes than 1.
Oops, sorry, add the space before the ]]
:
ASCIIGenome -h || [[ $? == 1 ]]
Thanks again. I guess I'll have to learn bash.
I have the setup as described in #2124
Now it seems like the test
ASCIIGenome -h
runs, but still the tests fail. I have appended the error message below. Does anyone have an inkling about why my tests fail? The help command seems to work, since you can see the output several times.