Skip to content

Commit

Permalink
reduce cran tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Oct 6, 2019
1 parent 8704229 commit aa3fc01
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
13 changes: 9 additions & 4 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# CRAN notes for dodgr_0.2.5 submission

I finally managed to reproduce the previous UBSCAN and valgrind errors observed
by Brian Ripley on 20 Sept 2019. This submission definitely fixes, with both
AddressSanitizer and valgrind on r-devel returning only the by-now usual loss of
2-3000 bytes due to TBB code bundled in RcppParallel (see below). I humbly
Email from Uwe Ligges (5 Oct 2019) suggests package check time exceeded 10
minutes (13 min on r-devel-windows). I have correspondingly reduced numbers of
tests run, observing a local reduction to < 50% of former test time.

Other than that, and as stated on the immediately prior submission, I finally
managed to reproduce the previous UBSCAN and valgrind errors observed by Brian
Ripley on 20 Sept 2019. This submission definitely fixes, with both
AddressSanitizer and valgrind on r-devel returning only the by-now usual loss
of 2-3000 bytes due to TBB code bundled in RcppParallel (see below). I humbly
apologise for any inconvenience which may have arisen during my previously
unsuccessful attempts to resolve this issue.

Expand Down
9 changes: 5 additions & 4 deletions tests/testthat/test-graph-fns.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
context("dodgr graph functions")

skip_on_cran ()

test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") |
identical (Sys.getenv ("TRAVIS"), "true"))

skip_if (!test_all)

test_that("sample graph", {
graph <- weight_streetnet (hampi)
set.seed (1)
Expand Down Expand Up @@ -111,10 +115,7 @@ test_that("compare heaps", {
#expect_true (ch$elapsed [igr] == max (ch$elapsed))
# This actually fails on some machines (R oldrel on Windows) because elapsed
# times are sometimes all very small *and equal*, so is turned off:
if (test_all)
{
#expect_true (ch$elapsed [igr] > min (ch$elapsed))
}
#expect_true (ch$elapsed [igr] > min (ch$elapsed))
})

test_that("dodgr2sf", {
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-iso.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ test_that("isodists", {
expect_true (length (unique (d$dlim)) <= length (dlim))
})

skip_on_cran ()
skip_if (!test_all)

test_that ("turn penalty", {
hsc <- sf_to_sc (hampi)
net0 <- weight_streetnet (hsc, wt_profile = "bicycle")
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-sc.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ context("SC")
test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") |
identical (Sys.getenv ("TRAVIS"), "true"))

skip_on_cran ()
skip_if (!test_all)

#library (osmdata)
#devtools::load_all ("../../ropensci/osmdata", export_all = FALSE)
#h2 <- opq ("hampi india") %>%
Expand Down

0 comments on commit aa3fc01

Please sign in to comment.