Skip to content

Commit c4be522

Browse files
committed
debug actions
1 parent 41424e9 commit c4be522

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/build_test.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/usr/bin/env Rscript
22
# Run inside the built Docker image to verify install and tests.
3-
# Working directory in the container is the package root (/code).
3+
# Ensure we are in the package root (script lives at tests/build_test.R).
4+
this_file <- sub("^--file=", "", commandArgs(trailingOnly = FALSE)[grep("^--file=", commandArgs(trailingOnly = FALSE))])
5+
if (length(this_file)) setwd(dirname(dirname(normalizePath(this_file))))
46

57
# Install this package from source (dependencies already in image)
68
install.packages(".", repos = NULL, type = "source")
79

8-
# Run the test suite
9-
source("tests/testthat.R")
10+
# Run tests from source tree (test_check() looks in installed pkg, which has no tests/)
11+
testthat::test_local()

0 commit comments

Comments
 (0)