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:
@@ -28,5 +28,6 @@ releases are compared jar against jar. Nothing here is copied from release notes
|
|||||||
| `04-vintage-junit4-<version>.txt` | a JUnit 4 test run through the Vintage engine on each version |
|
| `04-vintage-junit4-<version>.txt` | a JUnit 4 test run through the Vintage engine on each version |
|
||||||
| `05-old-apis-<version>.txt` | what the compiler says about three deprecated 5.x APIs on each version |
|
| `05-old-apis-<version>.txt` | what the compiler says about three deprecated 5.x APIs on each version |
|
||||||
| `06-fixed-apis-<version>.txt` | the replacements compile on both versions |
|
| `06-fixed-apis-<version>.txt` | the replacements compile on both versions |
|
||||||
|
| `07-jar-contents.txt` | which CSV parser each `junit-jupiter-params` jar bundles, and the Vintage engine's declared status |
|
||||||
|
|
||||||
`pom.xml` has two profiles, `junit5` and `junit6`, that change nothing but `junit.version`.
|
`pom.xml` has two profiles, `junit5` and `junit6`, that change nothing but `junit.version`.
|
||||||
|
|||||||
@@ -1,40 +1,12 @@
|
|||||||
JUnit 5.14.4, compiling OldApis.java
|
JUnit 5.14.4, compiling OldApis.java
|
||||||
src/compat/OldApis.java:1: error: package org.junit.jupiter.api does not exist
|
src/compat/OldApis.java:8: warning: [deprecation] Alphanumeric in MethodOrderer has been deprecated
|
||||||
import org.junit.jupiter.api.MethodOrderer;
|
|
||||||
^
|
|
||||||
src/compat/OldApis.java:2: error: package org.junit.jupiter.api does not exist
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
^
|
|
||||||
src/compat/OldApis.java:3: error: package org.junit.jupiter.api does not exist
|
|
||||||
import org.junit.jupiter.api.TestMethodOrder;
|
|
||||||
^
|
|
||||||
src/compat/OldApis.java:4: error: package org.junit.jupiter.api.io does not exist
|
|
||||||
import org.junit.jupiter.api.io.TempDir;
|
|
||||||
^
|
|
||||||
src/compat/OldApis.java:5: error: package org.junit.platform.commons.support does not exist
|
|
||||||
import org.junit.platform.commons.support.ReflectionSupport;
|
|
||||||
^
|
|
||||||
src/compat/OldApis.java:8: error: cannot find symbol
|
|
||||||
@TestMethodOrder(MethodOrderer.Alphanumeric.class)
|
|
||||||
^
|
|
||||||
symbol: class TestMethodOrder
|
|
||||||
src/compat/OldApis.java:8: error: package MethodOrderer does not exist
|
|
||||||
@TestMethodOrder(MethodOrderer.Alphanumeric.class)
|
@TestMethodOrder(MethodOrderer.Alphanumeric.class)
|
||||||
^
|
^
|
||||||
src/compat/OldApis.java:11: error: cannot find symbol
|
src/compat/OldApis.java:13: warning: [deprecation] loadClass(String) in ReflectionSupport has been deprecated
|
||||||
@Test
|
|
||||||
^
|
|
||||||
symbol: class Test
|
|
||||||
location: class OldApis
|
|
||||||
src/compat/OldApis.java:13: error: cannot find symbol
|
|
||||||
Object loaded = ReflectionSupport.loadClass("java.lang.String");
|
Object loaded = ReflectionSupport.loadClass("java.lang.String");
|
||||||
^
|
^
|
||||||
symbol: variable ReflectionSupport
|
src/compat/OldApis.java:14: warning: [deprecation] SCOPE_PROPERTY_NAME in TempDir has been deprecated
|
||||||
location: class OldApis
|
|
||||||
src/compat/OldApis.java:14: error: cannot find symbol
|
|
||||||
String property = TempDir.SCOPE_PROPERTY_NAME;
|
String property = TempDir.SCOPE_PROPERTY_NAME;
|
||||||
^
|
^
|
||||||
symbol: variable TempDir
|
3 warnings
|
||||||
location: class OldApis
|
javac exit status: 0
|
||||||
10 errors
|
|
||||||
javac exit status: 1
|
|
||||||
|
|||||||
@@ -1,40 +1,18 @@
|
|||||||
JUnit 6.1.3, compiling OldApis.java
|
JUnit 6.1.3, compiling OldApis.java
|
||||||
src/compat/OldApis.java:1: error: package org.junit.jupiter.api does not exist
|
|
||||||
import org.junit.jupiter.api.MethodOrderer;
|
|
||||||
^
|
|
||||||
src/compat/OldApis.java:2: error: package org.junit.jupiter.api does not exist
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
^
|
|
||||||
src/compat/OldApis.java:3: error: package org.junit.jupiter.api does not exist
|
|
||||||
import org.junit.jupiter.api.TestMethodOrder;
|
|
||||||
^
|
|
||||||
src/compat/OldApis.java:4: error: package org.junit.jupiter.api.io does not exist
|
|
||||||
import org.junit.jupiter.api.io.TempDir;
|
|
||||||
^
|
|
||||||
src/compat/OldApis.java:5: error: package org.junit.platform.commons.support does not exist
|
|
||||||
import org.junit.platform.commons.support.ReflectionSupport;
|
|
||||||
^
|
|
||||||
src/compat/OldApis.java:8: error: cannot find symbol
|
src/compat/OldApis.java:8: error: cannot find symbol
|
||||||
@TestMethodOrder(MethodOrderer.Alphanumeric.class)
|
|
||||||
^
|
|
||||||
symbol: class TestMethodOrder
|
|
||||||
src/compat/OldApis.java:8: error: package MethodOrderer does not exist
|
|
||||||
@TestMethodOrder(MethodOrderer.Alphanumeric.class)
|
@TestMethodOrder(MethodOrderer.Alphanumeric.class)
|
||||||
^
|
^
|
||||||
src/compat/OldApis.java:11: error: cannot find symbol
|
symbol: class Alphanumeric
|
||||||
@Test
|
location: interface MethodOrderer
|
||||||
^
|
|
||||||
symbol: class Test
|
|
||||||
location: class OldApis
|
|
||||||
src/compat/OldApis.java:13: error: cannot find symbol
|
src/compat/OldApis.java:13: error: cannot find symbol
|
||||||
Object loaded = ReflectionSupport.loadClass("java.lang.String");
|
Object loaded = ReflectionSupport.loadClass("java.lang.String");
|
||||||
^
|
^
|
||||||
symbol: variable ReflectionSupport
|
symbol: method loadClass(String)
|
||||||
location: class OldApis
|
location: class ReflectionSupport
|
||||||
src/compat/OldApis.java:14: error: cannot find symbol
|
src/compat/OldApis.java:14: error: cannot find symbol
|
||||||
String property = TempDir.SCOPE_PROPERTY_NAME;
|
String property = TempDir.SCOPE_PROPERTY_NAME;
|
||||||
^
|
^
|
||||||
symbol: variable TempDir
|
symbol: variable SCOPE_PROPERTY_NAME
|
||||||
location: class OldApis
|
location: @interface TempDir
|
||||||
10 errors
|
3 errors
|
||||||
javac exit status: 1
|
javac exit status: 1
|
||||||
|
|||||||
@@ -1,32 +1,2 @@
|
|||||||
JUnit 5.14.4, compiling FixedApis.java
|
JUnit 5.14.4, compiling FixedApis.java
|
||||||
src/compat/FixedApis.java:1: error: package org.junit.jupiter.api does not exist
|
javac exit status: 0
|
||||||
import org.junit.jupiter.api.MethodOrderer;
|
|
||||||
^
|
|
||||||
src/compat/FixedApis.java:2: error: package org.junit.jupiter.api does not exist
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
^
|
|
||||||
src/compat/FixedApis.java:3: error: package org.junit.jupiter.api does not exist
|
|
||||||
import org.junit.jupiter.api.TestMethodOrder;
|
|
||||||
^
|
|
||||||
src/compat/FixedApis.java:4: error: package org.junit.platform.commons.support does not exist
|
|
||||||
import org.junit.platform.commons.support.ReflectionSupport;
|
|
||||||
^
|
|
||||||
src/compat/FixedApis.java:7: error: cannot find symbol
|
|
||||||
@TestMethodOrder(MethodOrderer.MethodName.class)
|
|
||||||
^
|
|
||||||
symbol: class TestMethodOrder
|
|
||||||
src/compat/FixedApis.java:7: error: package MethodOrderer does not exist
|
|
||||||
@TestMethodOrder(MethodOrderer.MethodName.class)
|
|
||||||
^
|
|
||||||
src/compat/FixedApis.java:10: error: cannot find symbol
|
|
||||||
@Test
|
|
||||||
^
|
|
||||||
symbol: class Test
|
|
||||||
location: class FixedApis
|
|
||||||
src/compat/FixedApis.java:12: error: cannot find symbol
|
|
||||||
Object loaded = ReflectionSupport.tryToLoadClass("java.lang.String").toOptional().orElseThrow();
|
|
||||||
^
|
|
||||||
symbol: variable ReflectionSupport
|
|
||||||
location: class FixedApis
|
|
||||||
8 errors
|
|
||||||
javac exit status: 1
|
|
||||||
|
|||||||
@@ -1,32 +1,2 @@
|
|||||||
JUnit 6.1.3, compiling FixedApis.java
|
JUnit 6.1.3, compiling FixedApis.java
|
||||||
src/compat/FixedApis.java:1: error: package org.junit.jupiter.api does not exist
|
javac exit status: 0
|
||||||
import org.junit.jupiter.api.MethodOrderer;
|
|
||||||
^
|
|
||||||
src/compat/FixedApis.java:2: error: package org.junit.jupiter.api does not exist
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
^
|
|
||||||
src/compat/FixedApis.java:3: error: package org.junit.jupiter.api does not exist
|
|
||||||
import org.junit.jupiter.api.TestMethodOrder;
|
|
||||||
^
|
|
||||||
src/compat/FixedApis.java:4: error: package org.junit.platform.commons.support does not exist
|
|
||||||
import org.junit.platform.commons.support.ReflectionSupport;
|
|
||||||
^
|
|
||||||
src/compat/FixedApis.java:7: error: cannot find symbol
|
|
||||||
@TestMethodOrder(MethodOrderer.MethodName.class)
|
|
||||||
^
|
|
||||||
symbol: class TestMethodOrder
|
|
||||||
src/compat/FixedApis.java:7: error: package MethodOrderer does not exist
|
|
||||||
@TestMethodOrder(MethodOrderer.MethodName.class)
|
|
||||||
^
|
|
||||||
src/compat/FixedApis.java:10: error: cannot find symbol
|
|
||||||
@Test
|
|
||||||
^
|
|
||||||
symbol: class Test
|
|
||||||
location: class FixedApis
|
|
||||||
src/compat/FixedApis.java:12: error: cannot find symbol
|
|
||||||
Object loaded = ReflectionSupport.tryToLoadClass("java.lang.String").toOptional().orElseThrow();
|
|
||||||
^
|
|
||||||
symbol: variable ReflectionSupport
|
|
||||||
location: class FixedApis
|
|
||||||
8 errors
|
|
||||||
javac exit status: 1
|
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
junit-jupiter-params-5.14.4: bundled CSV parser packages (org/junit/jupiter/params/shadow/...)
|
||||||
|
1 org/junit/jupiter/params/shadow/com/
|
||||||
|
291 org/junit/jupiter/params/shadow/com/univocity
|
||||||
|
junit-jupiter-params-6.1.3: bundled CSV parser packages (org/junit/jupiter/params/shadow/...)
|
||||||
|
1 org/junit/jupiter/params/shadow/de/
|
||||||
|
71 org/junit/jupiter/params/shadow/de/siegmar
|
||||||
|
|
||||||
|
junit-vintage-engine-6.1.3 manifest, package export status:
|
||||||
|
org.junit.vintage.engine;status=DEPRECATED;version="6.1.3"
|
||||||
|
junit-vintage-engine-5.14.4 manifest, package export status:
|
||||||
|
org.junit.vintage.engine;version="5.14.4";status=STABLE
|
||||||
Executable
+17
@@ -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
|
||||||
@@ -4,8 +4,9 @@ set -euo pipefail
|
|||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
unset JAVA_TOOL_OPTIONS
|
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 -Pjunit5 # 03, 04 on JUnit 5.14.4
|
||||||
mvn -B -q clean test -Pjunit6 # 03, 04 on JUnit 6.1.3
|
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/compile-old-apis.sh # 05, 06
|
||||||
|
./scripts/inspect-jars.sh >/dev/null # 07
|
||||||
ls -1 output
|
ls -1 output
|
||||||
|
|||||||
Reference in New Issue
Block a user