Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit db9a988a authored by Felka Chang's avatar Felka Chang
Browse files

Change OverlayHostTest to be devide_tests only.

Although OverlayHostTests.jar is a java jar file, it can run on
any java VM. However, all files in
frameworks/core/tests/overlaytests/host should be considered as one
module rather than only OverlayHostTests.jar.

ag/15993030 skip tests if the certificate of "android" package in ROM
is different from "android" overlay package. ag/15993030 has a logic
wrong. When the device_tests run on different certificate devices, the
expected result is fail instead of skip.

Test: make general-tests device-tests ; \
    assertFiles() { \
        unzip -l "$1" | awk \
        -v "expectedNumOfApk=$2" -v "expectedNumOfJar=$3" \
        '$4 ~ /OverlayHostTests.jar$/ { print $4 ; numberOfJar++ } \
        $4 ~ /OverlayHostTest.*.apk$/ { print $4 ; numberOfApk++ } \
        END { \
            if (numberOfApk != expectedNumOfApk) { print "Fail for the apk files" } \
            if (numberOfJar != expectedNumOfJar) { print "Fail for the jar file" } \
        }' ;\
    } ;\
    assertFiles "$ANDROID_PRODUCT_OUT/device-tests.zip" 8 1 ;\
    assertFiles "$ANDROID_PRODUCT_OUT/general-tests.zip" 0 0

Bug: 200698485
Fixes: 202254755
Change-Id: Iaa7b4bd8ef19f1d3fedcddfaa65e45c9024777d4
parent c8efa5b8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment