Commit Graph

1078 Commits

Author SHA1 Message Date
Alexander Shabalin aee87468a6 [K/N][tests] Move stress tests into a separate project 2024-03-07 15:01:30 +00:00
Dmitriy Novozhilov 4b5eac7816 [Test] Add regression tests for issues which are fixed in K2
Related issues:
KT-10879, KT-18055, KT-20617, KT-23873
KT-25668, KT-31191, KT-33108, KT-41013
KT-51827, KT-53886, KT-56624, KT-58447
KT-58458, KT-58751, KT-58814, KT-60597
KT-62806, KT-63258, KT-63444, KT-65101
KT-65408, KT-65844, KT-66186

^KT-65926 Fixed
2024-03-07 12:49:47 +00:00
Dmitriy Novozhilov b875ae774e [FIR] Unwrap captured types in target type of SAM conversion
^KT-66256 Fixed
2024-03-07 12:41:05 +00:00
Vladimir Sukharev a9af52c288 [Tests] Add test for KT-44199
^KT-44199 Fixed
2024-03-07 11:36:49 +00:00
Vladimir Sukharev b4bc576d37 [Tests] Add test for kt33411
^KT-33411 Fixed


Merge-request: KT-MR-14782
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2024-03-07 08:46:05 +00:00
Svyatoslav Scherbina b4c2164837 [K/N][tests] Fix kt42208WithPassingLambdaToAnotherFunction.kt for K2
It seems that K2 doesn't support `UnitConversionsOnArbitraryExpressions`
experimental language feature (KT-56011), while the test accidentally
relied on it.

Improve the test code so that it doesn't need this language feature
anymore, and enable the test for K2.

^KT-65553 Fixed
2024-03-06 17:07:27 +00:00
Denis.Zharkov b7129f78a3 K2: Fix IAE at Candidate.updateSourcesOfReceivers inside PCLA lambda
Previously, it was failing at line
(resolvedReceiver?.toReference(session) as? FirNamedReferenceWithCandidate)?.candidate?.updateSourcesOfReceivers()

But this line was mostly incorrect because in case of `a.b()` call,
which is resolved to `a.b.invoke()`, `resolvedReceiver` is pointing to
`a` instead of obviously expected `a.b`.

The fix with using `candidate.callInfo.explicitReceiver` doesn't help
either because the candidate of that receiver is always completed at
that stage (so no Candidate there).

The only case when the candidate was still there is PCLA because
 in that case we explicitly don't fully complete even receiver
expressions.
(see docs/fir/pcla.md)

The idea of the fix is moving the call of `updateSourcesOfReceivers`
for invoke property receiver to the place just before the candidate
is being converted to the resolved reference
(i.e., the candidate is being lost)

^KT-66148 Fixed
2024-03-06 17:01:57 +00:00
Sergej Jaskiewicz 67afd12f94 [test] Remove redundant signature clash diagnotic test from Native tests
Since d8d8f24f62 the tests for this
diagnostic are run with the Compiler Core test infrastructure
(see `compiler/testData/diagnostics/klibSerializationTests`)
There is no need to test it separately in `FirCompilerOutputTest`.

^KT-64393 Fixed
2024-03-06 16:05:40 +00:00
Pavel Punegov 8ef2d49ab0 [K/N][test] Refactor test results handling
Move handling to appropriate TestRunCheck instances to make
them separate from each other. Also this makes it possible to
use separately from the ResultHandler on specific scenarios like
in FrameworkTest.
2024-03-06 13:32:32 +00:00
Pavel Punegov 5ddfd4fd91 [K/N][test] Check test filtering with different run parameters
Adds additional checks when different test filtering is used, like
ignored tests filter.
This makes SharedExecutionBuilder be able to handle tests separately
but run together in the executable.
2024-03-06 13:32:32 +00:00
Pavel Punegov 8907885a75 [K/N][test] Refactor test run checking
Make test filtering matching be a check instead of the verification
code in ResultHandler. This allows turning it on/off for specific
test cases and have different checking strategies.
2024-03-06 13:32:32 +00:00
Mikhail Glukhikh 5ea6f20192 K1/K2: add reproducers for KT-66229, KT-66243 and KT-66272
As all these issues aren't reproducible in K2, we may count them as fixed.
Related to KT-53478
#KT-66229 Fixed
#KT-66243 Fixed
#KT-66272 Fixed
2024-03-06 09:01:38 +00:00
Kirill Rakhman 4c93e9cff6 [FIR] Fix captured type arguments of local class as callable reference LHS
#KT-66267
2024-03-06 08:22:42 +00:00
Kirill Rakhman 69a7bf7f68 [FIR] Add equality constraint from expected type for some synthetic function calls
This fixes some cases where we infer some type variable inside one
of the branches to Nothing instead of the expected type because Nothing
appeared in some other branch.

Specifically, we add an equality instead of a subtype constraint during
completion of calls to synthetic functions for if/when, try and !!.
We don't do it when the call contains a (possibly nested) elvis or is
inside the RHS of an assignment.
Otherwise, we would prevent some smart-casts.

#KT-65882 Fixed
2024-03-05 17:38:59 +00:00
anzhela.sukhanova 82255d5ee8 [Test] KT-61360: add tests for the IrFakeOverrideBuilder
Add tests for fake overrides with focus on java interoperability

Co-authored-by: Aleksandra Arsenteva <aleksandra.arsenteva@jetbrains.com>
2024-03-04 16:21:02 +00:00
Pavel Kunyavskiy 8d725753f8 [Fir2IR] Don't build overrides for expect classes.
We don't need them except for checking.
And checking doesn't work in any reasonable way anyway.

^KT-65249 Fixed
2024-03-04 14:12:48 +00:00
Vladimir Sukharev 90aeac945d [K/N][Tests] Support IGNORE_NATIVE and DISABLE_NATIVE in StandardTestCaseGroupProvider
^KT-61259
2024-03-02 08:38:10 +00:00
Vladimir Sukharev b6a6b12f0f [K/N][Tests] Rename compileToExecutable to reflect its one-staged behavior
^KT-66014
2024-03-01 13:53:38 +00:00
Pavel Kunyavskiy 807d352ed4 [Tests] Add test for already fixed KT-60847
^KT-60847 Fixed
2024-03-01 12:51:21 +00:00
Pavel Punegov 3cc117336a [K/N][test] Eager test group creation based on test roots
This commit adds an option to make test grouping eagerly create larger
groups of tests. Each MetaGroup is created based on the test root the
test file is located in. Test compilation tries to compile all
compatible tests in the group into the final binary/executable.

This grouping strategy allows infrastructure to reduce the number of
produced artifacts, and along with running tests from the same binary,
reduce execution time.

This is a part of ^KT-58928 to implement running tests on iOS devices.
2024-03-01 12:15:22 +00:00
Vladimir Sukharev 4d723bfa85 [K/N][Tests] Migrate test kt63243
^KT-61259
2024-03-01 11:38:49 +00:00
Dmitriy Dolovov d8d8f24f62 [Test] Add Native backend tests to check conflicting signatures
^KT-64393
2024-02-29 16:44:45 +00:00
Dmitriy Dolovov b0dc5b8a93 [Test] Support running Fir/Native diagnostic tests with backend
^KT-64393
2024-02-29 16:44:45 +00:00
Dmitriy Dolovov 05628660ba [Test] Implement classic & Fir Native KLIB facades for test infra
With these test facades it would be possible to serialize Native
test modules to KLIBs.

^KT-65117
2024-02-29 16:44:45 +00:00
Igor Yakovlev a5ef668e3c [Wasm] Boolean boxed instances are the same
Fixed #KT-65411
2024-02-28 15:23:21 +00:00
Dmitriy Novozhilov 5c632bc78e [FIR2IR] Don't create f/o symbols on smartcasted Nothing in dispatch receiver
^KT-63525 Fixed
2024-02-28 08:28:14 +00:00
Marco Pennekamp 708ed81eb2 [Test] Avoid importing unused @Nested annotations in generated tests
- Unused `Nested` imports frequently cause unused import warnings in the
  IDE, which are especially annoying in after-commit warning/error
  analysis.
2024-02-27 20:30:06 +00:00
Alexander Shabalin 0882d1752d [K/N][tests] Fix path-separator handling ^KT-65977 2024-02-27 13:20:50 +00:00
Alexander Shabalin c491858a49 [K/N][tests] Add EnforcedHostTarget to atomicfu tests ^KT-65977 2024-02-27 13:20:50 +00:00
Mikhail Glukhikh 678816f9e8 K1: introduce BUILDER_INFERENCE_STUB_PARAMETER_TYPE to prevent compiler crashes
This diagnostic is reported in rare situations when
StubTypeForBuilderInference is kept as a parameter type
of for loop or lambda. Before this commit, we had in K1
"Could not load module <error module>" from IrLinker instead.

Related to: KT-52757, KT-53109, KT-63841, KT-64066
#KT-53478 Fixed
2024-02-27 10:25:13 +00:00
Artem Olkov f493df42a9 [Swift Export] fix swift export full test by adding missing runtime modulemap
Merge-request: KT-MR-14627
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-27 08:15:12 +00:00
Artem Olkov e4acb396ba Add SIR builder and printer for classes #KT-65905 fixed
Merge-request: KT-MR-14478
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-26 14:30:07 +00:00
Vladimir Sukharev febac0dd5f [Tests] Migrate backend-independent tests from native to compiler/testData.
^KT-65979
2024-02-26 13:38:49 +00:00
Artem Olkov dd9332d9e1 Add kotlin runtime modulemap for swift export as part of kotlin-native dist #KT-65673 fixed
Co-authored-by: Alexander Shabalin <alexander.shabalin@ashabalin.me>

Merge-request: KT-MR-14493
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-26 12:51:57 +00:00
Abduqodiri Qurbonzoda 7978f63d37 Set AV to 2.0 in K/N StdlibTest 2024-02-26 10:48:29 +00:00
Dmitriy Novozhilov 9857bdc891 [FIR2IR] Unwrap typealiases during applying of suspend conversion
^KT-65002 Fixed
2024-02-26 08:56:24 +00:00
Pavel Kunyavskiy c991535756 [IRFakeOverrides] Fix accessors visibilities
^KT-65801
2024-02-23 16:35:27 +00:00
Vladimir Sukharev 425381ddf9 [K/N][Tests] Improve test UX for wrong combination of OPT and CACHE modes 2024-02-23 15:06:16 +00:00
Vladimir Sukharev 947b825d77 [K/N][Tests] Ignore test kt56402 with caches
^KT-66032
2024-02-22 22:41:37 +00:00
Vladimir Sukharev ecdf97c6b7 [K/N][Tests] Adjust test smoke.kt to improved fake override engine
^KT-61323
2024-02-22 22:41:37 +00:00
Vladimir Sukharev 98c3147d19 [K/N][Tests] Fix ComplexCInteropTest.kt to respect 2-stage compilation
^KT-66014
2024-02-22 22:41:37 +00:00
Alexander Shabalin dc4f12f29c Revert "[K/N][Tests] Migrate driver test llvm_variant_dev"
This reverts commit d8a90f55a8.
2024-02-22 14:56:13 +00:00
Alexander Shabalin 4765cfda53 Revert "[K/N][Tests] Migrate test override_konan_properties0"
This reverts commit 9ef051dbc5.
2024-02-22 14:56:13 +00:00
Alexander Shabalin 8518c3f54f Revert "[K/N][Tests] Migrate test override_konan_properties0 and add testDriverVersion"
This reverts commit fbe8db4b45.
2024-02-22 14:56:13 +00:00
Alexander Shabalin 876be8f17a Revert "[K/N][Tests] Ignore KonanDriverTest tests on MinGW/opt.debug/cache.no"
This reverts commit 313b230333.
2024-02-22 14:56:13 +00:00
Dmitriy Dolovov 7fe0de897b [KLIB tool] Update missing test data in Kotlin/Native C-interop tests
^KT-62340
2024-02-21 21:21:31 +00:00
Vladimir Sukharev bd7ffc71aa [K/N][Tests] Migrate test kt62262.kt
^KT-61259
2024-02-20 21:10:33 +00:00
Vladimir Sukharev 3d70be0c5f [K/N][Tests] Migrate test kt40426
^KT-61259
2024-02-20 18:56:54 +00:00
Sergey Bogolepov 8ae6e98295 [Native][Tests] Adapt CExport tests to generator changes 2024-02-20 15:23:22 +00:00
Sergey Bogolepov 4f9c1860b1 [Native][Tests] Add tests for -Xbinary=cInterfaceMode=none 2024-02-20 15:23:22 +00:00