diff options
| author | Chick Markley | 2017-02-01 20:43:21 -0800 |
|---|---|---|
| committer | GitHub | 2017-02-01 20:43:21 -0800 |
| commit | 32af1d4fafc64ddb669b313e627b2e3a308dc1ab (patch) | |
| tree | 8a9f512a4657337ad233ff90935a94f5c90670ed /src/test | |
| parent | a017bf38f72e1d7dd1bd59e7cd7beb77a50e4259 (diff) | |
Fix anno in backend (#428)
* fixed up impementation of deleteDirectoryHierarchy
Added a few more tests
* Round 2 of moving verilog to target dir
Only create .f file if some files have been moved
Some small style fixes in Driver
Restored lost functionality to add -f argument in verilogToCpp
Fixed loadAnnotations to add targetDir regardless of annotations arriving from file or through options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/scala/firrtlTests/DriverSpec.scala | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/test/scala/firrtlTests/DriverSpec.scala b/src/test/scala/firrtlTests/DriverSpec.scala index 5bed2a2b..4e1add39 100644 --- a/src/test/scala/firrtlTests/DriverSpec.scala +++ b/src/test/scala/firrtlTests/DriverSpec.scala @@ -49,7 +49,7 @@ class DriverSpec extends FreeSpec with Matchers with BackendCompilationUtilities optionsManager.makeTargetDir() should be (true) dir = new java.io.File("a/b/c") dir.exists() should be (true) - FileUtils.deleteDirectoryHierarchy(commonOptions.targetDirName) + FileUtils.deleteDirectoryHierarchy("a") should be (true) } } } @@ -173,4 +173,17 @@ class DriverSpec extends FreeSpec with Matchers with BackendCompilationUtilities } } } + + "Directory deleter is handy for cleaning up after tests" - { + "for example making a directory tree, and deleting it looks like" in { + FileUtils.makeDirectory("dog/fox/wolf") + val dir = new File("dog/fox/wolf") + dir.exists() should be (true) + dir.isDirectory should be (true) + + FileUtils.deleteDirectoryHierarchy("wolf") should be (false) + FileUtils.deleteDirectoryHierarchy("dog") should be (true) + dir.exists() should be (false) + } + } } |
