5

我正在开发一个使用 Travis CI 测试R 项目。当我在本地运行测试时,所有测试都通过了。当这些测试在 Travis CI 上运行时,一些测试会失败。testthat

问题是我看不到测试运行后出现的详细错误消息。

我确实看到了 Travis 错误的“顶部”:

ERROR

Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
  OK: 825 SKIPPED: 0 FAILED: 9
  1. Error: one posterior is added (@test-add_posteriors.R#44) 
  2. Error: two posteriors are added (@test-add_posteriors.R#116) 
  3. Error: three posteriors are added, middle is deleted and added again (@test-add_posteriors.R#197) 
  4. Error: alignment_to_beast_posterior: basic (@test-alignment_to_beast_posterior.R#28) 
  5. Error: are_identical_posteriors: use from local simulation (@test-are_identical_posteriors.R#58) 
  6. Error: do_simulation: use (@test-do_simulation.R#22) 
  7. Error: do_test_simulations: create exact replicate (@test-do_test_simulations.R#9) 
  8. Error: get_posteriors: add one (@test-get_posteriors.R#55) 
  9. Error: get_posteriors: add two (@test-get_posteriors.R#98) 

  Error: testthat unit tests failed
  Execution halted

我没有在 Travis CI 上看到错误消息的“底部”。我在这里举了一个例子,所以你知道我希望看到什么:

Failed -------------------------------------------------------------------------
1. Failure: alignment is added (@test-add_alignments.R#49) ---------------------
add_alignments(filename, verbose = TRUE) did not throw an error.

我期望/希望我能掌握 Travis CI 的“下部”。我希望/希望某处有一个日志文件,但我找不到在哪里。

[编辑:添加此] 请注意,有时我会看到类似下面示例输出的输出。这可能是一个单独的问题,但我也很想在那里看到所有输出行:

Last 13 lines of output:
  2: alignment_to_beast_posterior(alignment_dnabin = alignment, base_filename = basefilename, 
         mcmc_chainlength = mcmc_chainlength, rng_seed = new_seed, skip_if_output_present = skip_if_output_present, 
         verbose = verbose)
  3: stop("alignment_to_beast_posterior: ", "file '", beast_trees_filename, "' should have been created")
4

0 回答 0