[Rcpp-commits] r1803 - scripts
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jul 7 14:12:04 CEST 2010
Author: romain
Date: 2010-07-07 14:12:04 +0200 (Wed, 07 Jul 2010)
New Revision: 1803
Modified:
scripts/findSlowTests.r
Log:
minor update so that we can run the script from the top level dir
Modified: scripts/findSlowTests.r
===================================================================
--- scripts/findSlowTests.r 2010-07-07 12:08:13 UTC (rev 1802)
+++ scripts/findSlowTests.r 2010-07-07 12:12:04 UTC (rev 1803)
@@ -1,6 +1,8 @@
#!/usr/bin/Rscript
# this should really be /usr/bin/r but you-know-know on a Mac ...
-ntests <- sapply( list.files(), function(.) sum( grepl( "^test[.]", readLines( . ) ) ) )
-fast <- sapply( list.files(), function(.) any( grepl( "cxxfunction.*signatures", readLines( . ) ) ) )
+dir <- "Rcpp/inst/unitTests"
+files <- list.files( dir, pattern = "^runit[.]", full = TRUE )
+ntests <- sapply( files, function(.) sum( grepl( "^test[.]", readLines( . ) ) ) )
+fast <- sapply( files, function(.) any( grepl( "cxxfunction.*signatures", readLines( . ) ) ) )
print(head(subset( data.frame( ntests, fast )[ order(-ntests), ], !fast ),10))
More information about the Rcpp-commits
mailing list