aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorJack Koenig2019-11-29 15:59:08 -0800
committerJack Koenig2020-01-07 19:35:50 -0800
commit3c8e22dc9e4f033be167aa721e6d8ad54330ca3c (patch)
treeda7e74c95ef762e67c4e7349632d941450acc537 /src/test
parentd5dd427c0267dc143d4297d5fd0716f19cd7634b (diff)
Redirect testing shell commands to logger
This includes the built-in functions in BackendCompilationUtilities which are a public API
Diffstat (limited to 'src/test')
-rw-r--r--src/test/scala/firrtlTests/DriverSpec.scala4
-rw-r--r--src/test/scala/firrtlTests/FirrtlSpec.scala11
-rw-r--r--src/test/scala/firrtlTests/IntegrationSpec.scala4
-rw-r--r--src/test/scala/firrtlTests/StringSpec.scala4
-rw-r--r--src/test/scala/firrtlTests/execution/VerilogExecution.scala4
5 files changed, 13 insertions, 14 deletions
diff --git a/src/test/scala/firrtlTests/DriverSpec.scala b/src/test/scala/firrtlTests/DriverSpec.scala
index b4f61dfd..88a39a01 100644
--- a/src/test/scala/firrtlTests/DriverSpec.scala
+++ b/src/test/scala/firrtlTests/DriverSpec.scala
@@ -498,8 +498,8 @@ class VcdSuppressionSpec extends FirrtlFlatSpec {
val harness = new File(testDir, s"top.cpp")
copyResourceToFile(cppHarnessResourceName, harness)
- verilogToCpp(prefix, testDir, Seq.empty, harness, suppress).!
- cppToExe(prefix, testDir).!
+ verilogToCpp(prefix, testDir, Seq.empty, harness, suppress) #&&
+ cppToExe(prefix, testDir) ! loggingProcessLogger
assert(executeExpectingSuccess(prefix, testDir))
diff --git a/src/test/scala/firrtlTests/FirrtlSpec.scala b/src/test/scala/firrtlTests/FirrtlSpec.scala
index 1ff5b72f..ee8dfe8e 100644
--- a/src/test/scala/firrtlTests/FirrtlSpec.scala
+++ b/src/test/scala/firrtlTests/FirrtlSpec.scala
@@ -7,18 +7,16 @@ import java.security.Permission
import logger.LazyLogging
-import scala.sys.process._
import org.scalatest._
import org.scalatest.prop._
import firrtl._
import firrtl.ir._
-import firrtl.Parser.{IgnoreInfo, UseInfo}
-import firrtl.analyses.{GetNamespace, InstanceGraph, ModuleNamespaceAnnotation}
+import firrtl.Parser.UseInfo
+import firrtl.analyses.{GetNamespace, ModuleNamespaceAnnotation}
import firrtl.annotations._
import firrtl.transforms.{DontTouchAnnotation, NoDedupAnnotation, RenameModules}
import firrtl.util.BackendCompilationUtilities
-import scala.collection.mutable
class CheckLowForm extends SeqTransform {
def inputForm = LowForm
@@ -146,8 +144,9 @@ trait FirrtlRunners extends BackendCompilationUtilities {
file
}
- verilogToCpp(prefix, testDir, verilogFiles, harness).!
- cppToExe(prefix, testDir).!
+ verilogToCpp(prefix, testDir, verilogFiles, harness) #&&
+ cppToExe(prefix, testDir) !
+ loggingProcessLogger
assert(executeExpectingSuccess(prefix, testDir))
}
}
diff --git a/src/test/scala/firrtlTests/IntegrationSpec.scala b/src/test/scala/firrtlTests/IntegrationSpec.scala
index b7fd0084..732cd501 100644
--- a/src/test/scala/firrtlTests/IntegrationSpec.scala
+++ b/src/test/scala/firrtlTests/IntegrationSpec.scala
@@ -42,8 +42,8 @@ class GCDSplitEmissionExecutionTest extends FirrtlFlatSpec {
copyResourceToFile(cppHarnessResourceName, harness)
// topFile will be compiled by Verilator command by default but we need to also include dutFile
- verilogToCpp(top, testDir, Seq(dutFile), harness).!
- cppToExe(top, testDir).!
+ verilogToCpp(top, testDir, Seq(dutFile), harness) #&&
+ cppToExe(top, testDir) ! loggingProcessLogger
assert(executeExpectingSuccess(top, testDir))
}
}
diff --git a/src/test/scala/firrtlTests/StringSpec.scala b/src/test/scala/firrtlTests/StringSpec.scala
index 208d9e6c..aaf2a584 100644
--- a/src/test/scala/firrtlTests/StringSpec.scala
+++ b/src/test/scala/firrtlTests/StringSpec.scala
@@ -23,8 +23,8 @@ class PrintfSpec extends FirrtlPropSpec {
val harness = new File(testDir, s"top.cpp")
copyResourceToFile(cppHarnessResourceName, harness)
- verilogToCpp(prefix, testDir, Seq(), harness).!
- cppToExe(prefix, testDir).!
+ verilogToCpp(prefix, testDir, Seq(), harness) #&&
+ cppToExe(prefix, testDir) ! loggingProcessLogger
// Check for correct Printf:
// Count up from 0, match decimal, hex, and binary
diff --git a/src/test/scala/firrtlTests/execution/VerilogExecution.scala b/src/test/scala/firrtlTests/execution/VerilogExecution.scala
index 17eecc65..060554c0 100644
--- a/src/test/scala/firrtlTests/execution/VerilogExecution.scala
+++ b/src/test/scala/firrtlTests/execution/VerilogExecution.scala
@@ -25,8 +25,8 @@ trait VerilogExecution extends TestExecution {
copyResourceToFile(cppHarnessResourceName, harness)
// Make and run Verilog simulation
- verilogToCpp(c.main, testDir, Nil, harness).!
- cppToExe(c.main, testDir).!
+ verilogToCpp(c.main, testDir, Nil, harness) #&&
+ cppToExe(c.main, testDir) ! loggingProcessLogger
assert(executeExpectingSuccess(c.main, testDir))
}
}