Skip to content

Commit

Permalink
[ test ] docker in Unix-like
Browse files Browse the repository at this point in the history
  • Loading branch information
zxj5470 committed Feb 21, 2018
1 parent df9a650 commit 602e0fa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/org/ice1000/julia/lang/execution/julia-execution-test.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.intellij.openapi.util.SystemInfo
import com.intellij.openapi.util.io.FileUtilRt
import org.ice1000.julia.lang.shouldBe
import org.junit.Test
import java.io.File
import java.util.concurrent.TimeUnit

fun main(args: Array<String>) {
Expand Down Expand Up @@ -56,6 +57,20 @@ class JuliaExecutionTest {
println("----error----")
println(process.errorStream.reader().readText())
}

@Test
fun testUnixDocker(){
val pwd= File(".").absolutePath
val juliaFile = "ParseFunctions.jl"
val containerName="julia"
val exeName="julia"
val params = ""
val cmd = "docker run --rm -v $pwd/testData:$pwd/testData -w $pwd/testData $containerName $exeName $juliaFile $params"
val process = Runtime.getRuntime().exec(cmd)
println(process.inputStream.reader().readText())
System.err.println(process.errorStream.reader().readText())
}

}

/**
Expand Down

0 comments on commit 602e0fa

Please sign in to comment.