Execute cliargs script before running tests
This commit is contained in:
parent
7aa0319d4d
commit
aa6d6a70b0
6 changed files with 31 additions and 21 deletions
|
@ -104,4 +104,13 @@ public class CheckstyleOperationBuild extends Project {
|
|||
.ruleSets("config/pmd.xml")
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void test() throws Exception {
|
||||
new ExecOperation()
|
||||
.fromProject(this)
|
||||
.command("scripts/cliargs.sh")
|
||||
.execute();
|
||||
super.test();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,11 +46,11 @@ class CheckstyleOperationTest {
|
|||
|
||||
@Test
|
||||
void checkAllParameters() throws IOException {
|
||||
var params = Files.readAllLines(Paths.get("src", "test", "resources", "checkstyle-args.txt"));
|
||||
var args = Files.readAllLines(Paths.get("src", "test", "resources", "checkstyle-args.txt"));
|
||||
|
||||
assertThat(params).isNotEmpty();
|
||||
assertThat(args).isNotEmpty();
|
||||
|
||||
var args = new CheckstyleOperation()
|
||||
var params = new CheckstyleOperation()
|
||||
.fromProject(new Project())
|
||||
.branchMatchingXpath("xpath")
|
||||
.configurationFile("config")
|
||||
|
@ -70,9 +70,9 @@ class CheckstyleOperationTest {
|
|||
.treeWithJavadoc(true)
|
||||
.executeConstructProcessCommandList();
|
||||
|
||||
for (var p : params) {
|
||||
for (var p : args) {
|
||||
var found = false;
|
||||
for (var a : args) {
|
||||
for (var a : params) {
|
||||
if (a.startsWith(p)) {
|
||||
found = true;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue