Skip to content

Commit 325cf1b

Browse files
author
smeyer
committed
update stoplist, esp. download/interactive functions
git-svn-id: https://svn.r-project.org/R/trunk@88003 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 35b2bf5 commit 325cf1b

File tree

1 file changed

+51
-48
lines changed

1 file changed

+51
-48
lines changed

tests/no-segfault.Rin

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -15,81 +15,78 @@ core.pkgs <- c(core.pkgs, "methods", "stats4")
1515
stop.list <- vector("list", length(core.pkgs))
1616
names(stop.list) <- core.pkgs
1717

18-
## -- Stop List for base/graphics/utils:
19-
edit.int <- c("fix", "edit", "edit.data.frame", "edit.matrix",
20-
"edit.default", "vi", "file.edit",
21-
"emacs", "pico", "xemacs", "xedit", "RSiteSearch", "help.request")
22-
18+
## -- Stop List for base/grDevices/utils:
2319
## warning: readLines will work, but read all the rest of the script
2420
## warning: trace will load methods.
2521
## warning: rm and remove zap c0, l0, m0, df0
2622
## warning: parent.env(NULL) <- NULL creates a loop
27-
## warning: browseVignettes launches many browser processes.
28-
## news, readNEWS, rtags are slow, and R-only code.
29-
misc.int <- c("browser", "browseVignettes", "bug.report", "checkCRAN",
30-
"getCRANmirrors", "lazyLoad", "menu", "repeat",
23+
## warning: browseVignettes/RSiteSearch/help.start launch many browser processes
24+
## news, rtags are slow, and R-only code.
25+
misc.int <- c("browser", "browseVignettes", "RSiteSearch", "help.start",
26+
"checkCRAN", "lazyLoad", "menu", "q", "quit", "repeat",
3127
"readLines", "package.skeleton", "trace", "recover",
3228
"rm", "remove", "parent.env<-",
33-
"builtins", "data", "help", "news", "rtags", "vignette",
34-
"installed.packages")
35-
inet.list <- c(apropos("download\\."),
36-
apropos("^url\\."), apropos("\\.url"),
37-
apropos("packageStatus"),
38-
paste(c("CRAN", "install", "update", "old"), "packages", sep="."))
29+
"builtins", "data", "help", "news", "rtags", "vignette")
3930
socket.fun <- apropos("socket")
4031
## "Interactive" ones:
4132
dev.int <- c("X11", "x11", "pdf", "postscript",
42-
"xfig", "jpeg", "png", "pictex", "quartz",
33+
"bmp", "jpeg", "png", "pictex", "quartz",
4334
"svg", "tiff", "cairo_pdf", "cairo_ps",
4435
"getGraphicsEvent")
45-
misc.2 <- c("asS4", "help.start", "browseEnv", "make.packages.html",
46-
"gctorture", "q", "quit", "restart", "try",
36+
misc.2 <- c("asS4", "browseEnv", "make.packages.html",
37+
"gctorture", "try",
4738
"read.fwf", "source",## << MM thinks "FIXME"
4839
"data.entry", "dataentry", "de", apropos("^de\\."),
49-
"chooseCRANmirror", "setRepositories", "select.list", "View")
40+
"setRepositories", "select.list", "View")
5041
if(.Platform$OS.type == "windows") {
51-
dev.int <- c(dev.int, "bmp", "windows", "win.graph", "win.print",
42+
dev.int <- c(dev.int, "windows", "win.graph", "win.print",
5243
"win.metafile")
5344
misc.2 <- c(misc.2, "file.choose", "choose.files", "choose.dir",
54-
"setWindowTitle", "loadRconsole",
45+
"setWindowTitle", "loadRconsole", "winProgressBar",
5546
"arrangeWindows", "getWindowsHandles")
5647
}
5748

5849
stop.list[["base"]] <-
5950
if(nchar(Sys.getenv("R_TESTLOTS"))) {## SEVERE TESTING, try almost ALL
60-
c(edit.int, misc.int)
51+
c(misc.int)
6152
} else {
62-
c(inet.list, socket.fun, edit.int, misc.int, misc.2)
53+
c(socket.fun, misc.int, misc.2)
6354
}
6455

56+
stop.list[["grDevices"]] <- dev.int
57+
58+
edit.int <- c("fix", "edit", "vi", "file.edit",
59+
"emacs", "pico", "xemacs", "xedit",
60+
"bug.report", "help.request", "create.post")
61+
inet.list <- c(apropos("download\\."),
62+
apropos("^url\\."),
63+
"packageStatus", apropos("mirror"),
64+
paste(c("available", "install", "update", "old", "new"),
65+
"packages", sep = "."))
66+
67+
stop.list[["utils"]] <- c("Rprof", "aspell", # hangs on Windows
68+
edit.int, misc.int,
69+
if (!nzchar(Sys.getenv("R_TESTLOTS")))
70+
c(inet.list, socket.fun, misc.2))
71+
72+
## -- Stop List for methods:
6573
## S4 group generics should not be called directly
6674
## and doing so sometimes leads to infinite recursion
6775
s4.group.generics <- c("Arith", "Compare", "Ops", "Logic", "Math", "Math2", "Summary", "Complex")
76+
stop.list[["methods"]] <- c(s4.group.generics)
77+
78+
## -- Stop List for tools:
79+
stop.list[["tools"]] <- c(
80+
"write_PACKAGES", "update_PACKAGES", # problems with Packages/PACKAGES
81+
"testInstalledBasic", "testInstalledPackages", # runs whole suite
82+
"findHTMLlinks", "base_aliases_db", "base_rdxrefs_db", # slow, R code
83+
"make_translations_pkg", "R", "pskill",
84+
"texi2dvi", "texi2pdf", # hang on Windows
85+
grepv("^CRAN_", getNamespaceExports("tools")), # slow / downloads
86+
"summarize_CRAN_check_status", "package_dependencies",
87+
"startDynamicHelp" # makes R hang on exit on Windows
88+
)
6889

69-
## warning: browseAll will tend to read all the script and/or loop forever
70-
stop.list[["methods"]] <- c("browseAll", "recover", s4.group.generics)
71-
stop.list[["tools"]] <- c("write_PACKAGES", # problems with Packages/PACKAGES
72-
"update_PACKAGES",
73-
"dependsOnPkgs", # call to installed.packages() slow w/ large library
74-
"testInstalledBasic",
75-
"testInstalledPackages", # runs whole suite
76-
"readNEWS", # slow, pure R code
77-
"findHTMLlinks", "pskill",
78-
"texi2dvi", "texi2pdf", # hang on Windows
79-
"getVignetteInfo", # very slow on large installation
80-
"CRAN_package_db", # slow, pure R code
81-
"CRAN_check_results",
82-
"CRAN_check_details",
83-
"CRAN_memtest_notes",
84-
"summarize_CRAN_check_status",
85-
"startDynamicHelp" # makes R hang on exit
86-
# on Windows
87-
)
88-
stop.list[["grDevices"]] <- dev.int
89-
stop.list[["utils"]] <- c("Rprof", "aspell", # hangs on Windows
90-
"winProgressBar",
91-
"chooseBioCmirror",# too slow, R code
92-
inet.list, socket.fun, edit.int, misc.int, misc.2)
9390

9491
sink("no-segfault.R")
9592

@@ -98,8 +95,10 @@ if(.Platform$OS.type == "windows") cat('options(pager = "console")\n')
9895
cat("options(catch.script.errors = TRUE)",
9996
"# don't stop on error in batch\n##~~~~~~~~~~~~~~\n")
10097

101-
cat(".libPaths(tail(.libPaths(), 1), include.site=FALSE) # no extra libraries (w/ many pkgs)\n")
98+
cat(".libPaths(.Library, include.site=FALSE) # no extra libraries (w/ many pkgs)\n")
10299

100+
do_timings <- nzchar(Sys.getenv("R_TESTS_NOSEGFAULT_TIMINGS"))
101+
if (do_timings) cat("unlink('no-segfault.timings')\n")
103102
cat(".proctime00 <- proc.time()\n")
104103

105104
for (pkg in core.pkgs) {
@@ -125,11 +124,15 @@ for (pkg in core.pkgs) {
125124
"df0 <- as.data.frame(c0)\n", sep="")
126125

127126
cat("f <- get(\"",nm,"\", pos = '", pkgname, "')\n", sep="")
127+
if (do_timings) cat(".pt <- proc.time()\n")
128128
cat("f()\nf(NULL)\nf(,NULL)\nf(NULL,NULL)\n",
129129
"f(list())\nf(l0)\nf(c0)\nf(m0)\nf(df0)\nf(FALSE)\n",
130130
"f(list(),list())\nf(l0,l0)\nf(c0,c0)\n",
131131
"f(df0,df0)\nf(FALSE,FALSE)\n",
132132
sep="")
133+
if (do_timings)
134+
cat("cat('", pkg, "', '", nm, "', (proc.time() - .pt)[[3L]], '\\n',\n",
135+
" file = 'no-segfault.timings', append = TRUE)\n", sep = "")
133136
}
134137
}
135138
if(lib.not.loaded) {

0 commit comments

Comments
 (0)