Run Tests feature could not find non-exported function

daily

#1

Hello,

When using the 1.2.792 version of RStudio Server on x86_64-pc-linux-gnu (details attached below) I came across the fact that the new Run Tests feature will fail with could not find function "[function name]" if the function is not exported, even though running the tests with the classic devtools::test() works fine.

A picture worth a 1000 words:
gif

RStudio diagnostic report output:


[1] "1.2.792"

$R
[1] "/usr/bin/R"

$pdflatex
[1] "/usr/bin/pdflatex"

$bibtex
[1] "/usr/bin/bibtex"

$gcc
[1] "/usr/bin/gcc"

$git
[1] "/usr/bin/git"

$svn
[1] ""

R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] jhaddins_0.0.0.9000 testthat_2.0.0     

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.14     roxygen2_6.0.1   crayon_1.3.4     assertthat_0.2.0
 [5] digest_0.6.13    withr_2.1.1      commonmark_1.4   R6_2.2.2        
 [9] magrittr_1.5     cli_1.0.0        rlang_0.2.0      stringi_1.1.6   
[13] rstudioapi_0.7   xml2_1.1.1       devtools_1.13.6  tools_3.4.3     
[17] stringr_1.2.0    compiler_3.4.3   memoise_1.1.0   

SysInfo:
                                       sysname 
                                       "Linux" 
                                       release 
                           "4.4.0-130-generic" 
                                       version 
"#156-Ubuntu SMP Thu Jun 14 08:53:28 UTC 2018" 
                                      nodename 
                                           "r" 
                                       machine 
                                      "x86_64" 
                                         login 
                                     "unknown" 
                                          user 
                                       "jozef" 
                                effective_user 
                                       "jozef" 

R Version:
               _                           
platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          3                           
minor          4.3                         
year           2017                        
month          11                          
day            30                          
svn rev        73796                       
language       R                           
version.string R version 3.4.3 (2017-11-30)
nickname       Kite-Eating Tree            
$CLICOLOR_FORCE
[1] "1"

$DISPLAY
[1] ":0"

$EDITOR
[1] "vi"

$GIT_ASKPASS
[1] "rpostback-askpass"

$HOME
[1] "/home/jozef"

$LANG
[1] "en_US.UTF-8"

$LD_LIBRARY_PATH
[1] "/usr/lib/R/lib::/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/jre/lib/amd64/server"

$LN_S
[1] "ln -s"

$LOGNAME
[1] "jozef"

$MAKE
[1] "make"

$PAGER
[1] "/usr/bin/pager"

$PATH
[1] "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

$R_BROWSER
[1] "xdg-open"

$R_BZIPCMD
[1] "/bin/bzip2"

$R_DOC_DIR
[1] "/usr/share/R/doc"

$R_GZIPCMD
[1] "/bin/gzip -n"

$R_HOME
[1] "/usr/lib/R"

$R_INCLUDE_DIR
[1] "/usr/share/R/include"

$R_LIBS_SITE
[1] "/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library"

$R_LIBS_USER
[1] "~/R/x86_64-pc-linux-gnu-library/3.4"

$RMARKDOWN_MATHJAX_PATH
[1] "/usr/lib/rstudio-server/resources/mathjax-26"

$R_PAPERSIZE
[1] "letter"

$R_PAPERSIZE_USER
[1] "letter"

$R_PDFVIEWER
[1] "/usr/bin/xdg-open"

$R_PLATFORM
[1] "x86_64-pc-linux-gnu"

$R_PRINTCMD
[1] "/usr/bin/lpr"

$R_RD4PDF
[1] "times,inconsolata,hyper"

$R_SESSION_TMPDIR
[1] "/tmp/RtmpNwHW8d"

$R_SHARE_DIR
[1] "/usr/share/R/share"

$RS_RPOSTBACK_PATH
[1] "/usr/lib/rstudio-server/bin/rpostback"

$RSTUDIO
[1] "1"

$RSTUDIO_CONSOLE_COLOR
[1] "256"

$RSTUDIO_CONSOLE_WIDTH
[1] "74"

$RSTUDIO_HTTP_REFERER
[1] "http://138.68.83.208:8787/"

$RSTUDIO_PANDOC
[1] "/usr/lib/rstudio-server/bin/pandoc"

$RSTUDIO_SESSION_STREAM
[1] "jozef-d"

$RSTUDIO_USER_IDENTITY
[1] "jozef"

$RSTUDIO_WINUTILS
[1] "bin/winutils"

$R_SYSTEM_ABI
[1] "linux,gcc,gxx,gfortran,?"

$R_TEXI2DVICMD
[1] "/usr/bin/texi2dvi"

$R_UNZIPCMD
[1] "/usr/bin/unzip"

$R_ZIPCMD
[1] "/usr/bin/zip"

$SED
[1] "/bin/sed"

$SSH_ASKPASS
[1] "rpostback-askpass"

$TAR
[1] "/bin/tar"

$TERM
[1] "xterm-256color"

$USER
[1] "jozef"

 [1] ".GlobalEnv"        "devtools_shims"    "package:jhaddins" 
 [4] "package:testthat"  "tools:rstudio"     "package:stats"    
 [7] "package:graphics"  "package:grDevices" "package:utils"    
[10] "package:datasets"  "package:methods"   "Autoloads"        
[13] "package:base"

#2

Thanks for the bug report! We're now tracking the issue here: https://github.com/rstudio/rstudio/issues/3208