|
21 | 21 | # questions.
|
22 | 22 | #
|
23 | 23 |
|
24 |
| -from argparse import ArgumentParser |
25 |
| - |
26 | 24 | import os
|
27 | 25 |
|
28 | 26 | import mx
|
29 | 27 | import mx_espresso_benchmarks # pylint: disable=unused-import
|
30 | 28 | import mx_sdk_vm
|
31 | 29 | from mx_gate import Task, add_gate_runner
|
32 | 30 | from mx_jackpot import jackpot
|
33 |
| -from mx_unittest import unittest |
34 | 31 |
|
35 | 32 |
|
36 | 33 | _suite = mx.suite('espresso')
|
@@ -84,76 +81,18 @@ def _run_espresso_meta(args, nonZeroIsFatal=True):
|
84 | 81 | return _run_espresso_launcher(['--vm.Xss4m'] + _espresso_standalone_command(args), nonZeroIsFatal=nonZeroIsFatal)
|
85 | 82 |
|
86 | 83 |
|
87 |
| -def _run_espresso_playground(args): |
88 |
| - """Run Espresso test programs""" |
89 |
| - parser = ArgumentParser(prog='mx espresso-playground') |
90 |
| - parser.add_argument('main_class', action='store', help='Unqualified class name to run.') |
91 |
| - parser.add_argument('main_class_args', nargs='*') |
92 |
| - args = parser.parse_args(args) |
93 |
| - return _run_espresso_launcher(['-cp', mx.classpath('ESPRESSO_PLAYGROUND'), |
94 |
| - 'com.oracle.truffle.espresso.playground.' + args.main_class] |
95 |
| - + args.main_class_args) |
96 |
| - |
97 |
| - |
98 | 84 | class EspressoDefaultTags:
|
99 |
| - unittest = 'unittest' |
100 |
| - unittest_with_compilation = 'unittest_with_compilation' |
101 | 85 | jackpot = 'jackpot'
|
102 | 86 | meta = 'meta'
|
103 | 87 | exit = 'exit'
|
104 | 88 |
|
105 | 89 |
|
106 | 90 | def _espresso_gate_runner(args, tasks):
|
107 |
| - with Task('UnitTestsWithCompilation', tasks, tags=[EspressoDefaultTags.unittest_with_compilation]) as t: |
108 |
| - if t: |
109 |
| - unittest(['--enable-timing', '--very-verbose', '--suite', 'espresso', |
110 |
| - '--', # pass VM options |
111 |
| - '-Dpolyglot.engine.CompileImmediately=true', |
112 |
| - '-Dpolyglot.engine.BackgroundCompilation=false', |
113 |
| - '-Dpolyglot.engine.CompileOnly=espresso', |
114 |
| - '-Dpolyglot.engine.EncodedGraphCacheCapacity=-1', # unbounded |
115 |
| - # '-Dgraal.TraceTruffleCompilation=true', # Too verbose |
116 |
| - ]) |
117 |
| - |
118 |
| - with Task('UnitTests', tasks, tags=[EspressoDefaultTags.unittest]) as t: |
119 |
| - if t: |
120 |
| - unittest(['--enable-timing', '--very-verbose', '--suite', 'espresso']) |
121 |
| - |
122 | 91 | # Jackpot configuration is inherited from Truffle.
|
123 | 92 | with Task('Jackpot', tasks, tags=[EspressoDefaultTags.jackpot]) as t:
|
124 | 93 | if t:
|
125 | 94 | jackpot(['--fail-on-warnings'], suite=None, nonZeroIsFatal=True)
|
126 | 95 |
|
127 |
| - with Task('Meta', tasks, tags=[EspressoDefaultTags.meta]) as t: |
128 |
| - if t: |
129 |
| - _run_espresso_meta(args=['-cp', mx.classpath('ESPRESSO_PLAYGROUND'), 'com.oracle.truffle.espresso.playground.HelloWorld']) |
130 |
| - |
131 |
| - with Task('Exit', tasks, tags=[EspressoDefaultTags.exit]) as t: |
132 |
| - if t: |
133 |
| - def _run_exit(case, expected, daemon=False, wait='infinite-listen'): |
134 |
| - if isinstance(expected, int): |
135 |
| - expected = [expected] |
136 |
| - mx.log("Exit test [{}, daemon={}, wait={}]...".format(case, daemon, wait)) |
137 |
| - rc = _run_espresso_java(args=['-cp', mx.classpath('ESPRESSO_PLAYGROUND'), |
138 |
| - '-Despresso.playground.exit.daemon=' + ('true' if daemon else 'false'), |
139 |
| - '-Despresso.playground.exit.static=' + ('true' if case == 'STATIC' else 'false'), |
140 |
| - '-Despresso.playground.exit.wait=' + wait, |
141 |
| - 'com.oracle.truffle.espresso.playground.Exit', case], nonZeroIsFatal=False) |
142 |
| - if rc not in expected: |
143 |
| - raise mx.abort("Exit[{}, daemon={}, wait={}] Expected exit code in {}, got {}".format(case, daemon, wait, expected, rc)) |
144 |
| - |
145 |
| - _run_exit('STATIC', 11) |
146 |
| - _run_exit('MAIN', 12) |
147 |
| - _run_exit('MAIN_FALL', 0) |
148 |
| - _run_exit('OTHER_FALL', 13) |
149 |
| - _run_exit('OTHER_FALL', [13, 0], daemon=True) |
150 |
| - _run_exit('OTHER_WAIT', 14) |
151 |
| - _run_exit('OTHER_WAIT', 14, daemon=True) |
152 |
| - _run_exit('OTHER_WAIT', 14, wait='infinite-park') |
153 |
| - _run_exit('MAIN_OTHER', 15) |
154 |
| - _run_exit('MAIN_OTHER', 15, daemon=True) |
155 |
| - _run_exit('MAIN_OTHER', 15, wait='infinite-park') |
156 |
| - |
157 | 96 |
|
158 | 97 | def verify_ci(args):
|
159 | 98 | """Verify CI configuration"""
|
@@ -255,7 +194,6 @@ def verify_ci(args):
|
255 | 194 | 'espresso-standalone': [_run_espresso_standalone, '[args]'],
|
256 | 195 | 'espresso-java': [_run_espresso_java, '[args]'],
|
257 | 196 | 'espresso-meta': [_run_espresso_meta, '[args]'],
|
258 |
| - 'espresso-playground': [_run_espresso_playground, '[class_name] [args]'], |
259 | 197 | 'verify-ci' : [verify_ci, '[options]'],
|
260 | 198 | })
|
261 | 199 |
|
|
0 commit comments