Commit Graph

1096 Commits

Author SHA1 Message Date
Johan Bay b50111cde5 [K/N] add testing setup for header klibs and caches
^KT-65443
2024-03-19 14:09:44 +00:00
Dmitriy Dolovov 722acc028a Revert "[K/N] add testing setup for header klibs and caches"
This reverts commit a89893a2c5.
2024-03-15 22:32:50 +01:00
Johan Bay a89893a2c5 [K/N] add testing setup for header klibs and caches
^KT-65443
2024-03-15 10:24:26 +00:00
Alexander Shabalin d88092aa94 [K/N][tests] Migrate various runtime/ tests ^KT-61259 2024-03-15 01:28:01 +00:00
Timofey Solonin 9295f44eda Quote module name in the generated modulemap
This fixes an issue where Kotlin projects named "umbrella" or
"framework" produce unimportable framework modules.

^KT-66565
2024-03-14 19:19:57 +00:00
Artem Kobzar eb8054ac1e [K/Wasm] Fix object optimization false trigger on non-pure objects ^KT-66471 Fixed 2024-03-14 17:12:45 +00:00
Alexander Shabalin bbcc5c9aed [K/N][tests] Migrate interopTest tests ^KT-61259 2024-03-14 11:47:00 +00:00
Vladimir Sukharev 5fee662223 [Tests] Add test for KT-57391
^KT-57391
2024-03-12 18:10:10 +00:00
Dmitry Savvinov b19ad2505c [native] Remove code support for experimental KonanTargets
ZEPHYR was the first and the last experimental KonanTarget.
As ZEPHYR is now entirely removed from the codebase, the respective code
can be dropped

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 85bcc8443d [native] Drop deprecated Kotlin/Native targets (2/8)
Remove plain references to removed KonanTarget or Family entries. All
the changes in this commit are simple removal of some when-branches
on now dropped entries

^KT-64517
2024-03-12 16:22:26 +00:00
Alexander Shabalin 8c6966765b [K/N][tests] Move driver tests into their own project ^KT-61259 2024-03-12 15:42:06 +00:00
Alexander Shabalin 316614bc9e Revert "Revert "[K/N][Tests] Ignore KonanDriverTest tests on MinGW/opt.debug/cache.no""
This reverts commit 876be8f17a.
2024-03-12 15:42:06 +00:00
Alexander Shabalin 9832edddab Revert "Revert "[K/N][Tests] Migrate test override_konan_properties0 and add testDriverVersion""
This reverts commit 8518c3f54f.
2024-03-12 15:42:06 +00:00
Alexander Shabalin 60c74ab91a Revert "Revert "[K/N][Tests] Migrate test override_konan_properties0""
This reverts commit 4765cfda53.
2024-03-12 15:42:06 +00:00
Alexander Shabalin 3c097ee5e0 Revert "Revert "[K/N][Tests] Migrate driver test llvm_variant_dev""
This reverts commit dc4f12f29c.
2024-03-12 15:42:06 +00:00
Igor Yakovlev 7c16528560 [Wasm] PL tests implementation for Wasm target
Fixed #KT-58088
2024-03-12 14:36:45 +00:00
Ivan Kylchik e1180adfbd [Native] Always cast expression to the expected type after inline
Right now, during the process of inlining, the compiler erases types.
Because of that, we can end up with some random type
(for example, `Any`) where the concrete type was
expected (for example, `Int`). Compiler must insert a cast in the
required places.

#KT-66017 Fixed
2024-03-12 08:19:50 +00:00
Dmitriy Novozhilov 7a383373b0 [Test] Reproduce KT-65415 and KT-66432 2024-03-12 06:46:09 +00:00
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