Simple sanity check of cross compilation build and compiler execution.
This commit is contained in:
committed by
alexander-gorshenev
parent
7b2f3923a6
commit
2283a941b7
@@ -1766,6 +1766,20 @@ task driver_opt(type: RunDriverKonanTest) {
|
|||||||
flags = ["-opt"]
|
flags = ["-opt"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check that cross-compilation completes successfully. We can't run such
|
||||||
|
// binaries, but we verify that the compiler has been built, operational
|
||||||
|
// and accepts the -target flag, resulting in a successful compilation.
|
||||||
|
task driver_cross(type: RunDriverKonanTest) {
|
||||||
|
goldValue = "Hello, world!\n"
|
||||||
|
source = "runtime/basic/hello0.kt"
|
||||||
|
run = false
|
||||||
|
if (isLinux()) {
|
||||||
|
flags = ["-target", "raspberrypi"]
|
||||||
|
} else if (isMac()) {
|
||||||
|
flags = ["-target", "iphone"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Enable when deserialization for default arguments is fixed.
|
// Enable when deserialization for default arguments is fixed.
|
||||||
task inline_defaultArgs_linkTest(type: LinkKonanTest) {
|
task inline_defaultArgs_linkTest(type: LinkKonanTest) {
|
||||||
goldValue = "122\n47\n"
|
goldValue = "122\n47\n"
|
||||||
|
|||||||
@@ -262,6 +262,12 @@ class RunKonanTest extends KonanTest {
|
|||||||
// from IDEA. Use the RunKonanTest instead.
|
// from IDEA. Use the RunKonanTest instead.
|
||||||
@ParallelizableTask
|
@ParallelizableTask
|
||||||
class RunDriverKonanTest extends KonanTest {
|
class RunDriverKonanTest extends KonanTest {
|
||||||
|
|
||||||
|
RunDriverKonanTest() {
|
||||||
|
super()
|
||||||
|
dependsOn(project.rootProject.tasks['cross_dist'])
|
||||||
|
}
|
||||||
|
|
||||||
void compileTest(List<String> filesToCompile, String exe) {
|
void compileTest(List<String> filesToCompile, String exe) {
|
||||||
runCompiler(filesToCompile, exe, flags?:[])
|
runCompiler(filesToCompile, exe, flags?:[])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user