def _gnur_install_test(pkgs, gnur_libinstall, gnur_install_tmp): gnur_packages = join(_fastr_suite_dir(), 'gnur.packages') with open(gnur_packages, 'w') as f: for pkg in pkgs: f.write(pkg) f.write('\n') env = os.environ.copy() env["TMPDIR"] = gnur_install_tmp env['R_LIBS_USER'] = gnur_libinstall env["TZDIR"] = "/usr/share/zoneinfo/" args = [] if _graalvm(): args += [_gnur_rscript()] args += [_installpkgs_script()] args += ['--pkg-filelist', gnur_packages] args += ['--run-tests'] # GNU R will abort the entire run otherwise if a failure occurs # args += ['--run-mode', 'internal'] args += ['--ignore-blacklist'] args += ['--testdir', 'test.gnur'] _log_step('BEGIN', 'install/test', 'GnuR') if _graalvm(): mx.run(args, nonZeroIsFatal=False, env=env) else: mx_fastr.gnu_rscript(args, env=env) _log_step('END', 'install/test', 'GnuR')
def _gnur_install_test(forwarded_args, pkgs, gnur_libinstall, gnur_install_tmp): ''' Install/test with GNU R exactly those packages that installed correctly with FastR. N.B. That means that regardless of how the packages were specified to pkgtest we always use a --pkg-filelist' arg to GNU R ''' gnur_packages = join(_fastr_suite_dir(), 'gnur.packages') with open(gnur_packages, 'w') as f: for pkg in pkgs: f.write(pkg) f.write('\n') env = os.environ.copy() env["TMPDIR"] = gnur_install_tmp env['R_LIBS_USER'] = gnur_libinstall env["TZDIR"] = "/usr/share/zoneinfo/" args = [] if _graalvm(): args += [_gnur_rscript()] # forward any explicit args to pkgtest args += [_installpkgs_script()] args += forwarded_args args += ['--pkg-filelist', gnur_packages] args += ['--run-tests'] args += ['--ignore-blacklist'] args += ['--testdir', 'test.gnur'] _log_step('BEGIN', 'install/test', 'GnuR') if _graalvm(): _ensure_R_on_PATH(env, os.path.dirname(_gnur_rscript())) mx.run(args, nonZeroIsFatal=False, env=env) else: _ensure_R_on_PATH(env, mx_fastr._gnur_path()) mx_fastr.gnu_rscript(args, env=env) _log_step('END', 'install/test', 'GnuR')