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')
def _gnur_include_path(): gnur_include_p = None if _graalvm(): gnur_include_p = join(_mx_gnur().dir, 'gnur', _mx_gnur().extensions.r_version(), 'include') else: gnur_include_p = join(mx_fastr._gnur_path(), "include") return gnur_include_p
def _gnur_include_path(): if _graalvm(): return _mx_gnur().extensions._gnur_include_path() else: gnur_include_p = join(mx_fastr._gnur_path(), "include") return gnur_include_p