Skip to content
Snippets Groups Projects
Commit 659bc560 authored by Lukas Stadler's avatar Lukas Stadler
Browse files

Merge pull request #501 in G/fastr from...

Merge pull request #501 in G/fastr from ~MICK.JORDAN_ORACLE.COM/fastr:feature/internal-pkgtest to master

* commit '763d971c':
  pkgtest: don’t install blacklisted Suggests packages; aggregrate test output explicitly into single file
parents 687b5127 763d971c
No related branches found
No related tags found
No related merge requests found
......@@ -537,6 +537,15 @@ install.suggests <- function(pkgnames) {
for (pkgname in pkgnames) {
suggests <- install.order(avail.pkgs, avail.pkgs[pkgname, ], "suggests")
if (length(suggests) > 0) {
if (is.fastr() && !ignore.blacklist) {
# no point in trying to install blacklisted packages (which are likely)
blacklist <- get.blacklist()
nsuggests <- suggests[!suggests %in% blacklist]
if (length(nsuggests) != length(suggests)) {
cat("not installing Suggests of:", pkgname, ", one or more is blacklisted", "\n")
return()
}
}
dep.status <- install.status[suggests]
# three cases:
# 1. all TRUE: nothing to do all already installed ok
......
......@@ -235,11 +235,27 @@ def pkgtest(args):
return rc
def tar_tests(testdir):
test_tar = join(_fastr_suite_dir, testdir + '.tar')
subprocess.call(['tar', 'cf', test_tar, os.path.basename(testdir)])
if os.path.exists(test_tar + '.gz'):
os.remove(test_tar + '.gz')
subprocess.call(['gzip', test_tar])
if os.environ.has_key('FASTR_TEST_GZIP'):
test_tar = testdir + '.tar'
subprocess.call(['tar', 'cf', test_tar, os.path.basename(testdir)])
if os.path.exists(test_tar + '.gz'):
os.remove(test_tar + '.gz')
subprocess.call(['gzip', test_tar])
else:
# workaround for lack of support for accessing gz files
with open(testdir + '.agg', 'w') as o:
for root, _, files in os.walk(testdir):
for f in files:
ext = os.path.splitext(f)[1]
if f == 'test_time' or f == 'testfile_status' or ext == '.pdf' or ext == '.prev' or ext == '.save':
continue
absfile = join(root, f)
relfile = relpath(absfile, _fastr_suite_dir())
o.write('#### ' + relfile + '\n')
with open(absfile) as inp:
text = inp.read()
o.write(text)
class TestFileStatus:
'''
......
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