Commit Graph

171 Commits

Author SHA1 Message Date
Mikhail Glukhikh 5e4c0186ac Fix exception in checker stage of FirResolveModularizedTotalKotlinTest
#KT-65468 Fixed
2024-02-09 09:34:19 +00:00
Dmitriy Novozhilov 727d2f46f8 [FIR] Part 1. Group checkers by the MPP kind
This commit introduces MppChecker kind, which represents the new property
  of checkers
- `MppCheckerKind.Common` means that this checker should run from the same
  session to which corresponding declaration belongs
- `MppCheckerKind.Platform` means that in case of MPP compilation this
  checker should run with session of leaf platform module for sources
  of all modules

An example of a platform checker is a checker that checks class scopes
  and reports ABSTRACT_NOT_IMPLEMENTED and similar diagnostics. If some
  regular class in the common module contains expect supertypes, the
  checker should consider the actualization of those supertypes to get
  a complete type scope

^KT-58881
2024-01-24 10:44:59 +02:00
Marco Pennekamp 5f6ffc55b8 [Test] Wrap Disposer.dispose calls in finally
- This ensures that disposables are disposed on test failure as well.

^KT-64099
2023-12-19 11:12:23 +00:00
Marco Pennekamp 32fe29b8cc [Test] Add debug names to unnamed test disposables
- This helps to track down disposables which are never disposed, and
  reduces confusion when printing disposables in general (the names will
  now be meaningful, instead of endless lists of "newDisposable" and
  "TestDisposable").

^KT-64099
2023-12-19 11:12:23 +00:00
Ilya Gorbunov d2aae67e03 Replace kotlin-test project dependencies in the project
Use dependency helper function that chooses whether to take them
from the bootstrap repository or from a configuration of kotlin-test

KT-61969
2023-12-13 15:40:25 +00:00
Mikhail Glukhikh 488049174c FP tests: take 'skipPrereleaseCheck' from module configuration
Before this commit we skipped this check for every module,
but now we skip it only if we need it
2023-09-21 15:01:21 +00:00
Mikhail Glukhikh 1c6af76f61 Skip pre-release checks in FP tests 2023-09-20 15:57:54 +00:00
Alexander.Likhachev 53fde520d5 [Build] Add jUnit dependencies in testApiJUnit5 to the implementation configuration
Adding these dependencies to the `api` configuration pollutes classpath for each dependant modules even if it doesn't need them. Instead, the dependencies should be declared more granularly if they're required
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 357d12fc8e [Build] Move JUnit dependencies into the version catalog
The `kotlin-test` dependencies are left untouched as changing them affects publications, thus these versions are independent from the used inside our build
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
Simon Ogorodnik 20da554443 [FP/MT Test] Document and extract CPU isolation logic to a separate file 2023-08-16 16:46:23 +00:00
Simon Ogorodnik 3636f9dd71 [FP/MT Test] Fix CPU affinity for thread isolation on hardware agents
In some builds on hardware agents, we use a linux container without `ps`
command; it causes isolation logic to execute partially.
This change removes the usage of `ps` and replaces it with a direct
listing of the procfs.
2023-08-16 16:46:23 +00:00
Simon Ogorodnik d6e760b477 [K2/K1 FP] Fix context-receivers flag passing in full-pipeline test
We should copy `-Xcontext-receivers` flag from the original arguments
during the setup of compiler arguments in the FP test

Otherwise, UNSUPPORTED_CONTEXTUAL_DECLARATION_CALL diagnostic gets
triggered where it shouldn't be present
2023-08-09 10:25:12 +00:00
Denis.Zharkov e98890cece K2: Remove a bunch of unused declarations 2023-07-11 13:12:22 +00:00
Kirill Rakhman 2cc588d6d8 [RAW FIR] Rename raw FIR builder types for clarity 2023-06-30 12:05:43 +00:00
Alexander Udalov 60016d3e5b Remove obsolete compiler flag -Xuse-ir 2023-05-30 14:46:09 +00:00
Nikolay Lunyak d72a50b3f5 [FIR] KT-58065: Support LT in K2JsIrCompiler 2023-05-16 12:11:46 +00:00
Simon Ogorodnik ecf40e5c7a Revert "KT-57927: Fix deserialization of K2JVMCompilerArguments in FP/MT tests"
This reverts commit f8fdfc5d332b171b0e9e410b09a0b1e30d0d510e.

The change should be reverted as original change of the format in the
K2JVMCompilerArguments was reverted by commit:
5d0bf2de24

Merge-request: KT-MR-9684
Merged-by: Simon Ogorodnik <Simon.Ogorodnik@gmail.com>
2023-04-19 16:30:11 +00:00
Sebastian Sellmair 5d0bf2de24 [CLI] Restore K2JVMCompilerArguments.classpath and javaModulePath
to support IDEs < 2023.2

Reverts:
- 9dcd40d7b7
- fb66764c4d

KTIJ-25227
2023-04-18 09:18:10 +00:00
Simon Ogorodnik 98aca55a2a KT-57927: Fix deserialization of K2JVMCompilerArguments in FP/MT tests
Due to changes in 9dcd40d7b7
classpath and pluginClasspath arguments become Arrays
Now we need to update arguments representation to properly deserialize
it

^KT-57927
2023-04-11 18:10:36 +00:00
Sebastian Sellmair fb66764c4d [CLI] K2JVMCompilerArguments: Model modulePath as Array<String>
to allow interning individual file-path arguments on the IDE

KTIJ-24976
2023-04-06 16:03:04 +00:00
Dmitriy Novozhilov d4bb740a62 [CLI] Store information about HMPP module for source files 2023-02-17 11:08:50 +00:00
Simon Ogorodnik a69bc5939f Modularized tests. Remove obsolete PassEventReporter
^KT-56075
2023-02-15 15:43:31 +00:00
Simon Ogorodnik 8a0f3c4f1c Modularized tests. Remove use of -Xuse-k2 argument in FP test
Use just language version to configure frontend, as -Xuse-k2 flag
is deprecated

^KT-56075
2023-02-15 15:43:31 +00:00
Simon Ogorodnik 6ffd3ed970 Modularized tests. Support configuring known compiler plugins in FP test
Construct compiler plugins classpath based on original
compiler arguments
Support of plugins in full pipeline test allows us to test projects
where some common compiler plugins are used without excluding modules

^KT-56075
2023-02-15 15:43:30 +00:00
Simon Ogorodnik 59e69481a3 Modularized tests. Support parsing of original compiler arguments
Now testData contains info about original compiler arguments, which can
be reused to support plugins and various other arguments

Support original arguments in modularized tests
- Properly support JDK9 modules
- Opt-ins from original arguments
- jdkHome from module data or arguments, as well as noJdk option
- Fix friendPaths not configured
- jvmDefault now handled properly

^KT-56075
^KT-55879
2023-02-15 15:43:30 +00:00
Simon Ogorodnik 36c3d62ba1 Modularized tests. Fix java source scope for light tree mode
We should use appropriate java source scope for java files,
not kotlin files

^KT-56075
2023-02-15 15:43:30 +00:00
Simon Ogorodnik 233469d249 Modularized tests. Extract common arguments for full-pipeline tests
^KT-56075
2023-02-15 15:43:29 +00:00
Simon Ogorodnik 780fe4848f Modularized tests. Migrate to JDOM for model loading
Previously org.w3c was used
In order to reuse intellij serialization migrate to JDOM

^KT-56075
2023-02-15 15:43:29 +00:00
Simon Ogorodnik f54453950e Modularized tests. Extract common class for FE1/FIR tests
^KT-56075
2023-02-15 15:43:28 +00:00
Simon Ogorodnik 7c8fffbb3d Modularized tests. Enable renderInternalDiagnosticNames for K1
^KT-56075
2023-02-15 15:43:28 +00:00
Simon Ogorodnik 83ead8fb6f Modularized tests. Remove obsolete use_build_file switch
^KT-56075
2023-02-15 15:43:27 +00:00
Simon Ogorodnik 1bb5635570 Modularized tests. Force noStdlib and noReflect in full-pipeline tests
In fact, test-data classpath contains references to stdlib and reflect
already
In order to avoid duplicating libraries on classpath set flags
accordingly

^KT-56075
2023-02-15 15:43:27 +00:00
Mikhail Glukhikh a13fd033fc Give slightly better names to language/API version variables in FP tests 2023-01-16 18:16:49 +01:00
Mikhail Glukhikh f332b6dcec Handle LV 2.0 in modularized tests 2023-01-16 18:12:55 +01:00
Ilya Chernikov 73e0a5ccd3 K2: Use LightTree by default in modularized tests 2023-01-02 19:54:57 +00:00
Ilya Chernikov 47a4532ea0 K2: update LightTree support in modularized tests 2023-01-02 19:54:56 +00:00
Ilya Kirillov 7bac119f20 [FIR] add lazy resolution contract checks in resolve 2022-12-12 16:21:06 +00:00
Nikolay Lunyak 2e9f9f987b [FIR] KT-44698: Print file:line:offset on K2 crash
^KT-44698 Fixed
2022-11-29 22:35:51 +00:00
Egor Kulikov 067036c162 RawFirBuilder refactoring
Second step for KT-52615
Get rid of PsiHandlingMode
Get rid of source in FirLazyBlock
Refactor lazy creation

Merge-request: KT-MR-7753
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2022-11-22 14:43:53 +00:00
Ilya Chernikov 942def5828 Preserve app env in FP tests to benefit from FastJarFS caching 2022-10-21 06:11:42 +00:00
Dmitriy Novozhilov be3f8e7eb0 [FIR] Remove redundant opt-ins to ExperimentalStdlibApi in FIR modules 2022-10-19 11:09:33 +00:00
Ivan Kochurkin a4ad8d59b6 [FIR] Move createSessionForTests, createSessionForTests into FirTestSessionFactoryHelper 2022-10-13 18:11:49 +00:00
Alexander Udalov 0569f429dd Report error on -Xuse-old-backend, remove Gradle option useOldBackend
Allow using old JVM backend only to compile kts.

 #KT-48532 Fixed
2022-09-16 00:16:31 +02:00
Nikita Bobko 8f79e833a8 Drop all redundant kotlin-reflect, kotlin-reflect-api dependencies
Review: https://jetbrains.team/p/kt/reviews/6753

All redundant I managed to find, of course.

Why: I'm going to process all reflect dependencies in the next commits.
Cleanup reflect dependency before processing.

They are redundant because:
1. if `compileOnly` then compilation didn't break after dropping the
   dependency
2. if `test*` then tests didn't break after dropping the dependency.
3. `analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts`
   `compiler/fir/checkers/checkers-component-generator/build.gradle.kts`
   Drop `implementation(project(":kotlin-reflect-api"))` because the
   module already depends on
   `implementation(project(":kotlin-reflect"))`
4. `compiler/daemon/daemon-client/build.gradle.kts`. Drop `runtimeOnly`
   because after dropping `compileOnly` compilation didn't break (so
   `runtimeOnly` looks suspicious). Less safe than 1-3
2022-08-22 15:42:57 +02:00
Nikita Bobko 70ed76e0bd Drop unused ':dist' dependency in some tests
Review: https://jetbrains.team/p/kt/reviews/6753

This commit doesn't fix any issue except for "cleanup". If you find a
mistake in this commit feel free to revert part of it/the whole commit

I checked every module where I drop ':dist' dependency. Tests still pass
in those modules
2022-08-22 15:42:34 +02:00
Mikhail Glukhikh 9add6f3d55 K2: add more accurate & more automatic control of diagnostic suppression
#KT-51363 Fixed
2022-07-22 11:35:26 +00:00
Simon Ogorodnik d94d832309 FIR Test. Fix isolate not called for FP tests 2022-07-04 12:49:05 +00:00
Simon Ogorodnik 58885a1b07 KT-52217 Rename 'use-fir' to 'use-k2', update message 2022-04-28 15:42:42 +00:00
Vyacheslav Gerasimov d9e8f0c180 Build: Rework test workers calculation with respect to available memory
#KTI-787
2022-04-19 11:45:23 +00:00
Dmitriy Novozhilov 51bd0fd2db [FIR] Add ability to specify module name in modularized test
Use `fir.bench.filter.name` property to specify module name instead of
  module path regex
2022-04-07 12:18:48 +00:00