Conda-build: test/commands ignored in outputs

Created on 3 Jan 2019  路  11Comments  路  Source: conda/conda-build

Actual Behavior

The test/commands for an output are not picked up by conda build.

Expected Behavior

The test commands should get run.

Steps to Reproduce

package:
  name: outputs-test-commands
  version: 0.0.1

build:
  script: "echo uname > ${PREFIX}/bin/test-script"

outputs:
  - name: output1
    files:
      - bin/test-script
    test:
      commands:
        - echo "THIS WORKS"

Run conda build with the above meta.yaml file. The echo command doesn't get identified. The build log shows:

TEST START: /Users/duncan/opt/miniconda3/conda-bld/osx-64/output1-0.0.1-0.tar.bz2
Multiple meta.yaml files found. The meta.yaml file in the base directory will be used.
WARNING:conda_build.utils:Multiple meta.yaml files found. The meta.yaml file in the base directory will be used.
Adding in variants from /var/folders/xh/jdrqg2bx3s5f4lkq0rf2903c0000gq/T/tmpjnmgu97x/info/recipe/conda_build_config.yaml
INFO:conda_build.variants:Adding in variants from /var/folders/xh/jdrqg2bx3s5f4lkq0rf2903c0000gq/T/tmpjnmgu97x/info/recipe/conda_build_config.yaml
Nothing to test for: /Users/duncan/opt/miniconda3/conda-bld/osx-64/output1-0.0.1-0.tar.bz2
Output of conda info
     active environment : base
    active env location : /Users/duncan/opt/miniconda3
            shell level : 1
       user config file : /Users/duncan/.condarc
 populated config files : /Users/duncan/.condarc
          conda version : 4.5.12
    conda-build version : 3.17.5
         python version : 3.6.6.final.0
       base environment : /Users/duncan/opt/miniconda3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/osx-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/osx-64
                          https://repo.anaconda.com/pkgs/pro/noarch
          package cache : /Users/duncan/opt/miniconda3/pkgs
                          /Users/duncan/.conda/pkgs
       envs directories : /Users/duncan/opt/miniconda3/envs
                          /Users/duncan/.conda/envs
               platform : osx-64
             user-agent : conda/4.5.12 requests/2.18.4 CPython/3.6.6 Darwin/18.0.0 OSX/10.14
                UID:GID : 503:20
             netrc file : None
           offline mode : False

cc: @beckermr

Most helpful comment

All 11 comments

Yep, looks like the test for this got disabled at some point: https://github.com/conda/conda-build/blob/master/tests/test_subpackages.py#L223-L230, probably due to trouble with capfd.

Sorry, but it might be a while before we can fix this. We are focused this week on other things. PR's welcome in the meantime.

thanks @msarahan, its not super-urgent, I can manually test things in the mean time, I suppose. I'll see what I can dig into from your link.

Thanks for filling this @duncanmmacleod! I am not blocked by this either but it would be awesome to get it fixed.

test/script is ignored as well

@isuruf did the PR above fix the commands and the scripts, or just the commands?

PR #3343 was just released in conda-build 3.17.7. Please give it a try.

Scripts are still broken.

commands work

~So, AFAICT, this is still broken, and test/commands are ignored in outputs. See this conda-forge build of lalinference-feedstock for an example where test/imports get run, but test/commands are completely ignored.~ This is apparently not true, I just don't know my own recipes very well, apologies for the spam.

Was this page helpful?
0 / 5 - 0 ratings