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

Only compile tests for fpm test command #92

Closed
certik opened this issue Jun 7, 2020 · 3 comments · Fixed by #572
Closed

Only compile tests for fpm test command #92

certik opened this issue Jun 7, 2020 · 3 comments · Fixed by #572
Labels
easy Difficulty level is easy and good for starting into this project good first issue Good for newcomers

Comments

@certik
Copy link
Member

certik commented Jun 7, 2020

cargo build does not build tests. You have to do cargo build --tests to also build tests.

cargo test build tests (if needed) and runs them.

I suggest we follow the same approach.

@awvwgk
Copy link
Member

awvwgk commented Sep 5, 2021

How would we implement this behaviour? Would we remove the tests when building the model from the manifest or should we just filter them out from the targets?

@certik
Copy link
Member Author

certik commented Sep 5, 2021

Model should have everything. Then in fpm build you only build the main program but not tests. That can be achieved with multiple approaches, either removing the tests from the model, or by skipping them when building.

@LKedward
Copy link
Member

How would we implement this behaviour? Would we remove the tests when building the model from the manifest or should we just filter them out from the targets?

I agree and would suggest keeping everything in the model and simply filtering them out with additional arguments when building the target list in build_target_list

@LKedward LKedward changed the title Behavior of fpm build and fpm test Only compile tests for fpm test command Sep 14, 2021
@LKedward LKedward added easy Difficulty level is easy and good for starting into this project good first issue Good for newcomers and removed specification Issue regarding fpm manifest and model labels Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy Difficulty level is easy and good for starting into this project good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants