diff options
| author | Jim Lawson | 2017-02-01 10:28:43 -0800 |
|---|---|---|
| committer | Jack Koenig | 2017-02-01 10:28:43 -0800 |
| commit | 24ad38ab28b888e73217a5532cac2f0d2b9a4bc2 (patch) | |
| tree | 12cc4edcd6a4cac3198ce4c6b2fa0fbe4c69f1bf /src/test/scala | |
| parent | cd9eca6bc1d56e4b94955e1ce9e038b1a966a30b (diff) | |
Move backend compilation utilities (#400)
* Move copyResourceToFile() to BackendCompilationUtilities.
* Move BackendCompilationUtilities into a firrtl util package.
Some of this could be moved into a more general tools package, but since chisel3 already has a dependency on firrtl ...
* Push util down into firrtl so as not to conflict with scala.util.
* Use new createTestDirectory. Fixes #452.
Diffstat (limited to 'src/test/scala')
| -rw-r--r-- | src/test/scala/chiselTests/Harness.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/scala/chiselTests/Harness.scala b/src/test/scala/chiselTests/Harness.scala index 8a12cd7b..1da3d166 100644 --- a/src/test/scala/chiselTests/Harness.scala +++ b/src/test/scala/chiselTests/Harness.scala @@ -6,9 +6,10 @@ import chisel3.testers.BasicTester import org.scalatest._ import org.scalatest.prop._ import java.io.File +import firrtl.util.BackendCompilationUtilities class HarnessSpec extends ChiselPropSpec - with chisel3.BackendCompilationUtilities { + with BackendCompilationUtilities { def makeTrivialVerilog: (File => File) = makeHarness((prefix: String) => s""" module ${prefix}; @@ -55,13 +56,13 @@ void vl_finish(const char* filename, int linenum, const char* hier) { */ def simpleHarnessBackend(make: File => File): (File, String) = { val target = "test" - val path = createTempDirectory(target) + val path = createTestDirectory(target) val fname = new File(path, target) val cppHarness = makeCppHarness(fname) make(fname) - verilogToCpp(target, target, path, Seq(), cppHarness).! + verilogToCpp(target, path, Seq(), cppHarness).! cppToExe(target, path).! (path, target) } |
