Skip to content

Commit c0123ea

Browse files
committed
Add "How to use jt CLI tool" section to the How-To guide
1 parent 7debc98 commit c0123ea

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

doc/contributor/how-to-guide.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
* [How to add a new spec](#how-to-add-a-new-spec)
3434
* [How to work on a new CRuby feature](#how-to-work-on-a-new-cruby-feature)
3535
* [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)
3637

3738
## How to find a Core Method implementation
3839

@@ -1602,3 +1603,32 @@ If the new feature breaks existing behavior and some specs fail - disable them t
16021603
is switched to the next CRuby version completely) with tagging as failed (use `jt tag <path-to-spec-file>`)
16031604
16041605
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

Comments
 (0)