Simple sanity check of cross compilation build and compiler execution.

This commit is contained in:
Alexander Gorshenev
2017-05-18 17:30:36 +03:00
committed by alexander-gorshenev
parent 7b2f3923a6
commit 2283a941b7
2 changed files with 20 additions and 0 deletions
+14
View File
@@ -1766,6 +1766,20 @@ task driver_opt(type: RunDriverKonanTest) {
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.
task inline_defaultArgs_linkTest(type: LinkKonanTest) {
goldValue = "122\n47\n"
@@ -262,6 +262,12 @@ class RunKonanTest extends KonanTest {
// from IDEA. Use the RunKonanTest instead.
@ParallelizableTask
class RunDriverKonanTest extends KonanTest {
RunDriverKonanTest() {
super()
dependsOn(project.rootProject.tasks['cross_dist'])
}
void compileTest(List<String> filesToCompile, String exe) {
runCompiler(filesToCompile, exe, flags?:[])
}