conda-forge.github.io
conda-forge.github.io copied to clipboard
Document that `test/commands` and `run_test.{sh,bat}` cannot coexist
As title. If meta.yaml
has the test/commands
session
test:
commands:
- ...
but run_test.{sh,bat}
is also provided, the commands in test/commands
will not be run. Workarounds include
- Move all commands to
run_test.{sh,bat}
(or vice versa) - Rename
run_test.{sh,bat}
to something else and run it explicitly
Hi @leofang, thanks for writing an informative description of this issue. I am taking this up.
@kathatherine and @leofang, I am thinking of putting it under this section as a note. What are your thoughts on this?
It might be better to put this in the Conda docs. That said, am not sure this is (still?) true. In particular please see this discussion thread for context ( https://github.com/conda-forge/boost-cpp-feedstock/pull/123#discussion_r848854342 )
Edit: It looks like Conda-Build originally starting handling appending the test/commands
to the shell script in this commit ( https://github.com/conda/conda-build/commit/555aae2632ea8816b02b25dd60db2fa4339c3dd6 ). Similar logic still exists in Conda-Build.
@leofang do you recall where this came up? No worries if not. Wondering if there might be a bug actually.
Sorry I don't remember in which feedstock I hit the issue, but I seem to remember confirming it's a known issue with either @jaimergp or @beckermr on the Gitter channel back then before filing an issue.
I don't recall this one but conda build does have its quirks. Probably need a simple test case here.
Well we just recently used this with boost-cpp
and it does seem to work there. Please see PR ( https://github.com/conda-forge/boost-cpp-feedstock/pull/123 ).
That said, have no problem believing there are other cases where it may have run into issues. Just don't know what those might be.
So I think part of the issue is not much output is produced from run_test.*
by default. Filed issue ( https://github.com/conda/conda-build/issues/4426 ) about addressing this.
That said, there may be more to the story. Still digging in 👷
Ok it does look like there is another bug, which is causing this issue. Filed as issue ( https://github.com/conda/conda-build/issues/4427 ).
I think I saw this in the conda-feedstock
. https://github.com/conda-forge/conda-feedstock/pull/162
Yeah have a few reproducers now. Tried submitting a fix upstream. Could use a review if you have time to look 🙂