Skip to content

Commit 5fedfb3

Browse files
committed
Add examples suite.
1 parent 52442b9 commit 5fedfb3

5 files changed

Lines changed: 150 additions & 0 deletions

File tree

examples/.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
mxbuild/**/*
2+
javadoc/**/*
3+
virtualenv/**/*
4+
downloads/**/*
5+
mx.examples/*.pyc
6+
mx.examples/env
7+
mx.examples/eclipse-launches/**
8+
mx.examples/.project
9+
mx.examples/.pydevproject
10+
mx.imports/**/*
11+
/src/*/nbproject/
12+
/src/*/build.xml
13+
/src/*/\.settings
14+
/src/*/\.classpath
15+
/src/*/\.project
16+
/src/*/\bin
17+
/src/*/\.checkstyle
18+
/src/*/\.factorypath
19+
/src/*dist/\.externalToolBuilders
20+
src_gen/**/*
21+
hs_err_pid*.log
22+
workingsets.xml
23+
\.idea
24+
*.iml
25+
*.swp
26+
findbugs.results
27+
.metadata/
28+
/eclipseformat.backup.zip

examples/ci.hocon

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
examplesCommon: {
2+
setup : [
3+
[cd, "./examples"]
4+
]
5+
timelimit : "30:00"
6+
}
7+
8+
examplesGate : ${examplesCommon} {
9+
targets : [ gate ],
10+
run : [
11+
["mx", "gate"]
12+
]
13+
}
14+
15+
builds += [
16+
${linux-amd64} ${java8} ${examplesGate} ${eclipse} ${jdt} { name: "gate-examples-linux-8" },
17+
${linux-amd64} ${java9} ${examplesGate} ${eclipse} { name: "gate-examples-linux-9" },
18+
${solaris-sparcv9} ${java8} ${examplesGate} { name: "gate-examples-solaris-8" },
19+
${darwin-amd64} ${java8} ${examplesGate} { name: "gate-examples-darwin-8" },
20+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#
2+
# commands.py - the GraalVM specific commands
3+
#
4+
# ----------------------------------------------------------------------------------------------------
5+
#
6+
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
7+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8+
#
9+
# This code is free software; you can redistribute it and/or modify it
10+
# under the terms of the GNU General Public License version 2 only, as
11+
# published by the Free Software Foundation.
12+
#
13+
# This code is distributed in the hope that it will be useful, but WITHOUT
14+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16+
# version 2 for more details (a copy is included in the LICENSE file that
17+
# accompanied this code).
18+
#
19+
# You should have received a copy of the GNU General Public License version
20+
# 2 along with this work; if not, write to the Free Software Foundation,
21+
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22+
#
23+
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
24+
# or visit www.oracle.com if you need additional information or have any
25+
# questions.
26+
#
27+
# ----------------------------------------------------------------------------------------------------
28+
29+
import mx
30+
import mx_unittest
31+
import mx_gate
32+
33+
_suite = mx.suite('sdk')
34+
35+
36+
mx.update_commands(_suite, {
37+
'unittest': [mx_unittest.unittest, ''],
38+
'gate' : [mx_gate.gate, ''],
39+
})

examples/mx.examples/suite.py

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
suite = {
2+
"mxversion" : "5.90.02",
3+
"name" : "examples",
4+
"url" : "https://github.com/graalvm/graal",
5+
"developer" : {
6+
"name" : "Graal developers",
7+
"email" : "graal-dev@openjdk.java.net",
8+
"organization" : "Graal",
9+
"organizationUrl" : "https://github.com/graalvm/graal",
10+
},
11+
"scm" : {
12+
"url" : "https://github.com/graalvm/graal",
13+
"read" : "https://github.com/graalvm/graal.git",
14+
"write" : "git@github.com:graalvm/graal.git",
15+
},
16+
"snippetsPattern" : ".*(Snippets|doc-files).*",
17+
"defaultLicense" : "GPLv2-CPE",
18+
"imports" : {
19+
"suites": [
20+
{
21+
"name" : "compiler",
22+
"subdir": True,
23+
"urls" : [
24+
{"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},
25+
]
26+
},
27+
]
28+
},
29+
"libraries" : {},
30+
"projects" : {
31+
"org.graalvm.polyglot.examples" : {
32+
"subDir" : "src",
33+
"sourceDirs" : ["src"],
34+
"dependencies" : [
35+
"sdk:GRAAL_SDK",
36+
"truffle:TRUFFLE_API",
37+
"mx:JUNIT"
38+
],
39+
"uses" : [],
40+
"checkstyle" : "org.graalvm.polyglot",
41+
"javaCompliance" : "1.8",
42+
"workingSets" : "API,SDK",
43+
},
44+
},
45+
"licenses" : {
46+
"UPL" : {
47+
"name" : "Universal Permissive License, Version 1.0",
48+
"url" : "http://opensource.org/licenses/UPL",
49+
}
50+
},
51+
# ------------- Distributions -------------
52+
"distributions" : {
53+
"POLYGLOT_EXAMPLES" : {
54+
"subDir" : "src",
55+
"dependencies" : [
56+
"org.graalvm.polyglot.examples",
57+
],
58+
"distDependencies" : [
59+
],
60+
},
61+
},
62+
}

0 commit comments

Comments
 (0)