Remote test execution for cross compiled tests. Run it like:
$ ./gradlew backend.native:tests:run \
-Premote=user@111.22.33.444 -Ptest_target=raspberrypi
The new gradle command line options:
-Pbuild_flags renamed -Pkonanc_flags.
-Ptest_flags provides compiler flags to the test builds.
-Ptest_target properly sets up compiler as well as interop
to cross compile tests.
-Premote specifies remote host and login.
This commit is contained in:
committed by
alexander-gorshenev
parent
826b3fc3f2
commit
334d2f0ee6
@@ -204,7 +204,7 @@ targetList.each { target ->
|
||||
project(':runtime').file('src/main/kotlin'),
|
||||
project(':Interop:Runtime').file('src/main/kotlin'),
|
||||
project(':Interop:Runtime').file('src/native/kotlin'),
|
||||
*project.globalArgs)
|
||||
*project.globalBuildArgs)
|
||||
|
||||
inputs.dir(project(':runtime').file('src/main/kotlin'))
|
||||
inputs.dir(project(':Interop:Runtime').file('src/main/kotlin'))
|
||||
@@ -230,7 +230,7 @@ targetList.each { target ->
|
||||
'-runtime', project(':runtime').file("build/${target}/runtime.bc"),
|
||||
'-properties', project(':backend.native').file('konan.properties'),
|
||||
project(':runtime').file('src/launcher/kotlin'),
|
||||
*project.globalArgs)
|
||||
*project.globalBuildArgs)
|
||||
|
||||
inputs.dir(project(':runtime').file('src/launcher/kotlin'))
|
||||
outputs.file(project(':runtime').file("build/${target}/start.kt.bc"))
|
||||
|
||||
@@ -65,8 +65,11 @@ targetSysRoot.linux-raspberrypi = target-sysroot-1-raspberrypi
|
||||
llvmHome.linux-raspberrypi = clang+llvm-3.9.0-linux-x86-64
|
||||
libGcc.linux-raspberrypi = target-sysroot-1-raspberrypi/lib/gcc/arm-linux-gnueabihf/4.8.3/
|
||||
gccToolChain.linux-raspberrypi = target-gcc-toolchain-3-linux-x86-64
|
||||
llvmLlcFlags.linux-raspberrypi = -mtriple=armv7-unknown-linux-gnueabihf --disable-fp-elim -mfloat-abi=hard
|
||||
llvmLtoFlags.linux-raspberrypi = -O3 -function-sections -exported-symbol=Konan_main
|
||||
llvmLlcFlags.linux-raspberrypi = -mtriple=armv7-unknown-linux-gnueabihf --disable-fp-elim -float-abi=hard
|
||||
linkerKonanFlags.linux-raspberrypi = -Bstatic -lstdc++ -Bdynamic -ldl -lm -lc -lpthread -fuse-ld=gold
|
||||
entrySelector.linux-raspberrypi = --defsym main=Konan_main
|
||||
dependencies.raspberrypi = clang+llvm-3.9.0-linux-x86-64 \
|
||||
target-gcc-toolchain-3-linux-x86-64 \
|
||||
target-sysroot-1-raspberrypi
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ ext.testOutputRoot = rootProject.file("test.output").absolutePath
|
||||
ext.externalTestsDir = project.file("external")
|
||||
externalTestsDir.mkdirs()
|
||||
|
||||
project.convention.plugins.remoteExec = new org.jetbrains.kotlin.ExecRemote(project)
|
||||
|
||||
allprojects {
|
||||
// Root directories for test output (logs, compiled files, statistics etc). Only single path must be in each set.
|
||||
sourceSets {
|
||||
@@ -1604,6 +1606,12 @@ task interop2(type: RunInteropKonanTest) {
|
||||
}
|
||||
|
||||
task interop3(type: RunInteropKonanTest) {
|
||||
// We disable this test on Raspberry Pi because
|
||||
// qsort accepts size_t args. So the .kt file
|
||||
// should be different depending on the bitness of the target.
|
||||
// There are plans to provide a solution and turn this
|
||||
// test back on.
|
||||
disabled = (project.testTarget == 'raspberrypi')
|
||||
goldValue = "8 9 12 13 14 \n"
|
||||
source = "interop/basics/3.kt"
|
||||
interop = 'cstdlib'
|
||||
|
||||
@@ -26,4 +26,4 @@ private fun comparator(a: COpaquePointer?, b: COpaquePointer?): Int {
|
||||
val bValue = b!!.reinterpret<CInt32Var>().pointed.value
|
||||
|
||||
return (aValue - bValue)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user