K2: Support binary library dependencies between test modules
The test infrastructure for analysis supports binary module tests, but the binary build does not use another binary module as a dependency when it passes the class path. As a result, each binary module build does not work when they have dependency on each other. This commit fixes the issue by 1. Topological sort in the order of dependency graph for test modules. 2. Pass module paths as extra class paths when they have dependency on each other. ^KT-64994
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
MODULE_FRAGMENT
|
||||
FILE fqName:<root> fileName:main.kt
|
||||
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test (): kotlin.Int declared in <root>'
|
||||
CALL 'public final fun bar (): kotlin.Int declared in p2' type=kotlin.Int origin=null
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// MODULE: lib
|
||||
// FILE: p3/foo.kt
|
||||
package p3;
|
||||
|
||||
fun foo() = 3
|
||||
// MODULE: lib2(lib)
|
||||
// FILE: p2/bar.kt
|
||||
package p2;
|
||||
|
||||
fun bar() = 4 + p3.foo()
|
||||
// MODULE: main(lib, lib2)
|
||||
// MODULE_KIND: Source
|
||||
// FILE: main.kt
|
||||
import p2.bar
|
||||
|
||||
fun test() = bar()
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
public final class MainKt {
|
||||
// source: 'main.kt'
|
||||
public final static method test(): int
|
||||
}
|
||||
Reference in New Issue
Block a user