def zippy_gate_runner(suites, tasks, extraVMarguments=None): vmargs = extraVMarguments if not vmargs or not any(vmargs): vmargs = [] vmargs += _graal_heuristics_options(_mx_graal) # Run unit tests with Task('ZipPy UnitTests', tasks, tags=ZippyTags.test) as t: if t: unittest(['--suite', 'zippy', '--fail-fast'] + vmargs) pythonTestBenchmarks = { 'binarytrees3': '12', 'fannkuchredux3': '9', 'fasta3': '250000', 'mandelbrot3': '600', 'meteor3': '2098', 'nbody3': '100000', 'spectralnorm3': '500', 'richards3': '3', 'bm-ai': '0', 'pidigits': '0', 'pypy-go': '1', } for name, iterations in sorted(pythonTestBenchmarks.iteritems()): with Task('PythonBenchmarksTest:' + name, tasks, tags=ZippyTags.benchmarktest) as t: if t: _gate_python_benchmarks_tests( "zippy/benchmarks/src/benchmarks/" + name + ".py", iterations, vmargs)
def do_run_python(args, extraVmArgs=None, env=None, jdk=None, **kwargs): if _zippy_help_options(args): sys.exit(1) if not env: env = os.environ if not 'ZIPPY_HOME' in env: env['ZIPPY_HOME'] = _suite.dir check_vm_env = env[ 'ZIPPY_MUST_USE_GRAAL'] if 'ZIPPY_MUST_USE_GRAAL' in env else None if check_vm_env: if check_vm_env == '1': check_vm(must_be_jvmci=True) elif check_vm_env == '0': check_vm() vmArgs, zippyArgs = mx.extract_VM_args(args) internalZippyArgs, zippyArgs = _extract_zippy_internal_options(zippyArgs) vmArgs = internalZippyArgs + ['-cp', mx.classpath(["edu.uci.python"])] if not jdk: jdk = get_jdk() vmArgs += _graal_heuristics_options(_mx_graal) # default: assertion checking is enabled # if extraVmArgs is None or not '-da' in extraVmArgs: # vmArgs += ['-ea', '-esa'] if extraVmArgs: vmArgs += extraVmArgs # vmArgs = _sanitize_vmArgs(jdk, vmArgs) # if len(zippyArgs) > 0: vmArgs.append("edu.uci.python.shell.ZipPyMain") # else: # print 'Interactive shell is not implemented yet..' # sys.exit(1) return mx.run_java(vmArgs + zippyArgs, jdk=jdk, **kwargs)