diff options
author | Josh Suereth <joshua.suereth@gmail.com> | 2012-06-13 19:55:57 -0400 |
---|---|---|
committer | Josh Suereth <joshua.suereth@gmail.com> | 2012-06-13 19:55:57 -0400 |
commit | 456799bf08d27e1572a479c6b8d09a7d2d2445a0 (patch) | |
tree | 17772f4598750b52639085aeb6f2ceb500af0833 /project/Testing.scala | |
parent | ed1b1b1d4544d4c2dba088e923c362151dd9eed2 (diff) | |
download | scala-456799bf08d27e1572a479c6b8d09a7d2d2445a0.tar.gz scala-456799bf08d27e1572a479c6b8d09a7d2d2445a0.tar.bz2 scala-456799bf08d27e1572a479c6b8d09a7d2d2445a0.zip |
Refactoring and temporary commit before finishing the fix.
Diffstat (limited to 'project/Testing.scala')
-rw-r--r-- | project/Testing.scala | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/project/Testing.scala b/project/Testing.scala new file mode 100644 index 0000000000..61676c81bd --- /dev/null +++ b/project/Testing.scala @@ -0,0 +1,44 @@ +import sbt._ +import Keys._ +import partest._ +import SameTest._ +import ScalaBuildKeys._ + +/** All settings/projects relating to testing. */ +trait Testing { self: ScalaBuild.type => + + /* lazy val scalacheckSettings: Seq[Setting[_]] = Seq(fullQuickScalaReference, crossPaths := false)*/ + lazy val scalacheck = uri("git://github.com/jsuereth/scalacheck.git#scala-build") + + lazy val testsuiteSettings: Seq[Setting[_]] = compilerDependentProjectSettings ++ partestTaskSettings ++ VerifyClassLoad.settings ++ Seq( + unmanagedBase <<= baseDirectory / "test/files/lib", + fullClasspath in VerifyClassLoad.checkClassLoad <<= (fullClasspath in scalaLibrary in Runtime).identity, + autoScalaLibrary := false, + checkSameLibrary <<= checkSameBinaryProjects(quickLib, strappLib), + checkSameCompiler <<= checkSameBinaryProjects(quickComp, strappComp), + checkSame <<= (checkSameLibrary, checkSameCompiler) map ((a,b) => ()), + autoScalaLibrary := false + ) + lazy val continuationsTestsuiteSettings: Seq[Setting[_]] = testsuiteSettings ++ Seq( + scalacOptions in Test <++= (exportedProducts in Compile in continuationsPlugin) map { + case Seq(cpDir) => Seq("-Xplugin-require:continuations", "-P:continuations:enable", "-Xplugin:"+cpDir.data.getAbsolutePath) + }, + partestDirs <<= baseDirectory apply { bd => + def mkFile(name: String) = bd / "test" / "files" / name + def mkTestType(name: String) = name.drop("continuations-".length).toString + Seq("continuations-neg", "continuations-run") map (t => mkTestType(t) -> mkFile(t)) toMap + } + ) + val testsuite = ( + Project("testsuite", file(".")) + settings (testsuiteSettings:_*) + dependsOn (scalaLibrary, scalaCompiler, fjbg, partest, scalacheck) + ) + val continuationsTestsuite = ( + Project("continuations-testsuite", file(".")) + settings (continuationsTestsuiteSettings:_*) + dependsOn (partest, scalaLibrary, scalaCompiler, fjbg) + ) + +} + |