1
0

Filter out duplicate test suites

I botched the refactoring in 5934c7b4b9
This commit is contained in:
Andrew Waterman 2017-04-22 22:12:26 -07:00 committed by Andrew Waterman
parent f2d4cb8152
commit 845e6f7458

View File

@ -4,7 +4,7 @@
package rocketchip package rocketchip
import Chisel._ import Chisel._
import scala.collection.mutable.{LinkedHashSet, ArrayBuffer} import scala.collection.mutable.LinkedHashSet
abstract class RocketTestSuite { abstract class RocketTestSuite {
val dir: String val dir: String
@ -56,9 +56,9 @@ class RegressionTestSuite(val names: LinkedHashSet[String]) extends RocketTestSu
} }
object TestGeneration { object TestGeneration {
private val suites = ArrayBuffer[RocketTestSuite]() private val suites = collection.mutable.ListMap[String, RocketTestSuite]()
def addSuite(s: RocketTestSuite) { suites += s } def addSuite(s: RocketTestSuite) { suites += (s.makeTargetName -> s) }
def addSuites(s: Seq[RocketTestSuite]) { s.foreach(addSuite) } def addSuites(s: Seq[RocketTestSuite]) { s.foreach(addSuite) }
@ -93,7 +93,7 @@ run-$kind-tests-fast: $$(addprefix $$(output_dir)/, $$(addsuffix .run, $targets)
} else { "\n" } } else { "\n" }
} }
suites.groupBy(_.kind).map { case (kind, s) => gen(kind, s) }.mkString("\n") suites.values.toSeq.groupBy(_.kind).map { case (kind, s) => gen(kind, s) }.mkString("\n")
} }
} }