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
2 changes: 1 addition & 1 deletion assertMacro.scala
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,4 @@ durationFile.close()
fileCountFile.flush()
fileCountFile.close()
fileSizeFile.flush()
fileSizeFile.close()
fileSizeFile.close()
28 changes: 15 additions & 13 deletions assertTestsInOneFile.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 @@ -76,7 +78,7 @@ def specTestDefFun(x: Int): String = "def `increment " + x + "`"
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 @@ -139,7 +141,7 @@ if (scalaVersion != "unknown") {
if (!scalatestJar.exists)
downloadFile("https://oss.sonatype.org/content/repositories/releases/org/scalatest/scalatest_" + scalaVersion + "/" + scalaTestVersion + "/scalatest_" + scalaVersion + "-" + scalaTestVersion + ".jar", scalatestJar)

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

Expand Down
38 changes: 23 additions & 15 deletions dataTables.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,27 @@ 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"
val shapelessVersion = "2.0.0"
val shapelessScalaVersion =
if (scalaVersion == "2.11")
scalaVersion
else
scala.util.Properties.scalaPropOrElse("version.number", "unknown")

def downloadFile(urlString: String, targetFile: File) {
println("Downloading " + urlString)
Expand Down Expand Up @@ -190,7 +198,7 @@ def generateSpecs2Mutable(testCount: Int, targetDir: File): File = {
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 @@ -279,11 +287,11 @@ 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 shapelessJar = new File("shapeless_2.10.2-2.0.0-SNAPSHOT.jar")
val shapelessJar = new File("shapeless_" + scalaVersion + "-" + shapelessVersion + ".jar")
if (!shapelessJar.exists)
downloadFile("http://oss.sonatype.org/content/repositories/snapshots/com/chuusai/shapeless_2.10.2/2.0.0-SNAPSHOT/shapeless_2.10.2-2.0.0-SNAPSHOT.jar", shapelessJar)
downloadFile("http://oss.sonatype.org/content/repositories/releases/com/chuusai/shapeless_" + shapelessScalaVersion + "/" + shapelessVersion + "/shapeless_" + shapelessScalaVersion + "-" + shapelessVersion + ".jar", shapelessJar)

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

Expand Down
Loading