KT-1529: Failing module compilation doesn't fail Maven build - test added.
This commit is contained in:
+20
-1
@@ -61,6 +61,7 @@
|
|||||||
<antcall target = "zip"/>
|
<antcall target = "zip"/>
|
||||||
<verify-exists file="${output}/${output.name}.zip" type="file"/>
|
<verify-exists file="${output}/${output.name}.zip" type="file"/>
|
||||||
|
|
||||||
|
<!-- Sometimes deleting "dist/kotlinc/lib/alt/kotlin-jdk-headers.jar" fails -->
|
||||||
<delete dir = "${kotlin-home}" failonerror="false"/>
|
<delete dir = "${kotlin-home}" failonerror="false"/>
|
||||||
<mkdir dir = "${kotlin-home}"/>
|
<mkdir dir = "${kotlin-home}"/>
|
||||||
<unzip src = "${output}/${output.name}.zip" dest="${output}"/>
|
<unzip src = "${output}/${output.name}.zip" dest="${output}"/>
|
||||||
@@ -309,7 +310,7 @@
|
|||||||
<then>
|
<then>
|
||||||
<!-- Batch tests -->
|
<!-- Batch tests -->
|
||||||
<if>
|
<if>
|
||||||
<matches string="@{classpath}" pattern="\.jar$"/>
|
<matches string="@{classpath}" pattern="/.jar$"/>
|
||||||
<then>
|
<then>
|
||||||
<!-- Batch tests from a jar -->
|
<!-- Batch tests from a jar -->
|
||||||
<echo>Running JUnit: classpath = "@{classpath}" (Jar)</echo>
|
<echo>Running JUnit: classpath = "@{classpath}" (Jar)</echo>
|
||||||
@@ -434,6 +435,24 @@
|
|||||||
<fail message="kotlinc-jar: compilation should have failed!"/>
|
<fail message="kotlinc-jar: compilation should have failed!"/>
|
||||||
</then>
|
</then>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<var name="failed" value="false"/>
|
||||||
|
<trycatch property="error-message" reference="bar">
|
||||||
|
<try>
|
||||||
|
<!-- Should fail -->
|
||||||
|
<kotlinc-jar module = "${basedir}/build-tools/test/compilation-fail/Smoke.kts"/>
|
||||||
|
</try>
|
||||||
|
<catch>
|
||||||
|
<var name="failed" value="true"/>
|
||||||
|
<echo>"ERROR:" was expected here</echo>
|
||||||
|
</catch>
|
||||||
|
</trycatch>
|
||||||
|
<if>
|
||||||
|
<isfalse value="${failed}"/>
|
||||||
|
<then>
|
||||||
|
<fail message="kotlinc-jar: compilation should have failed!"/>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
import kotlin.modules.*
|
||||||
|
|
||||||
|
fun proj
|
||||||
Reference in New Issue
Block a user