rcst / rim

rim provides an interface to Maxima for R. Maxima is a powerful and fairly complete computer algebra system.
10 stars 3 forks source link

CRAN package check test suite fails for Fedora and Solaris #17

Closed rcst closed 3 years ago

rcst commented 3 years ago

CRAN Package Check Results for Package rim

Last updated on 2021-06-28 04:56:18 CEST.

Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags -- | -- | -- | -- | -- | -- | -- r-devel-linux-x86_64-debian-clang | 0.4.0 | 26.08 | 31.87 | 57.95 | OK |   r-devel-linux-x86_64-debian-gcc | 0.4.0 | 15.05 | 25.17 | 40.22 | OK |   r-devel-linux-x86_64-fedora-clang | 0.4.0 |   |   | 86.48 | ERROR |   r-devel-linux-x86_64-fedora-gcc | 0.4.0 |   |   | 73.71 | ERROR |   r-devel-windows-x86_64 | 0.4.0 | 29.00 | 60.00 | 89.00 | OK |   r-devel-windows-x86_64-gcc10-UCRT | 0.4.0 |   |   |   | OK |   r-patched-linux-x86_64 | 0.4.0 | 17.07 | 30.92 | 47.99 | OK |   r-patched-solaris-x86 | 0.4.0 |   |   | 4.90 | ERROR |   r-release-linux-x86_64 | 0.4.0 | 17.36 | 31.06 | 48.42 | OK |   r-release-macos-x86_64 | 0.4.0 |   |   |   | OK |   r-release-windows-ix86+x86_64 | 0.4.0 | 42.00 | 56.00 | 98.00 | OK |   r-oldrel-macos-x86_64 | 0.4.0 |   |   |   | OK |  

Check Details

Version: 0.4.0
Check: tests
Result: ERROR
     Running ‘testthat.R’ [7s/10s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > test_check("rim")
     Loading required package: rim
     Maxima successfully registered as knitr engine!
     Quitting from lines 16-18 (/data/gannet/ripley/R/packages/tests-clang/rim.Rcheck/rim/extdata/test.Rmd)
     ══ Skipped tests ═══════════════════════════════════════════════════════════════
     • No warnings to be tested under Maxima 5.43.0
     (1)
    
     ══ Failed tests ════════════════════════════════════════════════════════════════
     ── Error (test-apropos.R:4:3): apropos returns formatted strings ───────────────
     Error: Unsupported:
     incorrect syntax: Premature termination of input at ;.
     ;
     ^
     prompt;>>(%i3) <<prompt;
     Backtrace:
     █
     1. ├─testthat::expect_match(maxima.apropos("int"), "^[[:space:]|[:print:]]*$") test-apropos.R:4:2
     2. └─rim::maxima.apropos("int")
     3. └─maxima.env$maxima$get(paste0("apropos(\"", keystring, "\");"))
     ── Error (test-ask-user.R:6:3): ask prompts are returned ───────────────────────
     Error: Unsupported:
     incorrect syntax: Premature termination of input at ;.
     ;
     ^
     prompt;>>(%i4) <<prompt;
     Backtrace:
     █
     1. ├─testthat::expect_match(maxima.get("y;"), "^[[:space:]|[:print:]]*$") test-ask-user.R:6:2
     2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
     3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
     4. └─rim::maxima.get("y;")
     5. └─maxima.env$maxima$get(command)
     ── Error (test-engine.R:11:3): maxima knitr engine works ───────────────────────
     Error: Unsupported:
     incorrect syntax: Premature termination of input at ;.
     ;
     ^
     prompt;>>(%i5) <<prompt;
     Backtrace:
     █
     1. └─knitr::knit(input = fr[1], output = fo, quiet = TRUE, envir = .GlobalEnv) test-engine.R:11:2
     2. └─knitr:::process_file(text, output)
     3. ├─base::withCallingHandlers(...)
     4. ├─knitr:::process_group(group)
     5. └─knitr:::process_group.block(group)
     6. └─knitr:::call_block(x)
     7. └─knitr:::block_exec(params)
     8. ├─knitr:::in_dir(input_dir(), engine(options))
     9. └─rim:::engine(options)
     10. └─maxima.env$mx$get(code[i])
     ── Error (test-execute.R:5:3): execution returns formatted strings ─────────────
     Error: Unsupported:
     incorrect syntax: Premature termination of input at ;.
     ;
     ^
     prompt;>>(%i7) <<prompt;
     Backtrace:
     █
     1. ├─testthat::expect_match(maxima.get("2+2;"), "^4$") test-execute.R:5:2
     2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
     3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
     4. └─rim::maxima.get("2+2;")
     5. └─maxima.env$maxima$get(command)
     ── Error (test-setformat.R:8:3): changing the output format works ──────────────
     Error: Unsupported:
     incorrect syntax: Premature termination of input at ;.
     ;
     ^
     prompt;>>(%i10) <<prompt;
     Backtrace:
     █
     1. ├─testthat::expect_match(maxima.get("2+2;"), "4") test-setformat.R:8:2
     2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
     3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
     4. └─rim::maxima.get("2+2;")
     5. └─maxima.env$maxima$get(command)
    
     [ FAIL 5 | WARN 0 | SKIP 1 | PASS 4 ]
     Error: Test failures
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.4.0
Check: tests
Result: ERROR
     Running ‘testthat.R’ [9s/13s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > test_check("rim")
     Loading required package: rim
     Maxima successfully registered as knitr engine!
     Quitting from lines 10-13 (/data/gannet/ripley/R/packages/tests-devel/rim.Rcheck/rim/extdata/test.Rmd)
     ══ Skipped tests ═══════════════════════════════════════════════════════════════
     • No warnings to be tested under Maxima 5.43.0
     (1)
    
     ══ Failed tests ════════════════════════════════════════════════════════════════
     ── Error (test-ask-user.R:6:3): ask prompts are returned ───────────────────────
     Error: Unsupported:
     incorrect syntax: Premature termination of input at ;.
     ;
     ^
     prompt;>>(%i4) <<prompt;
     Backtrace:
     █
     1. ├─testthat::expect_match(maxima.get("y;"), "^[[:space:]|[:print:]]*$") test-ask-user.R:6:2
     2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
     3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
     4. └─rim::maxima.get("y;")
     5. └─maxima.env$maxima$get(command)
     ── Error (test-engine.R:11:3): maxima knitr engine works ───────────────────────
     Error: Unsupported:
     incorrect syntax: Premature termination of input at ;.
     ;
     ^
     prompt;>>(%i4) <<prompt;
     Backtrace:
     █
     1. └─knitr::knit(input = fr[1], output = fo, quiet = TRUE, envir = .GlobalEnv) test-engine.R:11:2
     2. └─knitr:::process_file(text, output)
     3. ├─base::withCallingHandlers(...)
     4. ├─knitr:::process_group(group)
     5. └─knitr:::process_group.block(group)
     6. └─knitr:::call_block(x)
     7. └─knitr:::block_exec(params)
     8. ├─knitr:::in_dir(input_dir(), engine(options))
     9. └─rim:::engine(options)
     10. └─maxima.env$mx$get(code[i])
     ── Error (test-execute.R:6:3): execution returns formatted strings ─────────────
     Error: Unsupported:
     incorrect syntax: Premature termination of input at ;.
     ;
     ^
     prompt;>>(%i10) <<prompt;
     Backtrace:
     █
     1. ├─testthat::expect_match(...) test-execute.R:6:2
     2. └─rim::maxima.get("jacobian( [alpha / (alpha + beta), 1 / sqrt(alpha + beta)], [alpha, beta] )")
     3. └─maxima.env$maxima$get(command)
     ── Error (test-setformat.R:8:3): changing the output format works ──────────────
     Error: Unsupported:
     incorrect syntax: Premature termination of input at ;.
     ;
     ^
     prompt;>>(%i13) <<prompt;
     Backtrace:
     █
     1. ├─testthat::expect_match(maxima.get("2+2;"), "4") test-setformat.R:8:2
     2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
     3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
     4. └─rim::maxima.get("2+2;")
     5. └─maxima.env$maxima$get(command)
    
     [ FAIL 4 | WARN 0 | SKIP 1 | PASS 6 ]
     Error: Test failures
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 0.4.0
Check: whether package can be installed
Result: ERROR
    Installation failed.
Flavor: r-patched-solaris-x86

rcst commented 3 years ago

After a first inspection using Fedora 34 in VM the errors seem to be caused by an unfortunate reading-split of lines.

On my for example I get a read out from the socket like this:

out;>>
(
%o3) log(x)
<<out;
prompt;>>(%i4) <<prompt;

Which then fails to read the output label being used as validation in Reply$initialize(con)

39: regex(text = [...], pattern = "out;>>\\s+\\((%o(\\d+))\\)\\s\\n?([[:space:]|[:print:]]*)\\s+<<out;")
rcst commented 3 years ago

fixed in 541d167