Skip to content

Commit a21e941

Browse files
committed
Update integration test to build master branch
master branch is now pmd7. And pmd/7.0.x might be removed at some point and is not current anymore.
1 parent 4e9d480 commit a21e941

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

test/integration_test_pmd_report_builder.rb

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,21 @@ def setup
1010
`rake clean`
1111
end
1212

13-
def test_build
13+
# Tests whether we can build successfully PMD from the sources of the master branch.
14+
# The master branch should always be buildable by the regression tester. For older
15+
# versions, we can rely on baselines.
16+
#
17+
# Note 1: Although a base branch is configured here, this is not used. Only the patch
18+
# branch is built.
19+
# Note 2: We use a limited set of projects and rules, to make the test faster.
20+
def test_build_master_branch
1421
argv = ['-r', 'target/repositories/pmd',
15-
'-b', 'master',
16-
'-p', 'origin/pmd/7.0.x',
22+
'-b', 'pmd_releases/6.55.0',
23+
'-p', 'master',
1724
'-c', 'test/resources/integration_test_pmd_report_builder/pmd7-config.xml',
1825
'-l', 'test/resources/integration_test_pmd_report_builder/project-test.xml',
1926
'--error-recovery',
20-
'--debug',
27+
# '--debug',
2128
'--threads', Etc.nprocessors.to_s]
2229

2330
options = PmdTester::Options.new(argv)
@@ -27,6 +34,6 @@ def test_build
2734
builder.build
2835

2936
assert_equal(0, $CHILD_STATUS.exitstatus)
30-
assert_path_exist('target/reports/origin_pmd_7.0.x/checkstyle/pmd_report.xml')
37+
assert_path_exist('target/reports/master/checkstyle/pmd_report.xml')
3138
end
3239
end

test/manual_integration_tests.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def checkout_pmd_branch(branch = 'master')
231231
system('git config user.email "[email protected]"')
232232
system('git config user.name "PMD CI (pmd-bot)"')
233233
# remove any already existing binary to force a rebuild
234-
FileUtils.rm Dir.glob('pmd-dist/target/pmd-bin-*.zip')
234+
FileUtils.rm Dir.glob('pmd-dist/target/pmd-*.zip')
235235
end
236236
end
237237

0 commit comments

Comments
 (0)