[Tests] Add handler to regenerate irText testData
It is disabled by default, can be enabled by code change. It's useful when changes in dumper is done with significant amount of tests changed. ^KT-65460
This commit is contained in:
committed by
Space Team
parent
1f257e98a0
commit
5ddc31e932
@@ -362,6 +362,17 @@ Values of the debug mode: `0` (or `false`), `1` (or `true`), `2`.
|
||||
Debug mode `2` will ensure that IR is dumped to a file after each lowering phase.
|
||||
The IR dumps will appear next to the generated `.js` or `.wat` file.
|
||||
|
||||
# Massive testdata updating
|
||||
|
||||
There is a handler [UpdateTestDataHandler](../tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/UpdateTestDataHandler.kt),
|
||||
which can be used to update all testData. It is disabled by default. It can be enabled by either changing code,
|
||||
or by passing system property `kotlin.test.update.test.data`.
|
||||
|
||||
For example, to update all IR text test data by the output of the JVM backend, you can use:
|
||||
```bash
|
||||
./gradlew -Pkotlin.test.update.test.data=true :compiler:fir:fir2ir:test --tests "org.jetbrains.kotlin.test.runners.ir.FirPsiJvmIrTextTestGenerated" --continue
|
||||
```
|
||||
|
||||
# Code style
|
||||
|
||||
Please keep your abstract test runners as simple as possible. Ideally each abstract test runner should contain **only** test configuration with DSL and nothing else. All services implementations should be declared in separate files.
|
||||
|
||||
Reference in New Issue
Block a user