tests: Fix dependency downloading tests
This commit is contained in:
@@ -67,7 +67,7 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def testDependencies = project.file("${sourceSets.testOutputLocal.output.dirs.singleFile.absolutePath}/dependencies")
|
def testDependencies = rootProject.file('dist/dependencies')
|
||||||
|
|
||||||
void prepareDependenciesDir(File testDependencies) {
|
void prepareDependenciesDir(File testDependencies) {
|
||||||
project.delete testDependencies
|
project.delete testDependencies
|
||||||
@@ -105,6 +105,9 @@ task testInteropHelper(type: RunInteropKonanTest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
task testCompilerHelper(type: RunKonanTest) {
|
task testCompilerHelper(type: RunKonanTest) {
|
||||||
|
dependsOn jar
|
||||||
|
dependsOn ':dist'
|
||||||
|
|
||||||
dependenciesDir = testDependencies
|
dependenciesDir = testDependencies
|
||||||
source = "testData/main.kt"
|
source = "testData/main.kt"
|
||||||
|
|
||||||
@@ -123,6 +126,9 @@ task testCompilerHelper(type: RunKonanTest) {
|
|||||||
|
|
||||||
// Simple test for parallel compiler execution
|
// Simple test for parallel compiler execution
|
||||||
task testParallel(type: DefaultTask) {
|
task testParallel(type: DefaultTask) {
|
||||||
|
dependsOn jar
|
||||||
|
dependsOn ':dist'
|
||||||
|
|
||||||
for (int i=0; i<4; i++) {
|
for (int i=0; i<4; i++) {
|
||||||
task("runParallel$i", type: RunKonanTest) {
|
task("runParallel$i", type: RunKonanTest) {
|
||||||
dependenciesDir = testDependencies
|
dependenciesDir = testDependencies
|
||||||
@@ -163,9 +169,5 @@ task testHelpers {
|
|||||||
dependsOn testInteropHelper
|
dependsOn testInteropHelper
|
||||||
dependsOn testCompilerHelper
|
dependsOn testCompilerHelper
|
||||||
dependsOn testParallel
|
dependsOn testParallel
|
||||||
|
|
||||||
doLast {
|
|
||||||
delete testDependencies
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ fun main(args: Array<String>) {
|
|||||||
val statBuf = nativeHeap.alloc<statStruct>()
|
val statBuf = nativeHeap.alloc<statStruct>()
|
||||||
val res = stat("/", statBuf.ptr)
|
val res = stat("/", statBuf.ptr)
|
||||||
println(res)
|
println(res)
|
||||||
println(statBuf.st_uid.value)
|
println(statBuf.st_uid)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user