def javadoc(args, vm=None): """build the Javadoc for all API packages""" mx.javadoc([ '--unified', '--exclude-packages', 'com.oracle.truffle.tck,com.oracle.truffle.tck.impl,com.oracle.truffle.api.interop.java,com.oracle.truffle.api.vm' ] + args) checkLinks(os.sep.join([_suite.dir, 'javadoc']))
def _truffle_gate_runner(args, tasks): with Task('Truffle Javadoc', tasks) as t: if t: mx.javadoc(['--unified']) with Task('Truffle UnitTests', tasks) as t: if t: unittest(['--suite', 'truffle', '--enable-timing', '--verbose', '--fail-fast']) with Task('Truffle Signature Tests', tasks) as t: if t: sigtest(['--check', 'binary'])
def javadoc(args, vm=None): """build the Javadoc for all API packages""" mx.javadoc(['--unified', '--exclude-packages', 'com.oracle.truffle.tck,com.oracle.truffle.tck.impl,com.oracle.truffle.api.interop.java,com.oracle.truffle.api.vm,com.oracle.truffle.api.metadata'] + args) javadoc_dir = os.sep.join([_suite.dir, 'javadoc']) checkLinks(javadoc_dir) shutil.move(os.sep.join([javadoc_dir, 'index.html']), os.sep.join([javadoc_dir, 'overview-frames.html'])) shutil.copy(os.sep.join([javadoc_dir, 'overview-summary.html']), os.sep.join([javadoc_dir, 'index.html']))
def wikidoc(args): """generate Confluence Wiki format for package-info.java files""" # Ensure the wiki doclet is up to date mx.build(['--projects', 'com.oracle.max.tools']) # the WikiDoclet cannot see the -classpath argument passed to javadoc so we pass the # full list of projects as an explicit argument, thereby enabling it to map classes # to projects, which is needed to generate Wiki links to the source code. # There is no virtue in running the doclet on dependent projects as there are # no generated links between Wiki pages toolsDir = mx.project('com.oracle.max.tools').output_dir() baseDir = mx.project('com.oracle.max.base').output_dir() dp = os.pathsep.join([toolsDir, baseDir]) project_list = ','.join(p.name for p in mx.sorted_deps()) for a in [ '-docletpath', dp, '-doclet', 'com.oracle.max.tools.javadoc.wiki.WikiDoclet', '-projects', project_list ]: args.append('--arg') args.append('@' + a) mx.javadoc(args, parser=ArgumentParser('mx wikidoc'), docDir='wikidoc', includeDeps=False, stdDoclet=False)
def _truffle_gate_runner(args, tasks): jdk = mx.get_jdk(tag=mx.DEFAULT_JDK_TAG) if jdk.javaCompliance < '9': with Task('Truffle Javadoc', tasks) as t: if t: mx.javadoc(['--unified']) with Task('Truffle UnitTests', tasks) as t: if t: unittest(['--suite', 'truffle', '--enable-timing', '--verbose', '--fail-fast']) with Task('Truffle Signature Tests', tasks) as t: if t: sigtest(['--check', 'binary'])
def javadoc(args, vm=None): """build the Javadoc for all API packages""" mx.javadoc( ['--unified', '--exclude-packages', 'org.graalvm.polyglot.tck'] + args) javadoc_dir = os.sep.join([_suite.dir, 'javadoc']) shutil.move(os.sep.join([javadoc_dir, 'index.html']), os.sep.join([javadoc_dir, 'overview-frames.html'])) shutil.copy(os.sep.join([javadoc_dir, 'overview-summary.html']), os.sep.join([javadoc_dir, 'index.html']))
def _truffle_gate_runner(args, tasks): with Task("Truffle Javadoc", tasks) as t: if t: mx.javadoc(["--unified"]) with Task("Truffle UnitTests", tasks) as t: if t: unittest(["--suite", "truffle", "--enable-timing", "--verbose", "--fail-fast"]) with Task("Truffle Signature Tests", tasks) as t: if t: sigtest(["--check", "binary"])
def javadoc(args, vm=None): """build the Javadoc for all API packages""" extraArgs = mx_sdk.build_oracle_compliant_javadoc_args( _suite, 'GraalVM', 'Truffle') mx.javadoc([ '--unified', '--exclude-packages', 'com.oracle.truffle.tck,com.oracle.truffle.tck.impl' ] + extraArgs + args) javadoc_dir = os.sep.join([_suite.dir, 'javadoc']) checkLinks(javadoc_dir)
def javadoc(args, vm=None): """build the Javadoc for all API packages""" mx.javadoc(['--unified'] + args) javadocDir = os.sep.join([_suite.dir, 'javadoc']) index = os.sep.join([javadocDir, 'index.html']) indexContent = open(index, 'r').read() indexContent = indexContent.replace('src="allclasses-frame.html"', 'src="com/oracle/truffle/api/vm/package-frame.html"') indexContent = indexContent.replace('src="overview-summary.html"', 'src="com/oracle/truffle/tutorial/package-summary.html"') new_file = open(index, "w") new_file.write(indexContent) checkLinks(javadocDir)
def _truffle_gate_runner(args, tasks): jdk = mx.get_jdk(tag=mx.DEFAULT_JDK_TAG) with Task('Jackpot check', tasks) as t: if t: jackpot(['--fail-on-warnings'], suite=None, nonZeroIsFatal=True) if jdk.javaCompliance < '9': with Task('Truffle Javadoc', tasks) as t: if t: mx.javadoc(['--unified']) with Task('Truffle UnitTests', tasks) as t: if t: unittest(['--suite', 'truffle', '--enable-timing', '--verbose', '--fail-fast']) with Task('Truffle Signature Tests', tasks) as t: if t: sigtest(['--check', 'binary']) with Task('File name length check', tasks) as t: if t: check_filename_length([])
def javadoc(args): """build the Javadoc for all packages""" if not args: projectNames = [] for p in mx.projects(True, True): projectNames.append(p.name) mx.javadoc(['--unified', '--projects', ','.join(projectNames)], includeDeps=False) else: mx.javadoc(['--unified'] + args) javadocDir = os.sep.join([_suite.dir, 'javadoc']) index = os.sep.join([javadocDir, 'index.html']) if exists(index): indexContent = open(index, 'r').read() new_file = open(index, "w") new_file.write(indexContent) checkLinks(javadocDir)
def wikidoc(args): """generate Confluence Wiki format for package-info.java files""" # Ensure the wiki doclet is up to date mx.build(['--projects', 'com.oracle.max.tools']) # the WikiDoclet cannot see the -classpath argument passed to javadoc so we pass the # full list of projects as an explicit argument, thereby enabling it to map classes # to projects, which is needed to generate Wiki links to the source code. # There is no virtue in running the doclet on dependent projects as there are # no generated links between Wiki pages toolsDir = mx.project('com.oracle.max.tools').output_dir() baseDir = mx.project('com.oracle.max.base').output_dir() dp = os.pathsep.join([toolsDir, baseDir]) project_list = ','.join(p.name for p in mx.sorted_deps()) for a in ['-docletpath', dp, '-doclet', 'com.oracle.max.tools.javadoc.wiki.WikiDoclet', '-projects', project_list]: args.append('--arg') args.append('@' + a) mx.javadoc(args, parser=ArgumentParser('mx wikidoc'), docDir='wikidoc', includeDeps=False, stdDoclet=False)
def compiler_gate_runner(suites, unit_test_runs, bootstrap_tests, tasks, extraVMarguments=None): if jdk.javaCompliance >= '9': with Task('JDK9_java_base_test', tasks, tags=GraalTags.test) as t: if t: java_base_unittest(_remove_empty_entries(extraVMarguments)) # Run unit tests in hosted mode for r in unit_test_runs: r.run(suites, tasks, ['-XX:-UseJVMCICompiler'] + _remove_empty_entries(extraVMarguments)) # Run ctw against rt.jar on hosted with Task('CTW:hosted', tasks, tags=GraalTags.ctw) as t: if t: ctw([ '--ctwopts', 'Inline=false CompilationFailureAction=ExitVM', '-esa', '-XX:-UseJVMCICompiler', '-XX:+EnableJVMCI', '-DCompileTheWorld.MultiThreaded=true', '-Dgraal.InlineDuringParsing=false', '-DCompileTheWorld.Verbose=false', '-XX:ReservedCodeCacheSize=300m', ], _remove_empty_entries(extraVMarguments)) # bootstrap tests for b in bootstrap_tests: b.run(tasks, extraVMarguments) # run selected DaCapo benchmarks dacapos = { 'avrora': 1, 'batik': 1, 'fop': 8, 'h2': 1, 'jython': 2, 'luindex': 1, 'lusearch': 4, 'pmd': 1, 'sunflow': 2, 'xalan': 1, } for name, iterations in sorted(dacapos.iteritems()): with Task('DaCapo:' + name, tasks, tags=GraalTags.benchmarktest) as t: if t: _gate_dacapo( name, iterations, _remove_empty_entries(extraVMarguments) + ['-XX:+UseJVMCICompiler']) # run selected Scala DaCapo benchmarks scala_dacapos = { 'actors': 1, 'apparat': 1, 'factorie': 1, 'kiama': 4, 'scalac': 1, 'scaladoc': 1, 'scalap': 1, 'scalariform': 1, 'scalatest': 1, 'scalaxb': 1, 'tmt': 1 } for name, iterations in sorted(scala_dacapos.iteritems()): with Task('ScalaDaCapo:' + name, tasks, tags=GraalTags.benchmarktest) as t: if t: _gate_scala_dacapo( name, iterations, _remove_empty_entries(extraVMarguments) + ['-XX:+UseJVMCICompiler']) # ensure -Xbatch still works with Task('DaCapo_pmd:BatchMode', tasks, tags=GraalTags.test) as t: if t: _gate_dacapo( 'pmd', 1, _remove_empty_entries(extraVMarguments) + ['-XX:+UseJVMCICompiler', '-Xbatch']) # ensure benchmark counters still work with Task('DaCapo_pmd:BenchmarkCounters', tasks, tags=GraalTags.test) as t: if t: _gate_dacapo( 'pmd', 1, _remove_empty_entries(extraVMarguments) + [ '-XX:+UseJVMCICompiler', '-Dgraal.LIRProfileMoves=true', '-Dgraal.GenericDynamicCounters=true', '-XX:JVMCICounterSize=10' ]) # ensure -Xcomp still works with Task('XCompMode:product', tasks, tags=GraalTags.test) as t: if t: run_vm( _remove_empty_entries(extraVMarguments) + ['-XX:+UseJVMCICompiler', '-Xcomp', '-version']) with Task('Javadoc', tasks, tags=GraalTags.doc) as t: if t: mx.javadoc([])
def javadoc(args): """build the Javadoc for all API packages""" extraArgs = build_oracle_compliant_javadoc_args(_suite, 'GraalVM', 'SDK') mx.javadoc( ['--unified', '--exclude-packages', 'org.graalvm.polyglot.tck'] + extraArgs + args)
def javadoc(args, vm=None): """build the Javadoc for all API packages""" mx.javadoc(['--unified'] + args) checkLinks(os.sep.join([_suite.dir, 'javadoc']))
def javadoc(args): """build the Javadoc for all API packages""" mx.javadoc(['--unified', '--exclude-packages', 'org.graalvm.polyglot.tck'] + args)
def javadoc(args, vm=None): """build the Javadoc for all API packages""" mx.javadoc(['--unified'] + args)
def compiler_gate_runner(suites, unit_test_runs, bootstrap_tests, tasks, extraVMarguments=None): if jdk.javaCompliance >= '9': with Task('JDK9_java_base_test', tasks, tags=GraalTags.test) as t: if t: java_base_unittest(_remove_empty_entries(extraVMarguments)) # Run unit tests in hosted mode for r in unit_test_runs: r.run(suites, tasks, ['-XX:-UseJVMCICompiler'] + _remove_empty_entries(extraVMarguments)) # Run selected tests (initially those from GR-6581) under -Xcomp xcompTests = [ 'BlackholeDirectiveTest', 'OpaqueDirectiveTest', 'CompiledMethodTest', 'ControlFlowAnchorDirectiveTest', 'ConditionalElimination', 'MarkUnsafeAccessTest', 'PEAAssertionsTest', 'MergeCanonicalizerTest', 'ExplicitExceptionTest', 'GuardedIntrinsicTest', 'HashCodeTest', 'ProfilingInfoTest', 'GraalOSRLockTest' ] UnitTestRun('XcompUnitTests', [], tags=GraalTags.test).run(['compiler'], tasks, ['-Xcomp', '-XX:-UseJVMCICompiler'] + _remove_empty_entries(extraVMarguments) + xcompTests) # Ensure makegraaljdk works with Task('MakeGraalJDK', tasks, tags=GraalTags.test) as t: if t and isJDK8: try: makegraaljdk(['-a', 'graaljdk.tar', 'graaljdk']) finally: if exists('graaljdk'): shutil.rmtree('graaljdk') if exists('graaljdk.tar'): os.unlink('graaljdk.tar') # Run ctw against rt.jar on hosted with Task('CTW:hosted', tasks, tags=GraalTags.ctw) as t: if t: ctw([ '--ctwopts', 'Inline=false CompilationFailureAction=ExitVM', '-esa', '-XX:-UseJVMCICompiler', '-XX:+EnableJVMCI', '-DCompileTheWorld.MultiThreaded=true', '-Dgraal.InlineDuringParsing=false', '-DCompileTheWorld.Verbose=false', '-XX:ReservedCodeCacheSize=300m', ], _remove_empty_entries(extraVMarguments)) # bootstrap tests for b in bootstrap_tests: b.run(tasks, extraVMarguments) # run selected DaCapo benchmarks dacapos = { 'avrora': 1, 'batik': 1, 'fop': 8, 'h2': 1, 'jython': 2, 'luindex': 1, 'lusearch': 4, 'pmd': 1, 'sunflow': 2, 'xalan': 1, } for name, iterations in sorted(dacapos.iteritems()): with Task('DaCapo:' + name, tasks, tags=GraalTags.benchmarktest) as t: if t: _gate_dacapo(name, iterations, _remove_empty_entries(extraVMarguments) + ['-XX:+UseJVMCICompiler']) # run selected Scala DaCapo benchmarks scala_dacapos = { 'actors': 1, 'apparat': 1, 'factorie': 1, 'kiama': 4, 'scalac': 1, 'scaladoc': 1, 'scalap': 1, 'scalariform':1, 'scalatest': 1, 'scalaxb': 1, 'tmt': 1 } for name, iterations in sorted(scala_dacapos.iteritems()): with Task('ScalaDaCapo:' + name, tasks, tags=GraalTags.benchmarktest) as t: if t: _gate_scala_dacapo(name, iterations, _remove_empty_entries(extraVMarguments) + ['-XX:+UseJVMCICompiler']) # ensure -Xbatch still works with Task('DaCapo_pmd:BatchMode', tasks, tags=GraalTags.test) as t: if t: _gate_dacapo('pmd', 1, _remove_empty_entries(extraVMarguments) + ['-XX:+UseJVMCICompiler', '-Xbatch']) # ensure benchmark counters still work with Task('DaCapo_pmd:BenchmarkCounters', tasks, tags=GraalTags.test) as t: if t: _gate_dacapo('pmd', 1, _remove_empty_entries(extraVMarguments) + ['-XX:+UseJVMCICompiler', '-Dgraal.LIRProfileMoves=true', '-Dgraal.GenericDynamicCounters=true', '-XX:JVMCICounterSize=10']) # ensure -Xcomp still works with Task('XCompMode:product', tasks, tags=GraalTags.test) as t: if t: run_vm(_remove_empty_entries(extraVMarguments) + ['-XX:+UseJVMCICompiler', '-Xcomp', '-version']) # ensure CMS still works with Task('DaCapo_pmd:CMS', tasks, tags=["disabled", "GR-6777"]) as t: if t: _gate_dacapo('pmd', 4, _remove_empty_entries(extraVMarguments) + ['-XX:+UseJVMCICompiler', '-Xmx256M', '-XX:+UseConcMarkSweepGC'], threads=4, force_serial_gc=False, set_start_heap_size=False) if isJDK8: # ensure CMSIncrementalMode still works with Task('DaCapo_pmd:CMSIncrementalMode', tasks, tags=["disabled", "GR-6777"]) as t: if t: _gate_dacapo('pmd', 4, _remove_empty_entries(extraVMarguments) + ['-XX:+UseJVMCICompiler', '-Xmx256M', '-XX:+UseConcMarkSweepGC', '-XX:+CMSIncrementalMode'], threads=4, force_serial_gc=False, set_start_heap_size=False) with Task('Javadoc', tasks, tags=GraalTags.doc) as t: # metadata package was deprecated, exclude it if t: mx.javadoc(['--exclude-packages', 'com.oracle.truffle.api.metadata'], quietForNoPackages=True)
def javadoc(args): # metadata package was deprecated, exclude it if not '--exclude-packages' in args: args.append('--exclude-packages') args.append('com.oracle.truffle.api.metadata') mx.javadoc(args, quietForNoPackages=True)
def javadoc(args, vm=None): """build the Javadoc for all API packages""" mx.javadoc(['--unified', '--exclude-packages', 'com.oracle.truffle.tck,com.oracle.truffle.tck.impl'] + args) javadoc_dir = os.sep.join([_suite.dir, 'javadoc']) checkLinks(javadoc_dir)
def javadoc(args): mx.javadoc(args)