File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,19 @@ class TestPmdReportBuilder < Test::Unit::TestCase
77 def setup
88 # pmd version that is simulated in tests when pmd should be built
99 @pmd_version = '6.10.0-SNAPSHOT'
10+ end
1011
12+ def teardown
13+ pmd_repo = 'target/repositories/pmd'
1114 # pre-built PMD binary
12- pmd_binary = "target/repositories/pmd/pmd-dist/target/pmd-bin-#{ @pmd_version } .zip"
13-
15+ pmd_binary = "#{ pmd_repo } /pmd-dist/target/pmd-bin-#{ @pmd_version } .zip"
1416 File . unlink pmd_binary if File . exist? pmd_binary
17+
18+ # only deleting empty directories in order to leave pmd_repo intact
19+ # for local dev environment, where a local pmd clone might already exist
20+ [ "#{ pmd_repo } /pmd-dist/target" , "#{ pmd_repo } /pmd-dist" , pmd_repo ] . each do |d |
21+ Dir . unlink ( d ) if Dir . exist? ( d ) && Dir . empty? ( d )
22+ end
1523 end
1624
1725 def test_build_skip
You can’t perform that action at this time.
0 commit comments