Execute cliargs script before running tests

This commit is contained in:
Erik C. Thauvin 2024-05-28 14:22:50 -07:00
parent cd34bb182c
commit 0156100013
Signed by: erik
GPG key ID: 776702A6A2DA330E
5 changed files with 27 additions and 17 deletions

View file

@ -1,16 +0,0 @@
#!/bin/bash
MAIN="org.testng.TestNG"
TMPNEW=/tmp/checkcliargs-new
TMPOLD=/tmp/checkcliargs-old
java -cp "lib/test/*" $MAIN >$TMPNEW
java -cp "examples/lib/test/*" $MAIN >$TMPOLD
if [ "$1" = "-v" ]; then
code --wait --diff $TMPOLD $TMPNEW
else
diff $TMPOLD $TMPNEW
fi
rm -rf $TMPNEW $TMPOLD

View file

@ -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=

16
scripts/checkcliargs.sh Executable file
View file

@ -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

View file

@ -37,7 +37,7 @@ public class TestNgOperationBuild extends Project {
version = version(0, 9, 9, "SNAPSHOT");
javaRelease = 17;
downloadSources = true;
autoDownloadPurge = true;
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
@ -101,4 +101,13 @@ public class TestNgOperationBuild extends Project {
.ruleSets("config/pmd.xml")
.execute();
}
@Override
public void test() throws Exception {
new ExecOperation()
.fromProject(this)
.command("scripts/cliargs.sh")
.execute();
super.test();
}
}