Skip to content

Commit 4df3d92

Browse files
committed
Update mx graalpytest doc
1 parent e8923bb commit 4df3d92

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/contributor/CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,19 @@ Here are some advanced commands to debug test failures and fix issues.
139139
First, we have three sets of unit tests in the base repository:
140140
1. Our own Python-bases unit tests
141141
2. JUnit tests
142-
3. Python's standard library tests
142+
3. Python's standard library tests, we often refer to those as tagged tests
143143
144144
To run the first, you can use this command:
145145
146146
```bash
147147
mx python-gate --tags python-unittest
148148
```
149149
150-
If some of the tests fail, you can re-run just a single test like this, substituting TEST-PATTERN (and possibly the file glob on the third line) with the test you want to run.
150+
If some of the tests fail, you can re-run just a single test like this, substituting TEST-SELECTOR with the test you want to run. You can use the whole failed test name including the path as the selector.
151151
Note that you can insert `-d` to debug on the Java level or use `--inspect` to debug in the Chrome debugger.
152152
153153
```bash
154-
mx [-d] graalpytest [--inspect] test_*.py -k TEST-PATTERN
154+
mx [-d] graalpytest [--inspect] TEST-SELECTOR
155155
```
156156
157157
To run the JUnit tests, you can use this command:
@@ -174,16 +174,16 @@ mx python-gate --tags python-tagged-unittest
174174
```
175175
176176
Note that we use "tag files", small _*.txt_ files that select which tests to run, so we only run tests that we know should pass.
177-
To run a subset of those tests, use the following command:
177+
To run a subset of those tests, use the following command. The selector can be a test name, a test file path a glob or an individual test ID.
178178
179179
```
180-
mx [-d] python-run-cpython-unittest [--inspect] NAME-OF-CPYTHON-UNITTEST
180+
mx [-d] graalpytest [--inspect] --tagged TEST-SELECTOR
181181
```
182182
183183
A tag file can be regenerated with
184184
185185
```
186-
mx python-retag-unittests NAME-OF-CPYTHON-UNITTEST
186+
mx graalpytest --retag TEST-SELECTOR
187187
```
188188
189189
There are also several other gates that may fail with changes.

mx.graalpython/mx_graalpython.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ def graalpytest(args):
998998
python_args = []
999999
runner_args = []
10001000
for arg in unknown_args:
1001-
if arg.startswith(('--python.', '--engine.', '--llvm.', '--vm.')):
1001+
if arg.startswith(('--python.', '--engine.', '--llvm.', '--vm.', '--inspect', '--experimental-options')):
10021002
python_args.append(arg)
10031003
else:
10041004
runner_args.append(arg)
@@ -3031,7 +3031,7 @@ def graalpy_standalone_wrapper(args_in):
30313031
'python-src-import': [mx_graalpython_import.import_python_sources, ''],
30323032
'python-coverage': [python_coverage, ''],
30333033
'punittest': [punittest, ''],
3034-
'graalpytest': [graalpytest, '[-h] [-v] [--python PYTHON] [-k TEST_PATTERN] [TESTS]'],
3034+
'graalpytest': [graalpytest, '[-h] [--python PYTHON] [TESTS]'],
30353035
'clean': [python_clean, ''],
30363036
'python-update-hpy-import': [update_hpy_import_cmd, '[--no-pull] PATH_TO_HPY'],
30373037
'bisect-benchmark': [mx_graalpython_bisect.bisect_benchmark, ''],

0 commit comments

Comments
 (0)