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

Integration tests #17

Closed
Ilia-Kosenkov opened this issue Jan 11, 2021 · 4 comments
Closed

Integration tests #17

Ilia-Kosenkov opened this issue Jan 11, 2021 · 4 comments

Comments

@Ilia-Kosenkov
Copy link
Member

As was discussed in #15, without proper tests it is impossible to catch errors like the one fixed in #16.
However, tests cannot be rust-dependent or otherwise compromise CRAN builds.
So tests can be either skipped on CRAN (or using other condition), or they can be implemented outside of the normal test framework and executed manually on CI.

I suggest to have skip_on_cran tests that can be executed when package is installed by the client -- to immediately reveal if client's system is misconfigured.

@clauswilke
Copy link
Member

We currently skip all tests when cargo is not available:

result <- system2("cargo")
if (result == 0L) {
test_check("rextendr")
}

This check should be extended to skip all tests on CRAN. I don't think there are going to be any tests that meaningfully can be executed on CRAN.

The check should use something like this code from testthat:
https://github.com/r-lib/testthat/blob/149c888b8163c7070d66d691c2ef6d7b3eed8745/R/skip.R#L131

@clauswilke
Copy link
Member

It's probably a good idea to merge #7 before addressing this issue.

@yutannihilation
Copy link
Contributor

Can we close this issue?

@clauswilke
Copy link
Member

Yes, I think so. I'll mention that maybe we need to rethink the idea of skipping all tests on CRAN. We're starting to add many unit tests that aren't Rust-dependent and that could run on CRAN.

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

3 participants