Skip to content

Commit

Permalink
port r49269:70 from trunk
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/branches/R-2-9-branch@49271 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Aug 17, 2009
1 parent b3226b1 commit 1503b23
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
4 changes: 3 additions & 1 deletion NEWS
Expand Up @@ -88,12 +88,14 @@ BUG FIXES
expansions lose accuracy (the underlying TOMS708 C code was
ignoring some of these, including the PR#13786 example).

o new.env(hash = TRUE, size = NA) now works, the way it has been
o new.env(hash = TRUE, size = NA) now works the way it has been
documented to for a long time.

o tcltk::tk_choose.files(multi = TRUE) produces better-formatted
output with filenames containing spaces. (PR#13875)

o R CMD check --use-valgrind did not run valgrind on the package tests.



CHANGES IN R VERSION 2.9.1
Expand Down
5 changes: 3 additions & 2 deletions src/library/tools/R/testing.R
Expand Up @@ -246,14 +246,15 @@ testInstalledPackage <-
}

## used by R CMD check
.runPackageTests <- function(use_gct = FALSE)
.runPackageTests <- function(use_gct = FALSE, use_valgrind = TRUE)
{
runone <- function(f)
{
message(" Running ", sQuote(f))
outfile <- paste(f, "out", sep = "")
cmd <- paste(shQuote(file.path(R.home(), "bin", "R")),
"CMD BATCH --vanilla --no-timing",
if(use_valgrind) "--debugger=valgrind",
shQuote(f), shQuote(outfile))
if (.Platform$OS.type == "windows") {
Sys.setenv(LANGUAGE="C")
Expand Down Expand Up @@ -281,7 +282,7 @@ testInstalledPackage <-
Rinfiles <- dir(".", pattern="\\.Rin$")
for(f in Rinfiles) {
Rfile <- sub("\\.Rin$", ".R", f)
message(" Creating ", sQuote(Rfile))
message(" Creating ", sQuote(Rfile), domain = NA)
cmd <- paste(shQuote(file.path(R.home(), "bin", "R")),
"CMD BATCH --no-timing --vanilla --slave", f)
if (system(cmd))
Expand Down
14 changes: 13 additions & 1 deletion src/scripts/check.in
Expand Up @@ -2456,7 +2456,19 @@ sub check_pkg {
}
chdir($testdir);
dircopy($testsrcdir, ".");
if($opt_use_gct) {$extra = "use_gct = TRUE";} else {$extra = "";}
if($opt_use_valgrind) {
if($opt_use_gct) {
$extra = "use_gct = TRUE, use_valgrind = TRUE";
} else {
$extra = "use_valgrind = TRUE";
}
} else {
if($opt_use_gct) {
$extra = "use_gct = TRUE";
} else {
$extra = "";
}
}
$cmd = join(" ",
("(echo 'tools:::.runPackageTestsR($extra)' |",
&shell_quote_file_path(${R::Vars::R_EXE}),
Expand Down

0 comments on commit 1503b23

Please sign in to comment.