From adf98770f347b93ea175d6a1dc5acecfc3174a8d Mon Sep 17 00:00:00 2001 From: Dmitriy Dolovov Date: Thu, 16 Jun 2022 13:32:16 +0400 Subject: [PATCH] [Native][tests] Fix description of test parameters --- kotlin-native/HACKING.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/kotlin-native/HACKING.md b/kotlin-native/HACKING.md index 8eba6292ad8..7eebbf99435 100644 --- a/kotlin-native/HACKING.md +++ b/kotlin-native/HACKING.md @@ -81,21 +81,21 @@ To run blackbox compiler tests use: -Pkotlin.internal.native.test.= \ -Pkotlin.internal.native.test.= -| Property | Description | -|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `nativeHome` | The full path to the Kotlin/Native distribution that will be used to run tests on. If not specified, then the distribution will be built by the corresponding Gradle task as a precondition before running tests: `:kotlin-native:dist` or `:kotlin-native:${target}CrossDist`.

Typically, this parameter is used to run tests against a distribution that was already built and cached somewhere. For example, to reproduce a test failure on a certain Kotlin/Native build. | -| `compilerClasspath` | The full path to the Kotlin/Native compiler classpath. If not specified, then the classpath is deduced as `${nativeHome}/konan/lib/kotlin-native-compiler-embeddable.jar`

This property allows to override the compiler itself preserving the rest of the distribution, and this way to test various backward compatibility cases. | -| `target` | The name of the Kotlin/Native target under test | -| `mode` | * `ONE_STAGE_MULTI_MODULE` : Compile each test file as one or many modules (depending on MODULE directives declared in the file). Produce a KLIB per each module except the last one. Finally, produce an executable file by compiling the latest module with all other KLIBs passed as -library
* `TWO_STAGE_MULTI_MODULE` (default): Compile each test file as one or many modules (depending on MODULE directives declared in the file). Produce a KLIB per each module. Finally, produce an executable file by passing the latest KLIB as -Xinclude and all other KLIBs as -library. | -| `forceStandalone ` | If `true` then all tests with `// KIND: REGULAR` inside test data file are executed as if they were be with `// KIND: STANDALONE`. The default is `false`. | -| `compileOnly ` | If `true` then tests are fully compiled to the executable binary, but not executed afterwards. The default is `false`. | -| `optimizationMode` | Compiler optimization mode: `DEBUG` (default), `OPT`, `NO` | -| `memoryModel` | The memory model: `DEFAULT` (default) or `EXPERIMENTAL` | -| `useThreadStateChecker` | If `true` the thread state checker is enabled. The default is `false`.

Note: Thread state checker can be enabled only in combination with `optimizationMode=DEBUG`, `memoryModel=EXPERIMENTAL` and `cacheMode=NO`. | -| `gcType` | The type of GC: `UNSPECIFIED` (default), `NOOP`, `STMS`, `CMS`

Note: The GC type can be specified only in combination with `memoryModel=EXPERIMENTAL`. | -| `gcScheduler` | The type of GC scheduler: `UNSPECIFIED` (default), `DISABLED`, `WITH_TIMER`, `ON_SAFE_POINTS`, `AGGRESSIVE`

Note: The GC scheduler type can be specified only in combination with `memoryModel=EXPERIMENTAL`. | -| `cacheMode` | * `NO`: no caches
* `STATIC_ONLY_DIST` (default): use only caches for libs from the distribution
* `STATIC_EVERYWHERE`: use caches for libs from the distribution and generate caches for all produced KLIBs

Note: Any cache mode that permits using caches can be enabled only when thread state checker is disabled. | -| `executionTimeout` | Max permitted duration of each individual test execution in milliseconds | +| Property | Description | +|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `nativeHome` | The full path to the Kotlin/Native distribution that will be used to run tests on. If not specified, then the distribution will be built by the corresponding Gradle task as a precondition before running tests: `:kotlin-native:dist` or `:kotlin-native:${target}CrossDist`.

Typically, this parameter is used to run tests against a distribution that was already built and cached somewhere. For example, to reproduce a test failure on a certain Kotlin/Native build. | +| `compilerClasspath` | The full path to the Kotlin/Native compiler classpath. If not specified, then the classpath is deduced as `${nativeHome}/konan/lib/kotlin-native-compiler-embeddable.jar`

This property allows to override the compiler itself preserving the rest of the distribution, and this way to test various backward compatibility cases. | +| `target` | The name of the Kotlin/Native target under test | +| `mode` | * `ONE_STAGE_MULTI_MODULE` : Compile each test file as one or many modules (depending on MODULE directives declared in the file). Produce a KLIB per each module except the last one. Finally, produce an executable file by compiling the latest module with all other KLIBs passed as `-library`
* `TWO_STAGE_MULTI_MODULE` (default): Compile each test file as one or many modules (depending on MODULE directives declared in the file). Produce a KLIB per each module. Finally, produce an executable file by passing the latest KLIB as `-Xinclude` and all other KLIBs as `-library`. | +| `forceStandalone ` | If `true` then all tests with `// KIND: REGULAR` inside test data file are executed as if they were be with `// KIND: STANDALONE`. The default is `false`. | +| `compileOnly ` | If `true` then tests are fully compiled to the executable binary, but not executed afterwards. The default is `false`. | +| `optimizationMode` | Compiler optimization mode: `DEBUG` (default), `OPT`, `NO` | +| `memoryModel` | The memory model: `DEFAULT` (default) or `EXPERIMENTAL` | +| `useThreadStateChecker` | If `true` the thread state checker is enabled. The default is `false`.

Note: Thread state checker can be enabled only in combination with `optimizationMode=DEBUG`, `memoryModel=EXPERIMENTAL` and `cacheMode=NO`. | +| `gcType` | The type of GC: `UNSPECIFIED` (default), `NOOP`, `STMS`, `CMS`

Note: The GC type can be specified only in combination with `memoryModel=EXPERIMENTAL`. | +| `gcScheduler` | The type of GC scheduler: `UNSPECIFIED` (default), `DISABLED`, `WITH_TIMER`, `ON_SAFE_POINTS`, `AGGRESSIVE`

Note: The GC scheduler type can be specified only in combination with `memoryModel=EXPERIMENTAL`. | +| `cacheMode` | * `NO`: no caches
* `STATIC_ONLY_DIST` (default): use only caches for libs from the distribution
* `STATIC_EVERYWHERE`: use caches for libs from the distribution and generate caches for all produced KLIBs

Note: Any cache mode that permits using caches can be enabled only when thread state checker is disabled. | +| `executionTimeout` | Max permitted duration of each individual test execution in milliseconds | ### Target-specific tests