diff options
| author | albertchen-sifive | 2018-10-01 17:23:34 -0700 |
|---|---|---|
| committer | Jack Koenig | 2018-10-01 17:23:34 -0700 |
| commit | 16f3dbda5c3868419cf78d4d83133cd34adf3303 (patch) | |
| tree | ff5e28f2b455599a7ebff607c57e3f9fccf406de /src/test | |
| parent | 29e5c0881291b2ab225eb1617592213de611a4a5 (diff) | |
add BlackBoxPathAnno (#903)
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala b/src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala index 455ceb3f..7daebf21 100644 --- a/src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala +++ b/src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala @@ -49,6 +49,45 @@ class BlacklBoxSourceHelperTransformSpec extends LowTransformSpec { | a1.foo <= x """.stripMargin + "annotated external modules with absolute path" should "appear in output directory" in { + + val absPath = new java.io.File("src/test/resources/blackboxes/AdderExtModule.v").getCanonicalPath + val annos = Seq( + BlackBoxTargetDirAnno("test_run_dir"), + BlackBoxPathAnno(moduleName, absPath) + ) + + execute(input, output, annos) + + val module = new java.io.File("test_run_dir/AdderExtModule.v") + val fileList = new java.io.File(s"test_run_dir/${BlackBoxSourceHelper.fileListName}") + + module.exists should be (true) + fileList.exists should be (true) + + module.delete() + fileList.delete() + } + + "annotated external modules with relative path" should "appear in output directory" in { + + val annos = Seq( + BlackBoxTargetDirAnno("test_run_dir"), + BlackBoxPathAnno(moduleName, "src/test/resources/blackboxes/AdderExtModule.v") + ) + + execute(input, output, annos) + + val module = new java.io.File("test_run_dir/AdderExtModule.v") + val fileList = new java.io.File(s"test_run_dir/${BlackBoxSourceHelper.fileListName}") + + module.exists should be (true) + fileList.exists should be (true) + + module.delete() + fileList.delete() + } + "annotated external modules" should "appear in output directory" in { val annos = Seq( |
