Skip to content

Commit 9c62165

Browse files
committed
Improve zjit's doc about testing
1 parent b773128 commit 9c62165

1 file changed

Lines changed: 53 additions & 1 deletion

File tree

doc/zjit.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,31 @@ use `make`.
7878

7979
</details>
8080

81-
### test/ruby/test\_zjit.rb
81+
### make zjit-test-ruby
82+
83+
This command runs only the ZJIT-specific Ruby tests (`test/ruby/test_zjit.rb`).
84+
85+
```
86+
make zjit-test-ruby
87+
```
88+
89+
### make zjit-test-ruby-all
90+
91+
This command runs all Ruby tests with ZJIT enabled. Currently excludes some tests that are known to fail, but the goal is to support all tests.
92+
93+
```
94+
make zjit-test-ruby-all
95+
```
96+
97+
### make zjit-test-rust-lldb
98+
99+
This command runs a specific Rust test under LLDB debugger. Useful for debugging failing tests.
100+
101+
```
102+
make zjit-test-rust-lldb ZJIT_TESTS=test_putobject
103+
```
104+
105+
### make zjit-test-ruby
82106

83107
This command runs Ruby execution tests.
84108

@@ -91,3 +115,31 @@ You can also run a single test case by matching the method name:
91115
```
92116
make test-all TESTS="test/ruby/test_zjit.rb -n TestZJIT#test_putobject"
93117
```
118+
119+
## Other ZJIT Commands
120+
121+
### make zjit-bindgen
122+
123+
This command regenerates the Rust bindings for ZJIT. Run this after modifying C code that ZJIT needs to interact with.
124+
125+
```
126+
make zjit-bindgen
127+
```
128+
129+
Requires a `--enable-zjit=dev` build and Clang. The generated bindings are in `zjit/src/cruby_bindings.inc.rs`.
130+
131+
### make zjit-bench
132+
133+
This command runs ZJIT benchmarks using the zjit-bench repository.
134+
135+
```
136+
make zjit-bench
137+
```
138+
139+
### make update-zjit-bench
140+
141+
This command updates the zjit-bench repository to the latest version.
142+
143+
```
144+
make update-zjit-bench
145+
```

0 commit comments

Comments
 (0)