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
Loading
Please register or sign in to comment