Skip to content
Snippets Groups Projects
Commit 995f2f6a authored by Miloslav Metelka's avatar Miloslav Metelka
Browse files

[GR-128] GnuR Tests: limit fastr_errors.log size by skipping test snippets that explode its size.

PullRequest: fastr/1201
parents 1c19919c 377d6c4b
No related branches found
No related tags found
No related merge requests found
......@@ -3881,6 +3881,7 @@ env$logic <- c(TRUE, FALSE, FALSE, TRUE)
# what have we there?
utils::ls.str(env)
if(FALSE) { # [FastR] BEGIN Test snippet disabled since it causes fastr_errors.log increase by 500MB
# compute the mean for each list element
eapply(env, mean)
unlist(eapply(env, mean, USE.NAMES = FALSE))
......@@ -3888,6 +3889,7 @@ unlist(eapply(env, mean, USE.NAMES = FALSE))
# median and quartiles for each element (making use of "..." passing):
eapply(env, quantile, probs = 1:3/4)
eapply(env, quantile)
} # [FastR] END Test snippet disabled since it causes fastr_errors.log increase by 500MB
......@@ -4121,11 +4123,13 @@ x <- seq(0, 10, length.out = 100)
y <- seq(-1, 1, length.out = 20)
d1 <- expand.grid(x = x, y = y)
d2 <- expand.grid(x = x, y = y, KEEP.OUT.ATTRS = FALSE)
if(FALSE) { # [FastR] BEGIN Test snippet disabled since it causes fastr_errors.log increase by 500MB
object.size(d1) - object.size(d2)
##-> 5992 or 8832 (on 32- / 64-bit platform)
## Don't show:
stopifnot(object.size(d1) > object.size(d2))
## End(Don't show)
} # [FastR] BEGIN Test snippet disabled since it causes due to fastr_errors.log increase by 500MB
......
......@@ -1870,8 +1870,10 @@ stopifnot(identical( ## assert that all three are the same :
format(round(as.vector(sl)/1024, 1))))
## find the 10 largest objects in the base package
if(FALSE) { # [FastR] BEGIN Test snippet disabled since it causes fastr_errors.log increase by 200MB
z <- sapply(ls("package:base"), function(x)
object.size(get(x, envir = baseenv())))
} # [FastR] BEGIN Test snippet disabled since it causes fastr_errors.log increase by 200MB
if(interactive()) {
as.matrix(rev(sort(z))[1:10])
} else # (more constant over time):
......
......@@ -465,6 +465,8 @@ def gnu_rtests(args, env=None):
os.chdir(_fastr_suite.dir) # Packages install fails otherwise
# mx_fastr_pkgs.installpkgs(['--pkg-pattern', '^MASS$']) # required by tests/Examples/base-Ex.R
np = mx.project('com.oracle.truffle.r.native')
ferrs = join(_fastr_suite.dir, 'fastr_errors.log')
ferrs_size = os.stat(ferrs).st_size if os.access(ferrs, os.R_OK) else 0
tst = join(np.dir, 'gnur', 'tests')
tstsrc = join(tst, 'src')
tstlog = join(tst, 'log')
......@@ -488,6 +490,12 @@ def gnu_rtests(args, env=None):
os.rename(outf, outff)
print 'Running {} explicitly by GnuR CMD BATCH ...'.format(f)
mx.run([join(_gnur_path(), 'R'), '--vanilla', 'CMD', 'BATCH', join(srcd, f)] + args, nonZeroIsFatal=False, env=env, timeout=90)
ferrs_new_size = os.stat(ferrs).st_size if os.access(ferrs, os.R_OK) else 0
if ferrs_new_size - ferrs_size > 0:
with open(ferrs) as f:
nlines = sum(1 for _ in f)
print ' Size of {} increased to {:,} bytes ({:,} lines).\n'.format(ferrs, ferrs_new_size, nlines)
ferrs_size = ferrs_new_size
if os.path.isfile(outf):
outfg = outf + '.gnur'
os.rename(outf, outfg)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment