[Rcpp-commits] r2910 - pkg/Rcpp/inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Feb 23 21:57:57 CET 2011


Author: edd
Date: 2011-02-23 21:57:57 +0100 (Wed, 23 Feb 2011)
New Revision: 2910

Modified:
   pkg/Rcpp/inst/unitTests/runit.Module.client.package.R
Log:
OS X 10.5 fix: skip unit test on this or earlier version


Modified: pkg/Rcpp/inst/unitTests/runit.Module.client.package.R
===================================================================
--- pkg/Rcpp/inst/unitTests/runit.Module.client.package.R	2011-02-21 03:45:38 UTC (rev 2909)
+++ pkg/Rcpp/inst/unitTests/runit.Module.client.package.R	2011-02-23 20:57:57 UTC (rev 2910)
@@ -1,7 +1,7 @@
 #!/usr/bin/r -t
 #       hey emacs, please make this use  -*- tab-width: 4 -*-
 #
-# Copyright (C) 2010	John Chambers, Dirk Eddelbuettel and Romain Francois
+# Copyright (C) 2010 - 2011	 John Chambers, Dirk Eddelbuettel and Romain Francois
 #
 # This file is part of Rcpp.
 #
@@ -22,8 +22,14 @@
 	gc()
 }
 
-if( Rcpp:::capabilities()[["Rcpp modules"]] ) {
+## The unit test in this file fails on OS X 10.5.* but pass on 10.6.*
+## Sys.info release comes back with 10.* for the latter but 9.* for the former
+## Thanks to Simon Urbanek and Baptiste Auguie for suggesting and testing this
+.badOSX <- (Sys.info()['sysname'] == "Darwin" &&
+            isTRUE(as.integer(gsub("\\..*","",Sys.info()['release'])) < 10L) )
 
+if( Rcpp:::capabilities()[["Rcpp modules"]] && ! .badOSX ) {
+
 test.Module.package <- function( ){
 
     td <- tempfile()



More information about the Rcpp-commits mailing list