JPS: Add tests for mpp complementary files tracking after build error (KT-27868)

This commit is contained in:
Sergey Rostov
2018-11-20 13:39:59 +03:00
parent 84d6c1df5a
commit cc9892a27d
18 changed files with 156 additions and 0 deletions
@@ -0,0 +1,7 @@
c [sourceSetHolder]
pJvm [compilationAndSourceSetHolder, jvm]
pJvm -> c [include]
pJs [compilationAndSourceSetHolder, js]
pJs -> c [include]
@@ -0,0 +1,2 @@
make compilation fail
fix error
@@ -0,0 +1,39 @@
================ Step #1 make compilation fail =================
Building c
Building pJs
Cleaning output files:
out/production/pJs/pJs.js
out/production/pJs/pJs.meta.js
out/production/pJs/pJs/root-package.kjsm
End of files
Compiling files:
c/src/a.kt
pJs/src/c.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
[pJs] Expecting a top level declaration
[pJs] Expecting a top level declaration
================ Step #2 fix error =================
Building c
Building pJs
Compiling files:
c/src/a.kt
pJs/src/c.kt
End of files
Exit code: OK
------------------------------------------
Building pJvm
Cleaning output files:
out/production/pJvm/META-INF/pJvm.kotlin_module
End of files
Compiling files:
c/src/a.kt
pJvm/src/c.kt
End of files
Exit code: OK
------------------------------------------
@@ -0,0 +1 @@
expect fun f()
@@ -0,0 +1,3 @@
:(
expect fun f()
@@ -0,0 +1 @@
expect fun f()
@@ -0,0 +1 @@
actual fun f() = Unit
@@ -0,0 +1 @@
actual fun f() = Unit
@@ -0,0 +1,7 @@
c [sourceSetHolder]
pJvm [compilationAndSourceSetHolder, jvm]
pJvm -> c [include]
pJs [compilationAndSourceSetHolder, js]
pJs -> c [include]
@@ -0,0 +1,2 @@
make compilation fail
fix error
@@ -0,0 +1,44 @@
================ Step #1 make compilation fail =================
Building c
Building pJs
Cleaning output files:
out/production/pJs/pJs.js
out/production/pJs/pJs.meta.js
out/production/pJs/pJs/root-package.kjsm
End of files
Compiling files:
c/src/a.kt
c/src/b.kt
pJs/src/c.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
[pJs] Expecting a top level declaration
[pJs] Expecting a top level declaration
================ Step #2 fix error =================
Building c
Building pJs
Compiling files:
c/src/a.kt
c/src/b.kt
pJs/src/c.kt
End of files
Exit code: OK
------------------------------------------
Marked as dirty by Kotlin:
c/src/b.kt
Building pJvm
Cleaning output files:
out/production/pJvm/META-INF/pJvm.kotlin_module
End of files
Compiling files:
c/src/a.kt
c/src/b.kt
pJvm/src/c.kt
End of files
Exit code: OK
------------------------------------------
@@ -0,0 +1 @@
expect fun f()
@@ -0,0 +1,3 @@
:(
expect fun f()
@@ -0,0 +1 @@
expect fun f()
@@ -0,0 +1 @@
expect fun g()
@@ -0,0 +1,3 @@
actual fun f() = Unit
actual fun g() = Unit
@@ -0,0 +1,3 @@
actual fun f() = Unit
actual fun g() = Unit