Skip to content

Commit

Permalink
Execute cliargs script before running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ethauvin committed May 28, 2024
1 parent cd34bb1 commit 0156100
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 17 deletions.
16 changes: 0 additions & 16 deletions checkcliargs.sh

This file was deleted.

1 change: 1 addition & 0 deletions lib/bld/bld-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true
bld.extension-pmd=com.uwyn.rife2:bld-pmd:0.9.9
bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.0
bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.downloadLocation=
bld.sourceDirectories=
Expand Down
16 changes: 16 additions & 0 deletions scripts/checkcliargs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

main="org.testng.TestNG"
new=/tmp/checkcliargs-new
old=/tmp/checkcliargs-old

java -cp "lib/test/*" $main 2>/dev/null >$new
java -cp "examples/lib/test/*" $main 2>/dev/null >$old

if [ "$1" = "-v" ]; then
code --wait --diff $old $new
else
diff $old $new
fi

rm -rf $new $old
File renamed without changes.
11 changes: 10 additions & 1 deletion src/bld/java/rife/bld/extension/TestNgOperationBuild.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public TestNgOperationBuild() {
version = version(0, 9, 9, "SNAPSHOT");

javaRelease = 17;

downloadSources = true;
autoDownloadPurge = true;
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
Expand Down Expand Up @@ -101,4 +101,13 @@ public void pmd() {
.ruleSets("config/pmd.xml")
.execute();
}

@Override
public void test() throws Exception {
new ExecOperation()
.fromProject(this)
.command("scripts/cliargs.sh")
.execute();
super.test();
}
}

0 comments on commit 0156100

Please sign in to comment.