junit-6-migration: keep downloaded jars across mvn clean, add jar contents output

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YPgGH6aMbSLANL3E2HHmS6
This commit is contained in:
2026-10-25 18:48:33 +00:00
co-authored by Claude Sonnet 5.5
parent 820318be7d
commit 08e063d22e
8 changed files with 49 additions and 129 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Looks inside the downloaded jars (run scripts/api_diff.py first). Writes output/07-jar-contents.txt.
set -euo pipefail
cd "$(dirname "$0")/.."
J=target/jars
{
for v in 5.14.4 6.1.3; do
echo "junit-jupiter-params-$v: bundled CSV parser packages (org/junit/jupiter/params/shadow/...)"
unzip -l "$J/junit-jupiter-params-$v.jar" | awk '{print $4}' | grep -o 'org/junit/jupiter/params/shadow/[a-z]*/[a-z]*' | sort | uniq -c | sed 's/^ */ /'
done
echo
echo "junit-vintage-engine-6.1.3 manifest, package export status:"
unzip -p "$J/junit-vintage-engine-6.1.3.jar" META-INF/MANIFEST.MF | tr -d '\r' | sed ':a;N;$!ba;s/\n //g' | grep -o 'Export-Package: org.junit.vintage.engine;[^,]*' | sed 's/;uses:=.*//; s/^Export-Package: //'
echo "junit-vintage-engine-5.14.4 manifest, package export status:"
unzip -p "$J/junit-vintage-engine-5.14.4.jar" META-INF/MANIFEST.MF | tr -d '\r' | sed ':a;N;$!ba;s/\n //g' | grep -o 'Export-Package: org.junit.vintage.engine;[^,]*' | sed 's/;uses:=.*//; s/^Export-Package: //'
} > output/07-jar-contents.txt
cat output/07-jar-contents.txt
+2 -1
View File
@@ -4,8 +4,9 @@ set -euo pipefail
cd "$(dirname "$0")/.."
unset JAVA_TOOL_OPTIONS
python3 scripts/api_diff.py >/dev/null # 01, 02: jar-to-jar API diff (also downloads the jars)
mvn -B -q clean test -Pjunit5 # 03, 04 on JUnit 5.14.4
mvn -B -q clean test -Pjunit6 # 03, 04 on JUnit 6.1.3
python3 scripts/api_diff.py >/dev/null # 01, 02: jar-to-jar API diff (downloads the jars into target/jars)
./scripts/compile-old-apis.sh # 05, 06
./scripts/inspect-jars.sh >/dev/null # 07
ls -1 output