Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 858656

Summary: dev-java/gson: has JAVA_TEST_EXCLUDES for unresolved test failures
Product: Gentoo Linux Reporter: Volkmar W. Pogatzki <gentoo>
Component: Current packagesAssignee: Java team <java>
Status: CONFIRMED ---    
Severity: normal CC: fordfrog
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 856409    

Description Volkmar W. Pogatzki 2022-07-17 21:30:25 UTC
As of dev-java/gson-2.9.0-r2

JAVA_TEST_EXCLUDES=(
    # requires the test class to be obfuscated using proguard which we do not have atm
    "com.google.gson.functional.EnumWithObfuscatedTest"
    # FAILURES!!!
    # Tests run: 1090,  Failures: 3
    # testComGoogleGsonAnnotationsPackage(com.google.gson.regression.OSGiTest)
    # junit.framework.AssertionFailedError: Cannot find com.google.gson OSGi bundle manifest
    "com.google.gson.regression.OSGiTest"
    # testSerializeInternalImplementationObject(com.google.gson.functional.ReflectionAccessTest)
    # java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
    "com.google.gson.functional.ReflectionAccessTest"
)

src_prepare() {
    default
    sed -e "s/\${project.version}/${PV}/g" \
        -i src/main/java-templates/com/google/gson/internal/GsonBuildConfig.java \
            || die "Failed to set version"

    local vm_version="$(java-config -g PROVIDES_VERSION)"
    if ver_test "${vm_version}" -ge "17" ; then
        JAVA_TEST_EXCLUDES+=( "com.google.gson.internal.bind.DefaultDateTypeAdapterTest" )
    fi
}