Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda build --test incorrectly reports 'All tests passed' for non-existent package files #5612

Open
2 tasks done
swap357 opened this issue Feb 3, 2025 · 0 comments
Open
2 tasks done
Labels
type::bug describes erroneous operation, use severity::* to classify the type

Comments

@swap357
Copy link

swap357 commented Feb 3, 2025

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

When running conda build --test with a non-existent package pattern, it incorrectly reports "All tests passed" instead of failing:

(base)  swap357@Swapnils-MacBook-Pro  ~/test  ls                                                         
(base)  swap357@Swapnils-MacBook-Pro  ~/test  /bin/zsh -c "conda build --test 'fake_package_name*.conda'"
All tests passed
(base)  swap357@Swapnils-MacBook-Pro  ~/test  /bin/bash -c "conda build --test 'fake_package_name*.conda'"
All tests passed
(base)  swap357@Swapnils-MacBook-Pro  ~/test  /bin/zsh -c "conda build --test fake_package_name*.conda"  
zsh:1: no matches found: fake_package_name*.conda
(base)  ✘ swap357@Swapnils-MacBook-Pro  ~/test  /bin/bash -c "conda build --test fake_package_name*.conda"
All tests passed

This was tested with zsh and bash, and enabling debug mode (--debug) shows no additional useful information.

(base)  swap357@Swapnils-MacBook-Pro  ~/test  ls
(base)  swap357@Swapnils-MacBook-Pro  ~/test  /bin/zsh -c "conda build --test --debug 'llvmlite*.conda'"
DEBUG conda.gateways.logging:set_log_level(221): log_level set to 10
All tests passed
(base)  swap357@Swapnils-MacBook-Pro  ~/test  /bin/bash -c "conda build --test --debug 'llvmlite*.conda'"
DEBUG conda.gateways.logging:set_log_level(221): log_level set to 10
All tests passed

What should have happened instead?

According to the help documentation, --test requires "a path to built package file". When no valid package file is found:

  • The command should fail with an error indicating no matching package files were found
  • It should not report "All tests passed" when no tests were actually run

Conda Info

active environment : base
    active env location : /Users/swap357/miniconda3
            shell level : 1
       user config file : /Users/swap357/.condarc
 populated config files : /Users/swap357/.condarc
          conda version : 24.11.3
    conda-build version : 25.1.1
         python version : 3.12.2.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=m1
                          __conda=24.11.3=0
                          __osx=15.2=0
                          __unix=0=0
       base environment : /Users/swap357/miniconda3  (writable)
      conda av data dir : /Users/swap357/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-arm64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-arm64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/swap357/miniconda3/pkgs
                          /Users/swap357/.conda/pkgs
       envs directories : /Users/swap357/miniconda3/envs
                          /Users/swap357/.conda/envs
               platform : osx-arm64
             user-agent : conda/24.11.3 requests/2.32.3 CPython/3.12.2 Darwin/24.2.0 OSX/15.2 solver/libmamba conda-libmamba-solver/24.7.0 libmambapy/1.5.8 aau/0.5.0 c/. s/. e/. o/.
                UID:GID : 502:20
             netrc file : None
           offline mode : False

Conda Config

==> /Users/swap357/.condarc <==
channels:
  - defaults

==> envvars <==
allow_softlinks: False

Conda list

Additional Context

No response

@swap357 swap357 added the type::bug describes erroneous operation, use severity::* to classify the type label Feb 3, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::bug describes erroneous operation, use severity::* to classify the type
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant