You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Python [TCK runner](https://github.com/oracle/graal/blob/master/truffle/mx.truffle/tck.py) can be used to execute the Truffle TCK on top of GraalVM. The script requires Maven for downloading the TCK artifacts.
67
-
68
-
To execute TCK tests on GraalVM use:
69
-
70
-
`python tck.py -g <path_to_graalvm>`
71
-
72
-
To include your own language and TCK provider use:
To include additional languages in the TCK execution add their TCK providers as test dependencies. For example, adding `org.graalvm.js:js-truffle-tck` will include JavaScript in the testing process.
88
+
You can utilize the SimpleLanguage TCK provider [pom.xml](https://github.com/oracle/graal/blob/master/truffle/external_repos/simplelanguage/tck/pom.xml) as a template to get started.
89
+
To test the runtime optimizations set the `JAVA_HOME` environment variable to the GraalVM location before running `mvn package`.
90
+
91
+
### Customize TCK Tests
92
+
To restrict the TCK tests to test a certain language, use the `tck.language` property.
93
+
The following example tests JavaScript with data types from all available languages.
94
+
```
95
+
<build>
96
+
<plugins>
97
+
[...]
98
+
<plugin>
99
+
<groupId>org.apache.maven.plugins</groupId>
100
+
<artifactId>maven-surefire-plugin</artifactId>
101
+
<version>3.1.2</version>
102
+
<configuration>
103
+
<argLine>
104
+
-Dtck.language=js
105
+
</argLine>
106
+
[...]
107
+
</configuration>
108
+
</plugin>
109
+
[...]
110
+
</plugins>
111
+
</build>
112
+
```
91
113
92
-
`python tck.py -g <path_to_graalvm> js compile`
114
+
To restrict the data types to a certain language, use the `tck.values` property.
115
+
The following example tests JavaScript with Java types.
116
+
```
117
+
<build>
118
+
<plugins>
119
+
[...]
120
+
<plugin>
121
+
<groupId>org.apache.maven.plugins</groupId>
122
+
<artifactId>maven-surefire-plugin</artifactId>
123
+
<version>3.1.2</version>
124
+
<configuration>
125
+
<argLine>
126
+
-Dtck.values=java-host
127
+
-Dtck.language=js
128
+
</argLine>
129
+
[...]
130
+
</configuration>
131
+
</plugin>
132
+
[...]
133
+
</plugins>
134
+
</build>
135
+
```
136
+
137
+
To execute a specific TCK test you can use the test parameter along with the `-Dtest` option.
0 commit comments