[Rcpp-commits] r3429 - in pkg/Rcpp: . inst inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Dec 23 14:55:33 CET 2011


Author: edd
Date: 2011-12-23 14:55:32 +0100 (Fri, 23 Dec 2011)
New Revision: 3429

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/inst/NEWS
   pkg/Rcpp/inst/unitTests/runTests.R
Log:
modify fallback location of unitTest output files to be the RcppArmadillo.Rcheck/ dir


Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2011-12-23 13:52:38 UTC (rev 3428)
+++ pkg/Rcpp/ChangeLog	2011-12-23 13:55:32 UTC (rev 3429)
@@ -1,3 +1,8 @@
+2011-12-23  Dirk Eddelbuettel  <edd at debian.org>
+
+	* inst/unitTests/runTests.R: unit tests output 'fallback' directory
+	changed to '..' and files are now in top-level of $pkg.Rcheck/
+
 2011-12-21  Dirk Eddelbuettel  <edd at debian.org>
 
         * DESCRIPTION: Release 0.9.8

Modified: pkg/Rcpp/inst/NEWS
===================================================================
--- pkg/Rcpp/inst/NEWS	2011-12-23 13:52:38 UTC (rev 3428)
+++ pkg/Rcpp/inst/NEWS	2011-12-23 13:55:32 UTC (rev 3429)
@@ -1,3 +1,7 @@
+0.9.9   2012-xx-yy
+
+    o   Unit test output directory fallback changed to use Rcpp.Rcheck/
+
 0.9.8   2011-12-21
 
     o   wrap now handles 64 bit integers (int64_t, uint64_t) and containers 

Modified: pkg/Rcpp/inst/unitTests/runTests.R
===================================================================
--- pkg/Rcpp/inst/unitTests/runTests.R	2011-12-23 13:52:38 UTC (rev 3428)
+++ pkg/Rcpp/inst/unitTests/runTests.R	2011-12-23 13:55:32 UTC (rev 3429)
@@ -1,6 +1,6 @@
 ## -*- mode: R; tab-width: 4 -*-
 ##
-## Copyright (C) 2009- 2010	Dirk Eddelbuettel and Romain Francois
+## Copyright (C) 2009- 2011	Dirk Eddelbuettel and Romain Francois
 ##
 ## This file is part of Rcpp.
 ##
@@ -103,13 +103,8 @@
             }
         }
 
-                                        # if it did not work, try to use /tmp
-        if( is.null(output) ){
-            if( file.exists( "/tmp" ) ){
-                output <- "/tmp"
-            } else{
-                output <- getwd()
-            }
+        if( is.null(output) ) {         # if it did not work, use parent dir
+            output <- ".."              # as BDR does not want /tmp to be used
         }
 
         ## Print results
@@ -130,13 +125,13 @@
         ## This will cause R CMD check to return error and stop
         err <- getErrors(tests)
         if( (err$nFail + err$nErr) > 0) {
-        	data <- Filter( 
-        		function(x) any( sapply(x, function(.) .[["kind"]] ) %in% c("error","failure") ) , 
+        	data <- Filter(
+        		function(x) any( sapply(x, function(.) .[["kind"]] ) %in% c("error","failure") ) ,
         		tests[[1]]$sourceFileResults )
-        	err_msg <- sapply( data, 
+        	err_msg <- sapply( data,
         	function(x) {
-        		raw.msg <- paste( 
-        			sapply( Filter( function(.) .[["kind"]] %in% c("error","failure"), x ), "[[", "msg" ), 
+        		raw.msg <- paste(
+        			sapply( Filter( function(.) .[["kind"]] %in% c("error","failure"), x ), "[[", "msg" ),
         			collapse = " // "
         			)
         		raw.msg <- gsub( "Error in compileCode(f, code, language = language, verbose = verbose) : \n", "", raw.msg, fixed = TRUE )
@@ -145,7 +140,7 @@
         		}
         	)
         	msg <- sprintf( "unit test problems: %d failures, %d errors\n%s",
-        		err$nFail, err$nErr, 
+        		err$nFail, err$nErr,
         		paste( err_msg, collapse = "\n" )
         		)
         	stop( msg )



More information about the Rcpp-commits mailing list