Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions allClassTestsInOneFile.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ import java.nio.channels.Channels
import scala.annotation.tailrec
import scala.math.pow

/*
def scalaVersion = {
val scalaHome = {
val home = scala.util.Properties.scalaHome
println("Scala Home: " + home)
home
}

val scalaVersion = {
val rawVersion = scala.util.Properties.scalaPropOrElse("version.number", "unknown")
if (rawVersion.endsWith(".final"))
rawVersion.substring(0, rawVersion.length - 6)
else
rawVersion
println("Detected Scala version: " + rawVersion)
val versionParts = rawVersion.split("\\.")
versionParts(0).toInt + "." + versionParts(1).toInt
}
*/
def scalaVersion = "2.10"
val scalaTestVersion = "2.0"
val specs2Version = "2.3.4"
val scalazVersion = "7.0.4"
val scalaTestVersion = "2.1.6"
val specs2Version = "2.3.11"
val scalazVersion = "7.0.6"

def downloadFile(urlString: String, targetFile: File) {
println("Downloading " + urlString)
Expand Down Expand Up @@ -149,7 +151,7 @@ class ExampleSpec extends SpecificationClass { def is =""" + "\n" +

def compile(srcFile: String, classpath: String, targetDir: String) = {
import scala.collection.JavaConversions._
val command = List("scalac", "-classpath", classpath, "-d", targetDir, srcFile)
val command = List(scalaHome + "/bin/scalac", "-classpath", classpath, "-d", targetDir, srcFile)
val builder = new ProcessBuilder(command)
builder.redirectErrorStream(true)
val start = System.currentTimeMillis
Expand Down Expand Up @@ -241,7 +243,7 @@ if (scalaVersion != "unknown") {
if (!specs2ScalazJar.exists)
downloadFile("https://oss.sonatype.org/content/repositories/releases/org/scalaz/scalaz-core_" + scalaVersion + "/" + scalazVersion + "/scalaz-core_" + scalaVersion + "-" + scalazVersion + ".jar", specs2ScalazJar)

val baseDir = new File("allClassTestsInOneFile")
val baseDir = new File("target/" + scalaVersion + "/allClassTestsInOneFile")
if (baseDir.exists)
deleteDir(baseDir)

Expand Down
31 changes: 17 additions & 14 deletions allMethodTestsInOneFile.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@ import java.nio.channels.Channels
import scala.annotation.tailrec
import scala.math.pow

/*def scalaVersion = {
val rawVersion = scala.util.Properties.scalaPropOrElse("version.number", "unknown")
if (rawVersion.endsWith(".final"))
rawVersion.substring(0, rawVersion.length - 6)
else
rawVersion
}*/
val scalaHome = {
val home = scala.util.Properties.scalaHome
println("Scala Home: " + home)
home
}

def scalaVersion = "2.10"
val scalaTestVersion = "2.0"
val scalaVersion = {
val rawVersion = scala.util.Properties.scalaPropOrElse("version.number", "unknown")
println("Detected Scala version: " + rawVersion)
val versionParts = rawVersion.split("\\.")
versionParts(0).toInt + "." + versionParts(1).toInt
}
val scalaTestVersion = "2.1.6"
val junitVersion = "4.11" // JUnit depends on hamcrestVersion
val hamcrestVersion = "1.3"
val testngVersion = "6.8"
val specs2Version = "2.3.4"
val scalazVersion = "7.0.4"
val testngVersion = "6.8.8"
val specs2Version = "2.3.11"
val scalazVersion = "7.0.6"

def downloadFile(urlString: String, targetFile: File) {
println("Downloading " + urlString)
Expand Down Expand Up @@ -89,7 +92,7 @@ def specs2MutableTestDefFun(x: Int): String = "\"increment " + x + "\" in"
def compile(srcFile: String, classpath: String, targetDir: String) = {
import scala.collection.JavaConversions._

val command = List("scalac", "-classpath", classpath, "-d", targetDir, srcFile)
val command = List(scalaHome + "/bin/scalac", "-classpath", classpath, "-d", targetDir, srcFile)
val builder = new ProcessBuilder(command)
builder.redirectErrorStream(true)
val start = System.currentTimeMillis
Expand Down Expand Up @@ -174,7 +177,7 @@ if (scalaVersion != "unknown") {
if (!testngJar.exists)
downloadFile("http://repo1.maven.org/maven2/org/testng/testng/" + testngVersion + "/testng-" + testngVersion + ".jar", testngJar)

val baseDir = new File("allMethodTestsInOneFile")
val baseDir = new File("target/" + scalaVersion + "/allMethodTestsInOneFile")
if (baseDir.exists)
deleteDir(baseDir)

Expand Down
28 changes: 15 additions & 13 deletions allTestsInOneFile.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ import java.nio.channels.Channels
import scala.annotation.tailrec
import scala.math.pow

/*
def scalaVersion = {
val scalaHome = {
val home = scala.util.Properties.scalaHome
println("Scala Home: " + home)
home
}

val scalaVersion = {
val rawVersion = scala.util.Properties.scalaPropOrElse("version.number", "unknown")
if (rawVersion.endsWith(".final"))
rawVersion.substring(0, rawVersion.length - 6)
else
rawVersion
println("Detected Scala version: " + rawVersion)
val versionParts = rawVersion.split("\\.")
versionParts(0).toInt + "." + versionParts(1).toInt
}
*/
def scalaVersion = "2.10"
val scalaTestVersion = "2.0"
val specs2Version = "2.3.4"
val scalazVersion = "7.0.4"
val scalaTestVersion = "2.1.6"
val specs2Version = "2.3.11"
val scalazVersion = "7.0.6"

def downloadFile(urlString: String, targetFile: File) {
println("Downloading " + urlString)
Expand Down Expand Up @@ -150,7 +152,7 @@ class ExampleSpec extends Specification { def is =""" + "\n" +
def compile(srcFile: String, classpath: String, targetDir: String) = {
import scala.collection.JavaConversions._

val command = List("scalac", "-classpath", classpath, "-d", targetDir, srcFile)
val command = List(scalaHome + "/bin/scalac", "-classpath", classpath, "-d", targetDir, srcFile)
val builder = new ProcessBuilder(command)
builder.redirectErrorStream(true)
val start = System.currentTimeMillis
Expand Down Expand Up @@ -221,7 +223,7 @@ if (scalaVersion != "unknown") {
if (!specs2ScalazJar.exists)
downloadFile("https://oss.sonatype.org/content/repositories/releases/org/scalaz/scalaz-core_" + scalaVersion + "/" + scalazVersion + "/scalaz-core_" + scalaVersion + "-" + scalazVersion + ".jar", specs2ScalazJar)

val baseDir = new File("allTestsInOneFile")
val baseDir = new File("target/" + scalaVersion + "/allTestsInOneFile")
if (baseDir.exists)
deleteDir(baseDir)

Expand Down
Loading