Skip to content
Snippets Groups Projects
Commit f75c629d authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

Run tests in parallel when asked only (-Dparallel=123)

parent eee70efd
No related branches found
No related tags found
No related merge requests found
commands = [
"sbt -batch test"
"sbt -batch integration:test"
"sbt -batch regression:test"
"sbt -batch genc:test"
"sbt -batch -Dparallel=10 test"
"sbt -batch -Dparallel=10 integration:test"
"sbt -batch -Dparallel=10 regression:test"
"sbt -batch -Dparallel=10 genc:test"
]
trusted = [
......
......@@ -56,6 +56,20 @@ clean := {
}
}
lazy val nParallel = {
val p = System.getProperty("parallel")
if (p ne null) {
try {
p.toInt
} catch {
case nfe: NumberFormatException =>
1
}
} else {
1
}
}
lazy val script = taskKey[Unit]("Generate the leon Bash script")
script := {
......@@ -107,14 +121,17 @@ sourcesInBase in Compile := false
Keys.fork in run := true
lazy val testSettings = Seq(
//Keys.fork := true,
logBuffered := true,
parallelExecution := true
logBuffered := (nParallel > 1),
parallelExecution := (nParallel > 1)
//testForkedParallel := true,
//javaOptions ++= Seq("-Xss64M", "-Xmx4G")
)
concurrentRestrictions in Global += Tags.limit(Tags.Test, nParallel)
// Unit Tests
testOptions in Test := Seq(Tests.Argument("-oDF"), Tests.Filter(_ startsWith "leon.unit."))
......@@ -138,7 +155,6 @@ lazy val IsabelleTest = config("isabelle") extend(Test)
testOptions in IsabelleTest := Seq(Tests.Argument("-oDF"), Tests.Filter(_ startsWith "leon.isabelle."))
parallelExecution in IsabelleTest := false
fork in IsabelleTest := true
// GenC Tests
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment