[Rcpp-commits] r4605 - scripts
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 14 04:14:02 CET 2014
Author: edd
Date: 2014-01-14 04:14:00 +0100 (Tue, 14 Jan 2014)
New Revision: 4605
Added:
scripts/runRcppArmadilloDepends.r
Modified:
scripts/runRcppDepends.r
Log:
updated test script for Rcpp; added one for RcppArmadillo
Added: scripts/runRcppArmadilloDepends.r
===================================================================
--- scripts/runRcppArmadilloDepends.r (rev 0)
+++ scripts/runRcppArmadilloDepends.r 2014-01-14 03:14:00 UTC (rev 4605)
@@ -0,0 +1,35 @@
+#!/usr/bin/r
+
+cat("Started at ", format(Sys.time()), "\n")
+pkg <- "RcppArmadillo"
+
+setwd("/tmp/RcppDepends")
+
+AP <- available.packages(contrib.url("http://cran.r-project.org"), filter=list()) # available package at CRAN
+rcpparmaset <- sort(unname(AP[unique(c(grep(pkg, as.character(AP[,"Depends"])),
+ grep(pkg, as.character(AP[,"LinkingTo"])),
+ grep(pkg, as.character(AP[,"Imports"])))),"Package"]))
+print( rcpparmaset )
+
+res <- data.frame(pkg=rcpparmaset, res=NA)
+
+#for (pi in 1:nrow(res)) {
+#lres <- mclapply(1:nrow(res), mc.cores = 4, FUN=function(pi) {
+lres <- lapply(1:nrow(res), FUN=function(pi) {
+ p <- rcpparmaset[pi]
+ i <- which(AP[,"Package"]==p)
+ pkg <- paste(AP[i,"Package"], "_", AP[i,"Version"], ".tar.gz", sep="")
+ pathpkg <- paste(AP[i,"Repository"], "/", pkg, sep="")
+ #print(pathpkg)
+ if (!file.exists(pkg)) download.file(pathpkg, pkg, quiet=TRUE)
+ rc <- system(paste("R CMD check --no-manual --no-vignettes ", pkg, " > ", pkg, ".log", sep=""))
+ res[pi, "res"] <- rc
+ cat(rc, ":", pkg, "\n")
+ res[pi, ]
+})
+
+res <- do.call(rbind, lres)
+print(res)
+write.table(res, file=paste("result-", strftime(Sys.time(), "%Y%m%d-%H%M%S"), ".txt", sep=""), sep=",")
+save(res, file=paste("result-", strftime(Sys.time(), "%Y%m%d-%H%M%S"), ".RData", sep=""))
+cat("Ended at ", format(Sys.time()), "\n")
Property changes on: scripts/runRcppArmadilloDepends.r
___________________________________________________________________
Added: svn:executable
+ *
Modified: scripts/runRcppDepends.r
===================================================================
--- scripts/runRcppDepends.r 2014-01-14 03:11:04 UTC (rev 4604)
+++ scripts/runRcppDepends.r 2014-01-14 03:14:00 UTC (rev 4605)
@@ -3,6 +3,10 @@
cat("Started at ", format(Sys.time()), "\n")
#library(parallel)
+## use a test-local directory, install Rcpp, RcppArmadillo, ... there
+## this will work for sub-shells such as the ones started by system() below
+Sys.setenv("R_LIBS_USER"="/tmp/RcppDepends/lib")
+
## for the borked src/Makevars of ExactNumCI
Sys.setenv("BOOSTLIB"="/usr/include")
@@ -12,15 +16,19 @@
rcppset <- sort(unname(AP[unique(c(grep("Rcpp", as.character(AP[,"Depends"])),
grep("Rcpp", as.character(AP[,"LinkingTo"])),
grep("Rcpp", as.character(AP[,"Imports"])))),"Package"]))
-if (grep("transnet", rcppset)) { ## not really an Rcpp user
- rcppset <- rcppset[ ! grepl("transnet", rcppset) ]
-}
+#if (grep("transnet", rcppset)) { ## not really an Rcpp user
+# rcppset <- rcppset[ ! grepl("transnet", rcppset) ]
+#}
if (grep("BioGeoBEARS", rcppset)) { ## indirect match, no need to test
rcppset <- rcppset[ ! grepl("BioGeoBEARS", rcppset) ]
}
if (grep("quadrupen", rcppset)) { ## takes hours, skipping
rcppset <- rcppset[ ! grepl("quadrupen", rcppset) ]
}
+if (grep("roxygen2", rcppset)) { ## seems to hang for reasons that are unclear
+ rcppset <- rcppset[ ! grepl("roxygen2", rcppset) ]
+}
+
print( rcppset )
res <- data.frame(pkg=rcppset, res=NA)
More information about the Rcpp-commits
mailing list