if t: unittest([ '--suite', 'tools', '--enable-timing', '--verbose', '--fail-fast' ]) mx_gate.add_gate_runner(_suite, _tools_gate_runner) mx_sdk.register_graalvm_component( mx_sdk.GraalVmTool( suite=_suite, name='GraalVM Chrome Inspector', short_name='ins', dir_name='chromeinspector', license_files=[], third_party_license_files=[], truffle_jars=['tools:CHROMEINSPECTOR'], support_distributions=['tools:CHROMEINSPECTOR_GRAALVM_SUPPORT'], include_by_default=True, )) mx_sdk.register_graalvm_component( mx_sdk.GraalVmTool( suite=_suite, name='GraalVM Profiler', short_name='pro', dir_name='profiler', license_files=[], third_party_license_files=[], truffle_jars=['tools:TRUFFLE_PROFILER'],
for patch in self.subject.patches: mx.run(git_apply + [patch], cwd=self.subject.suite.vc_dir) self.delegate.logBuild() self.delegate.build() def clean(self, forBuild=False): mx.rmtree(self.subject.out_dir, ignore_errors=True) mx_sdk.register_graalvm_component( mx_sdk.GraalVmTool( suite=_suite, name='Truffle', short_name='tfl', dir_name='truffle', license_files=[], third_party_license_files=[], truffle_jars=['truffle:TRUFFLE_NFI'], support_distributions=['truffle:TRUFFLE_GRAALVM_SUPPORT'])) mx_sdk.register_graalvm_component( mx_sdk.GraalVmTool( suite=_suite, name='Truffle NFI', short_name='nfi', dir_name='nfi', license_files=[], third_party_license_files=[], truffle_jars=[], support_distributions=['truffle:TRUFFLE_NFI_GRAALVM_SUPPORT']))
polyglot_lib_build_dependencies=[ "substratevm:POLYGLOT_NATIVE_API_SUPPORT", "substratevm:POLYGLOT_NATIVE_API_HEADERS" ], has_polyglot_lib_entrypoints=True, )) if os.environ.has_key('NATIVE_IMAGE_TESTING'): mx_sdk.register_graalvm_component( mx_sdk.GraalVmTool( suite=suite, name='Native Image JUnit', short_name='nju', dir_name='junit', license_files=[], third_party_license_files=[], truffle_jars=[], builder_jar_distributions=[ 'mx:JUNIT_TOOL', 'mx:JUNIT', 'mx:HAMCREST' ], support_distributions=['substratevm:NATIVE_IMAGE_JUNIT_SUPPORT'], include_in_polyglot=False, )) @mx.command(suite_name=suite.name, command_name='helloworld', usage_msg='[options]') def helloworld(args): """ builds a Hello, World! native image. """
testJalangi(args +["--all"]); @contextmanager def _import_substratevm(): try: import mx_substratevm except: mx.abort("Cannot import 'mx_substratevm'. Did you forget to dynamically import SubstrateVM?") yield mx_substratevm mx_sdk.register_graalvm_component(mx_sdk.GraalVmTool( suite=_suite, name='NodeProf', short_name='np', dir_name='nodeprof', license_files=[], third_party_license_files=[], truffle_jars=['nodeprof:NODEPROF'], support_distributions=['nodeprof:NODEPROF_GRAALVM_SUPPORT'], include_by_default=True, )) def mx_post_parse_cmd_line(args): try: import mx_substratevm mx_substratevm.tools_map['nodeprof'] = mx_substratevm.ToolDescriptor(image_deps=['nodeprof:NODEPROF']) except: pass # SubstrateVM is not available mx.update_commands(_suite, { 'test-all': [test, ''],
# questions. # # ---------------------------------------------------------------------------------------------------- import mx import mx_sdk from mx_unittest import unittest from mx_gate import Task, add_gate_runner _suite = mx.suite('regex') def _tregex_tests_gate_runner(args, tasks): with Task('UnitTests', tasks, tags=['default', 'all']) as t: if t: unittest(['--enable-timing', '--very-verbose', 'com.oracle.truffle.regex']) mx_sdk.register_graalvm_component(mx_sdk.GraalVmTool( suite=_suite, name='TRegex', short_name='rgx', dir_name='regex', license_files=[], third_party_license_files=[], truffle_jars=['regex:TREGEX'], support_distributions=['regex:TREGEX_GRAALVM_SUPPORT'], )) add_gate_runner(_suite, _tregex_tests_gate_runner)
os.path.relpath(self.subject.delegate.dir, self.subject.suite.vc_dir)] for patch in self.subject.patches: mx.run(git_apply + [patch], cwd=self.subject.suite.vc_dir) self.delegate.logBuild() self.delegate.build() def clean(self, forBuild=False): mx.rmtree(self.subject.out_dir, ignore_errors=True) mx_sdk.register_graalvm_component(mx_sdk.GraalVmTool( suite=_suite, name='Truffle NFI', short_name='tfl', dir_name='truffle', license_files=[], third_party_license_files=[], truffle_jars=[], support_distributions=[ 'truffle:TRUFFLE_GRAALVM_SUPPORT', 'truffle:TRUFFLE_NFI_NATIVE', ] )) mx.update_commands(_suite, { 'check-filename-length' : [check_filename_length, ""], 'create-dsl-parser' : [create_dsl_parser, "create the DSL expression parser using antlr"], 'create-sl-parser' : [create_sl_parser, "create the SimpleLanguage parser using antlr"], })
if t: unittest([ '--suite', 'tools', '--enable-timing', '--verbose', '--fail-fast' ]) mx_gate.add_gate_runner(_suite, _tools_gate_runner) mx_sdk.register_graalvm_component( mx_sdk.GraalVmTool( suite=_suite, name='GraalVM Chrome Inspector', short_name='ins', dir_name='chromeinspector', license_files=[], third_party_license_files=[], dependencies=['Truffle'], truffle_jars=['tools:CHROMEINSPECTOR'], support_distributions=['tools:CHROMEINSPECTOR_GRAALVM_SUPPORT'], include_by_default=True, )) mx_sdk.register_graalvm_component( mx_sdk.GraalVmTool( suite=_suite, name='AgentScript', short_name='ats', dir_name='agentscript', license_files=[], third_party_license_files=[], dependencies=['Truffle'],