-
Notifications
You must be signed in to change notification settings - Fork 20
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
tinytest and Rcpp (Attributes) are not playing along #37
Comments
FWIW same behaviour on 1.0.0 and 1.0.0.7. |
Ha..have a quick look at #36 |
I had. But I suspect that is not it. Blows up with I did add that env.var in the |
Tried again. No impact. Still fails. 😢 |
Attached is a trimmed-down version of the package (no |
I think I got it. We need two things, and I had only done one at a time (doh)
That seems to work. 🍰 Medium-term, I see two things:
|
Here is a better version proving that theory (the .1 above had one other wart) |
And parallel tests work fine too. |
Wow, thanks for all that work! I haven't had a chance this weekend to look into it. But this is something I can definitely work with. |
All works wonders for me if and only if I turn side-effects off in the runner in
Otherwise, edd@rob:~$ tt.r -p RcppArmadillo ## littler helper in 'test package' mode
starting worker pid=6475 on localhost:11311 at 13:17:36.362
starting worker pid=6502 on localhost:11311 at 13:17:36.509
starting worker pid=6543 on localhost:11311 at 13:17:36.650
starting worker pid=6568 on localhost:11311 at 13:17:36.790
Running test_rng.R.................... 10 tests OK
Running test_complex.R................ 11 tests OK
Running test_sample.R................. 21 tests OK
Running test_cube.R................... 18 tests OK
Running test_fastLm.R................. 25 tests OK
Running test_rcpparmadillo.R.......... 48 tests OK
Running test_Rlapack.R................ 7 tests OK
Running test_scipy2r.R................ 4 tests OK 1 side-effects
Running test_rmultinom.R.............. 9 tests OK
Running test_sparse.R................. 12 tests OK
Running test_sparseConversion.R....... 86 tests OK
----- SIDEFX[envv]: test_scipy2r.R<33--33>
call| if (!py_module_available("scipy")) exit_file("Module scipy missing")
diff| Added envvar 'R_SESSION_INITIALIZED' with value 'PID=6568:NAME="reticulate"'
diff| Added envvar 'RETICULATE_REQUIRED_MODULE' with value 'scipy'
diff| Changed envvar 'PATH' from '/home/edd/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin' to '/usr/bin:/home/edd/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
Showing 1 out of 252 results: 0 fails, 251 passes, 1 side effects
edd@rob:~$
edd@rob:~$
edd@rob:~$ tt.r -pz RcppArmadillo ## littler helper in 'test package' mode, suppress fx
starting worker pid=7234 on localhost:11807 at 13:17:43.703
starting worker pid=7261 on localhost:11807 at 13:17:43.846
starting worker pid=7301 on localhost:11807 at 13:17:43.987
starting worker pid=7327 on localhost:11807 at 13:17:44.132
Running test_complex.R................ 11 tests OK
Running test_rng.R.................... 10 tests OK
Running test_sample.R................. 21 tests OK
Running test_cube.R................... 18 tests OK
Running test_fastLm.R................. 25 tests OK
Running test_rcpparmadillo.R.......... 48 tests OK
Running test_Rlapack.R................ 7 tests OK
Running test_rmultinom.R.............. 9 tests OK
Running test_scipy2r.R................ 4 tests OK
Running test_sparse.R................. 12 tests OK
Running test_sparseConversion.R....... 86 tests OK
[1] "All ok, 251 results"
edd@rob:~$ And I can't even sheepishly try to 'undo' the env var settings that |
Found this note by @HenrikBengtsson. Looks like currently, Also, I have to make sure this is done for all parallel sessions in case of parallel testing. |
Yes. See the |
My plan of switching the Rcpp family to tinytest hit the skids on the first test I tried for RcppArmadillo.
In a nutshell, an existing test file like this one for RUnit has a call to on-demand compile a C++ file with the C++ side of the tests. We use an in-package helper function for that in Rcpp and RcppArmadillo, but mostly only because RUnit is not as clever as tinytest about where it runs.
So then for tinytest, I just tried
which "should just work" -- and does indeed on the command-line with either the file or directory runner:
But when I let
R CMD check
loose, all hope is lost, and I get an error message I do not think I have ever seen before (!!):No C++ compiler? Really? Could it be that tinytest set things up so tight that certain maintained assumptions no longer hold?
The text was updated successfully, but these errors were encountered: