Fix test BE JvmBoxRunner to be able to see FIR BB tests exceptions
This commit is contained in:
+8
-1
@@ -76,7 +76,14 @@ class JvmBoxRunner(testServices: TestServices) : JvmBinaryArtifactHandler(testSe
|
|||||||
callBoxMethodAndCheckResult(classLoader, clazz, method, unexpectedBehaviour)
|
callBoxMethodAndCheckResult(classLoader, clazz, method, unexpectedBehaviour)
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
if (reportProblems) {
|
if (reportProblems) {
|
||||||
println(factory.createText())
|
try {
|
||||||
|
println(factory.createText())
|
||||||
|
} catch (_: Throwable) {
|
||||||
|
// In FIR we have factory which can't print bytecode
|
||||||
|
// and it throws exception otherwise. So we need
|
||||||
|
// ignore that exception to report original one
|
||||||
|
// TODO: fix original problem
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw e
|
throw e
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
+9
-2
@@ -218,8 +218,15 @@ public class CodegenTestUtil {
|
|||||||
}
|
}
|
||||||
catch (Throwable e) {
|
catch (Throwable e) {
|
||||||
if (reportProblems) {
|
if (reportProblems) {
|
||||||
System.err.println(file.asText());
|
try {
|
||||||
System.err.println(classNode.name + "::" + method.name + method.desc);
|
System.err.println(file.asText());
|
||||||
|
System.err.println(classNode.name + "::" + method.name + method.desc);
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
// In FIR we have factory which can't print bytecode
|
||||||
|
// and it throws exception otherwise. So we need
|
||||||
|
// ignore that exception to report original one
|
||||||
|
// TODO: fix original problem
|
||||||
|
}
|
||||||
|
|
||||||
//noinspection InstanceofCatchParameter
|
//noinspection InstanceofCatchParameter
|
||||||
if (e instanceof AnalyzerException) {
|
if (e instanceof AnalyzerException) {
|
||||||
|
|||||||
Reference in New Issue
Block a user