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

[feature] Handle CONAN_RUN_TESTS together with self.should_test #7965

Closed
1 task done
klimkin opened this issue Oct 28, 2020 · 2 comments
Closed
1 task done

[feature] Handle CONAN_RUN_TESTS together with self.should_test #7965

klimkin opened this issue Oct 28, 2020 · 2 comments
Milestone

Comments

@klimkin
Copy link
Contributor

klimkin commented Oct 28, 2020

Conan already has condition to handle self.should_test. Expand the expression to cover CONAN_RUN_TESTS environment variable:

Current:

    def test(self, args=None, build_dir=None, target=None, output_on_failure=False):
        if not self._conanfile.should_test:
    return

Proposal:

    def test(self, args=None, build_dir=None, target=None, output_on_failure=False):
        if not self._conanfile.should_test and tools.get_env("CONAN_RUN_TESTS", True):
    return

CONAN_RUN_TESTS documentation.

@klimkin
Copy link
Contributor Author

klimkin commented Oct 28, 2020

A better solution could be to take CONAN_RUN_TEST into account when setting conan_file.should_test in cmd_build method.

@memsharded
Copy link
Member

Implemented in #8687, will be in Conan 1.35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants