conan test_package doesn't see options
See original GitHub issueHi, it seems that “conan test_package” command doesn’t see options any more, e.g. I’ve cloned the following repo: https://github.com/lasote/conan-zlib and got the following
C:\projects\conan>git clone https://github.com/lasote/conan-zlib.git zlib_lasote
Cloning into 'zlib_lasote'...
remote: Counting objects: 424, done.
remote: Compressing objects: 100% (6/6), done.
8 1% (302/424)
Receiving objects: 100% (424/424), 63.55 KiB | 0 bytes/s, done.
Resolving deltas: 100% (241/241), done.
Checking connectivity... done.
C:\projects\conan\zlib_lasote>conan export lasote/stable
zlib/1.2.8@lasote/stable: A new conanfile.py version was exported
zlib/1.2.8@lasote/stable: Folder: C:\Users\SSE4\.conan\data\zlib\1.2.8\lasote\stable\export
C:\projects\conan\zlib_lasote>conan test_package -o shared=False
ERROR: C:\projects\conan\zlib_lasote\test_package\conanfile.py: 'options.shared' doesn't exist
Possible options are []
C:\projects\conan\zlib_lasote>conan install zlib/1.2.8@lasote/stable -o shared=False
Requirements
zlib/1.2.8@lasote/stable from conan.io
Packages
zlib/1.2.8@lasote/stable:63da998e3642b50bee33f4449826b2d623661505
zlib/1.2.8@lasote/stable: Already installed!
so, “conan install” works, but “conan test_package” doesn’t, any ideas?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
conan test — conan 1.36.0 documentation
This command installs the conanfile dependencies (including the tested package), calls a 'conan build' to build test apps and finally executes the test()...
Read more >Creating conan test_package recipe - Stack Overflow
And all is fine. But now, I want to add some Unit test of my library. So I need to find/compile/link the "fcdk"...
Read more >LICENSE.md — Bincrafters Documentation 0.1.0 documentation
You can tweak and add flags in this file, but most times it just serves to enforce the “Conan-managed” settings and attributes during...
Read more >Updated Conan Package Flow 1.1 · Bincrafters Blog
Test Package Build Folder Cleanup. Also regarding test_package, we got some great new features in Conan 1.1. One of the lingering annoyances for ......
Read more >Conan packages in the Package Registry - GitLab Docs
For documentation of the specific API endpoints that the Conan package manager client uses, see the Conan API documentation. Learn how to build...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@memsharded yep, it worked - thanks a lot, pls close this issue
Hi, sometimes asking for an option (typically shared=True) for some packages should not lead to an error even when the package doesn’t provide a definition for it.
Indeed, even when providing shared=True or shared=False to a template header only library has no impact hence conan shouldn’t complain and exit when it is the case (or maybe a flag such as ignore-undeclared-option could be used to install package not declaring the option without failure).
Often, for the shared=True/False option, it can often be a global option used for all dependencies, and having the option explicitely defined only for a few specific dependencies when those dependencies don’t match the global option set.