-
Notifications
You must be signed in to change notification settings - Fork 78
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
unittest fails #502
Comments
Thanks. What's your locale? Can you please try running in a UTF-8 locale? |
I'm running tests inside poudriere jail (packager) and root have default C.UTF-8 locale. Should I try anything else?
|
Thanks. This definitely looks like an encoding issue, but it's hard for me to reproduce. Is there a Docker file/image that helps with this? |
Never used Docker but I found this link: Other possibility is to run a FreeBSD in a VM: On my local account (outside jail), same UTF-8 locale, same error:
|
Thanks, this is useful. I wonder why this test is even run on your platform, it has: skip_on_os("linux")
skip_on_os("mac")
skip_on_os("solaris") Basically, skip everywhere except on Windows. Can you please share your |
|
Searching for correct define for freebsd unix in https://stat.ethz.ch/R-manual/R-devel/library/base/html/Platform.html and maybe should I try |
(...)
|
This is what is used internally: testthat:::system_os()
#> [1] "darwin"
testthat:::system_os
#> function ()
#> tolower(Sys.info()[["sysname"]])
#> <bytecode: 0x117a85400>
#> <environment: namespace:testthat>
testthat::skip_on_os
#> function (os, arch = NULL)
#> {
#> os <- match.arg(os, choices = c("windows", "mac", "linux",
#> "solaris"), several.ok = TRUE)
#> msg <- switch(system_os(), windows = if ("windows" %in% os) "On Windows",
#> darwin = if ("mac" %in% os) "On Mac", linux = if ("linux" %in%
#> os) "On Linux", sunos = if ("solaris" %in% os) "On Solaris")
#> if (!is.null(arch) && !is.null(msg)) {
#> if (!is.character(arch)) {
#> abort("`arch` must be a character vector")
#> }
#> if (system_arch() %in% arch) {
#> msg <- paste(msg, system_arch())
#> }
#> else {
#> msg <- NULL
#> }
#> }
#> if (is.null(msg)) {
#> invisible(TRUE)
#> }
#> else {
#> skip(msg)
#> }
#> }
#> <bytecode: 0x117b4f190>
#> <environment: namespace:testthat> Created on 2024-04-01 with reprex v2.1.0 So we'd either need a patch in testthat (which will take some time) or a workaround here. Of all the patches possible, I could imagine a |
Paching test-encoding.R:
test result: (reduced from 4 to 2 fails)
|
The test failures indicate that |
Is there a way to include |
Yes, we'd need a patch in testthat. The alternative is a plain skip_if_not(.Platform$OS.type == "windows") |
Cool, that works fine, tests run OK and it makes some kind of logic since this test is only for windows?
|
Agree. I'll keep looking for the "multiple |
Nice, will this be fixed upstream or should I patch package manually? I'm not the RSQLite FreeBSD port maintainer but my work depends on it for a set of new R ports. |
Happy to review a PR here (do you mean this by "upstream"?), but it might take a while before this hits CRAN. Patching manually might be the best option right now. |
Nice. By "upstream" I mean the project coders, "downstream" will be a FreeBSD port, e.g.. Thanks! |
I'd appreciate if you could point me to the patch or submit a PR here. |
I think a pull request will be simplier. Thanks |
Under FreeBSD test fails because it only skips linux, mac and solaris. Opimize logic and use this test only on windows. Fixes r-dbi/RSQLite#502
Tests fails with same error on 2.3.5 and 2.3.6.
Any clues?
Thanks
Failed test log
testthat.Rout.fail.log
The text was updated successfully, but these errors were encountered: