<commit_before>// run unit tests
import org.apache.commons.io.FileUtils

ant.project.setBaseDir(project.basedir)

// start from where the core left off, and build from there
ser=new File(project.basedir,"target/cobertura.ser");
FileUtils.copyFile(maven.resolveArtifact("${project.groupId}:hudson-core:${project.version}:cobertura:ser"),ser)

cob = new Cobertura(project,maven,ant,ser);

cob.instrument(["remoting","hudson-core"].collect{ m -> maven.resolveArtifact("${project.groupId}:${m}:${project.version}") })
cob.runTests()
cob.report()
cob.makeBuildFailIfTestFail();<commit_msg>instrumenting the remoting.jar causes the tests to fail, because they are used to start brand-new JVMs<commit_after>// run unit tests
import org.apache.commons.io.FileUtils

ant.project.setBaseDir(project.basedir)

// start from where the core left off, and build from there
ser=new File(project.basedir,"target/cobertura.ser");
FileUtils.copyFile(maven.resolveArtifact("${project.groupId}:hudson-core:${project.version}:cobertura:ser"),ser)

cob = new Cobertura(project,maven,ant,ser);

// instrumenting remote.jar causes all native m2 job to fail, because forked Maven doesn't have cobertura runtime
cob.instrument(["hudson-core"].collect{ m -> maven.resolveArtifact("${project.groupId}:${m}:${project.version}") })
cob.runTests()
cob.report()
cob.makeBuildFailIfTestFail();
{'fraction_non_alphanumeric': 0.15073529411764705, 'fraction_numerical': 0.0007352941176470588, 'mean_word_length': 7.0058823529411764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6524612', 'n_tokens_mistral': 452, 'n_tokens_neox': 438, 'n_words': 90}