|
33 | 33 | * [How to add a new spec](#how-to-add-a-new-spec)
|
34 | 34 | * [How to work on a new CRuby feature](#how-to-work-on-a-new-cruby-feature)
|
35 | 35 | * [How to prepare PR for changes in the next CRuby version](#how-to-prepare-pr-for-changes-in-the-next-cruby-version)
|
| 36 | + * [How to use jt CLI tool](#how-to-use-jt-cli-tool) |
36 | 37 |
|
37 | 38 | ## How to find a Core Method implementation
|
38 | 39 |
|
@@ -1602,3 +1603,32 @@ If the new feature breaks existing behavior and some specs fail - disable them t
|
1602 | 1603 | is switched to the next CRuby version completely) with tagging as failed (use `jt tag <path-to-spec-file>`)
|
1603 | 1604 |
|
1604 | 1605 | Look for additional details in the Contributor Workflow guide <https://github.com/oracle/truffleruby/blob/master/doc/contributor/workflow.md#running-specs-for-ruby-32-features>.
|
| 1606 | +
|
| 1607 | +## How to use jt CLI tool |
| 1608 | +
|
| 1609 | +The `jt` CLI tool has a lot of commands but there are very few basic ones that you may need to use often: |
| 1610 | +
|
| 1611 | +- `jt ruby` - run TruffleRuby REPL (`irb`) |
| 1612 | + - `jt ruby <filename>` - execute a file with Ruby source code with TruffleRuby |
| 1613 | + - `jt ruby -e '<Ruby source code>'` - execute a string of Ruby source code with TruffleRuby REPL |
| 1614 | + - `jt -q ruby --jdebug -e '<Ruby source code>'` - to launch debugger |
| 1615 | +- `jt test <path to test file>` - run ruby/spec test file |
| 1616 | + - `jt --use ruby test <path to test file>` - to use tests against current CRuby, not TruffleRuby |
| 1617 | + - `jt -u ruby test <path to test file>` - there is a short form `-u` |
| 1618 | + - `jt test <path to test file> -- --jdebug` - to launch debugger |
| 1619 | + - `jt test fast <path to test file>` - run subset of specs and tag slow test cases with tag `slow` |
| 1620 | + - `jt test :next` - run specs for features introduced in the next CRuby version, not supported by TruffleRuby currently |
| 1621 | +- `jt test mri <path to test file>` - run MRI test file |
| 1622 | + - `jt test mri <path to test file> --jdebug` - to launch debugger for MRI tests (without `--`) |
| 1623 | + - `jt test mri <path to MRI test file> -- -n <test case name>` - to run only specified UnitTest case |
| 1624 | +- `jt build` |
| 1625 | +- `jt clean` |
| 1626 | +- `jt rebuild` |
| 1627 | +- `jt sync` - to synchronize changes in Standard Library Ruby source code and apply them without rebuilding TruffleRuby |
| 1628 | +- `jt tag` - ruby/spec only |
| 1629 | +- `jt untag <path-to-file>` - (ruby/spec only) regenerate an exclude file for particular ruby/spec file (and list all the failed test cases) |
| 1630 | +- `jt retag <path-to-file>` - (MRI test only) regenerate an exclude file for particular MRI test file (and list all the failed test cases) |
| 1631 | +- `jt lint fast` - to run some linter checks (that are run on CI) locally |
| 1632 | +- `jt rubocop` - to run Ruby source code linter separately from other linter checks. |
| 1633 | + - `jt rubocop -a` - to correct safely Rubocop warnings automatically |
| 1634 | + - `jt rubocop -A` - to correct unsafely Rubocop warnings automatically |
0 commit comments