Skip to content

Commit

Permalink
Move tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ansalond committed Jan 19, 2021
1 parent 20c418c commit 83badae
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 316 deletions.
64 changes: 0 additions & 64 deletions ci.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,6 @@ local base = {
}
};

local gate_coverage(allow_warnings) = base.eclipse + {
setup+: [
['mx', 'sversions'],
],
run+: [
['mx', '--jacoco-whitelist-package', 'com.oracle.truffle.espresso', '--jacoco-exclude-annotation', '@GeneratedBy', '--strict-compliance', 'gate', '--strict-mode', '--tags', '${GATE_TAGS}', '--jacocout', 'html'] + ( if allow_warnings then ['--no-warning-as-error'] else []),
['mx', '--jacoco-whitelist-package', 'com.oracle.truffle.espresso', '--jacoco-exclude-annotation', '@GeneratedBy', 'sonarqube-upload', "-Dsonar.host.url=$SONAR_HOST_URL", "-Dsonar.projectKey=com.oracle.truffle.espresso", "-Dsonar.projectName=GraalVM - Espresso", '--exclude-generated'],
['mx', '--jacoco-whitelist-package', 'com.oracle.truffle.espresso', '--jacoco-exclude-annotation', '@GeneratedBy', 'coverage-upload']
],
timelimit: '30:00',
};

local gate_cmd = ['mx', '--strict-compliance', 'gate', '--strict-mode', '--tags', '${GATE_TAGS}'];

local gate_espresso(allow_warnings) = {
Expand Down Expand Up @@ -257,14 +245,6 @@ local scala_dacapo_warmup_benchmark(env, guest_jvm_config='default', extra_args=
extra_args=extra_args
);

local smoke_tests(env) =
clone_build_run(env, hello_world_args) +
if std.startsWith(env, 'jvm') then {} else {
run+: [
_mx(env, ['--strict-compliance', 'gate', '--strict-mode', '--tags', 'exit']),
],
};

# GraalVM Installables
local graalvm_installables(ee, windows) = {
local dynamic_imports = if ee then '/vm-enterprise,/substratevm-enterprise,/tools-enterprise' else '/vm,/substratevm,/tools',
Expand Down Expand Up @@ -332,14 +312,6 @@ local awfy = 'awfy:*';

{
builds: [
// JaCoCo coverage (disabled)
// jdk8_weekly_linux + gate_coverage(allow_warnings=true) + { environment+: {
// GATE_TAGS: 'build,unittest',
// DYNAMIC_IMPORTS: '/vm,truffleruby'
// },
// name: 'espresso-gate-coverage-jdk8-linux-amd64'
// },

// Gates
jdk8_gate_linux + base.extra_jdk11_ce + gate_espresso(allow_warnings=false) + { environment+: {
GATE_TAGS: 'jackpot'
Expand All @@ -353,42 +325,6 @@ local awfy = 'awfy:*';
name: 'espresso-gate-style-fullbuild-jdk8-linux-amd64'
},

jdk8_gate_linux + gate_espresso(allow_warnings=true) + { environment+: {
GATE_TAGS: 'build,unittest',
DYNAMIC_IMPORTS: '/vm,truffleruby'
},
name: 'espresso-gate-unittest-jdk8-linux-amd64'
},

jdk8_daily_linux + gate_espresso(allow_warnings=true) + { environment+: {
GATE_TAGS: 'build,unittest_with_compilation',
DYNAMIC_IMPORTS: '/vm,truffleruby,/compiler'
},
timelimit: '1:00:00',
name: 'espresso-gate-unittest-compilation-jdk8-linux-amd64'
},

// LD_DEBUG=unused is a workaround for: symbol lookup error: jre/lib/amd64/libnio.so: undefined symbol: fstatat64
jdk8_gate_linux + gate_espresso(allow_warnings=false) + { environment+: {
GATE_TAGS: 'build,meta',
LD_DEBUG: 'unused'
},
name: 'espresso-meta-hello-world-linux-amd64'
},

// Hello World! should run in all supported configurations.
jdk8_gate_linux + smoke_tests('jvm-ce') + {name: 'espresso-gate-jvm-ce-hello-world-jdk8-linux-amd64'},
jdk8_gate_linux + smoke_tests('native-ce') + {name: 'espresso-gate-native-ce-hello-world-jdk8-linux-amd64'},
jdk8_gate_linux + smoke_tests('native-ee') + {name: 'espresso-gate-native-ee-hello-world-jdk8-linux-amd64'},
jdk8_gate_darwin + smoke_tests('native-ce') + {name: 'espresso-gate-native-ce-hello-world-jdk8-darwin-amd64'},
jdk8_gate_darwin + smoke_tests('native-ee') + {name: 'espresso-gate-native-ee-hello-world-jdk8-darwin-amd64'},
jdk8_gate_windows + smoke_tests('native-ce') + {name: 'espresso-gate-native-ce-hello-world-jdk8-windows-amd64'},
jdk8_gate_windows + smoke_tests('native-ee') + {name: 'espresso-gate-native-ee-hello-world-jdk8-windows-amd64'},
jdk11_gate_linux + smoke_tests('jvm-ce') + {name: 'espresso-gate-jvm-ce-hello-world-jdk11-linux-amd64'},
jdk11_gate_linux + smoke_tests('native-ce') + {name: 'espresso-gate-native-ce-hello-world-jdk11-linux-amd64'},
jdk11_gate_linux + smoke_tests('native-ee') + {name: 'espresso-gate-native-ee-hello-world-jdk11-linux-amd64'},
jdk11_gate_windows + smoke_tests('native-ee') + {name: 'espresso-gate-native-ee-hello-world-jdk11-windows-amd64'},

// AWFY peak perf. benchmarks (post-merge)
jdk8_bench_linux + espresso_benchmark('jvm-ce', awfy) + {name: 'espresso-bench-jvm-ce-awfy-jdk8-linux-amd64'},
jdk8_bench_linux + espresso_benchmark('jvm-ee', awfy) + {name: 'espresso-bench-jvm-ee-awfy-jdk8-linux-amd64'},
Expand Down
62 changes: 0 additions & 62 deletions mx.espresso/mx_espresso.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,13 @@
# questions.
#

from argparse import ArgumentParser

import os

import mx
import mx_espresso_benchmarks # pylint: disable=unused-import
import mx_sdk_vm
from mx_gate import Task, add_gate_runner
from mx_jackpot import jackpot
from mx_unittest import unittest


_suite = mx.suite('espresso')
Expand Down Expand Up @@ -84,76 +81,18 @@ def _run_espresso_meta(args, nonZeroIsFatal=True):
return _run_espresso_launcher(['--vm.Xss4m'] + _espresso_standalone_command(args), nonZeroIsFatal=nonZeroIsFatal)


def _run_espresso_playground(args):
"""Run Espresso test programs"""
parser = ArgumentParser(prog='mx espresso-playground')
parser.add_argument('main_class', action='store', help='Unqualified class name to run.')
parser.add_argument('main_class_args', nargs='*')
args = parser.parse_args(args)
return _run_espresso_launcher(['-cp', mx.classpath('ESPRESSO_PLAYGROUND'),
'com.oracle.truffle.espresso.playground.' + args.main_class]
+ args.main_class_args)


class EspressoDefaultTags:
unittest = 'unittest'
unittest_with_compilation = 'unittest_with_compilation'
jackpot = 'jackpot'
meta = 'meta'
exit = 'exit'


def _espresso_gate_runner(args, tasks):
with Task('UnitTestsWithCompilation', tasks, tags=[EspressoDefaultTags.unittest_with_compilation]) as t:
if t:
unittest(['--enable-timing', '--very-verbose', '--suite', 'espresso',
'--', # pass VM options
'-Dpolyglot.engine.CompileImmediately=true',
'-Dpolyglot.engine.BackgroundCompilation=false',
'-Dpolyglot.engine.CompileOnly=espresso',
'-Dpolyglot.engine.EncodedGraphCacheCapacity=-1', # unbounded
# '-Dgraal.TraceTruffleCompilation=true', # Too verbose
])

with Task('UnitTests', tasks, tags=[EspressoDefaultTags.unittest]) as t:
if t:
unittest(['--enable-timing', '--very-verbose', '--suite', 'espresso'])

# Jackpot configuration is inherited from Truffle.
with Task('Jackpot', tasks, tags=[EspressoDefaultTags.jackpot]) as t:
if t:
jackpot(['--fail-on-warnings'], suite=None, nonZeroIsFatal=True)

with Task('Meta', tasks, tags=[EspressoDefaultTags.meta]) as t:
if t:
_run_espresso_meta(args=['-cp', mx.classpath('ESPRESSO_PLAYGROUND'), 'com.oracle.truffle.espresso.playground.HelloWorld'])

with Task('Exit', tasks, tags=[EspressoDefaultTags.exit]) as t:
if t:
def _run_exit(case, expected, daemon=False, wait='infinite-listen'):
if isinstance(expected, int):
expected = [expected]
mx.log("Exit test [{}, daemon={}, wait={}]...".format(case, daemon, wait))
rc = _run_espresso_java(args=['-cp', mx.classpath('ESPRESSO_PLAYGROUND'),
'-Despresso.playground.exit.daemon=' + ('true' if daemon else 'false'),
'-Despresso.playground.exit.static=' + ('true' if case == 'STATIC' else 'false'),
'-Despresso.playground.exit.wait=' + wait,
'com.oracle.truffle.espresso.playground.Exit', case], nonZeroIsFatal=False)
if rc not in expected:
raise mx.abort("Exit[{}, daemon={}, wait={}] Expected exit code in {}, got {}".format(case, daemon, wait, expected, rc))

_run_exit('STATIC', 11)
_run_exit('MAIN', 12)
_run_exit('MAIN_FALL', 0)
_run_exit('OTHER_FALL', 13)
_run_exit('OTHER_FALL', [13, 0], daemon=True)
_run_exit('OTHER_WAIT', 14)
_run_exit('OTHER_WAIT', 14, daemon=True)
_run_exit('OTHER_WAIT', 14, wait='infinite-park')
_run_exit('MAIN_OTHER', 15)
_run_exit('MAIN_OTHER', 15, daemon=True)
_run_exit('MAIN_OTHER', 15, wait='infinite-park')


def verify_ci(args):
"""Verify CI configuration"""
Expand Down Expand Up @@ -255,7 +194,6 @@ def verify_ci(args):
'espresso-standalone': [_run_espresso_standalone, '[args]'],
'espresso-java': [_run_espresso_java, '[args]'],
'espresso-meta': [_run_espresso_meta, '[args]'],
'espresso-playground': [_run_espresso_playground, '[class_name] [args]'],
'verify-ci' : [verify_ci, '[options]'],
})

Expand Down
Loading

0 comments on commit 83badae

Please sign in to comment.