From 763d971cb388809d4570eed7d6de13c8e8e77108 Mon Sep 17 00:00:00 2001 From: Mick Jordan <mick.jordan@oracle.com> Date: Mon, 28 Nov 2016 17:01:56 -0800 Subject: [PATCH] =?UTF-8?q?pkgtest:=20don=E2=80=99t=20install=20blackliste?= =?UTF-8?q?d=20Suggests=20packages;=20aggregrate=20test=20output=20explici?= =?UTF-8?q?tly=20into=20single=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../r/install.cran.packages.R | 9 +++++++ mx.fastr/mx_fastr_pkgs.py | 26 +++++++++++++++---- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/com.oracle.truffle.r.test.cran/r/install.cran.packages.R b/com.oracle.truffle.r.test.cran/r/install.cran.packages.R index 6f6ac20367..a92c95ff4a 100644 --- a/com.oracle.truffle.r.test.cran/r/install.cran.packages.R +++ b/com.oracle.truffle.r.test.cran/r/install.cran.packages.R @@ -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 diff --git a/mx.fastr/mx_fastr_pkgs.py b/mx.fastr/mx_fastr_pkgs.py index 25bb29517c..874dbf5e65 100644 --- a/mx.fastr/mx_fastr_pkgs.py +++ b/mx.fastr/mx_fastr_pkgs.py @@ -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: ''' -- GitLab