No description
69a76b1dfa
If multiple config are found, each will be validated before failing the test. Also add a missing new line before dumping libxml2 errors. Test: run the following script to check for regressions and test that invalid config make the test fail. runTest() {( set -xu local readonly MODULE=$1 local readonly TEST=$2 local readonly XML=$3 runVTS() { vts-tradefed run commandAndExit vts \ --skip-all-system-status-check --primary-abi-only \ --skip-preconditions --module $MODULE -t $TEST | awk '/FAILED: 0/{e=1} {print} END {exit !e}'; } local FAIL=0 # used instead of return if clean up is needed echo "# Test valid config" runVTS || return 1 echo "# Test multiple invalid match" adb shell touch /system/etc/$XML runVTS && FAIL=2 adb shell rm /system/etc/$XML echo "# Test multiple valid match (not supported if xinclude)" if !adb shell grep -q xi:include /vendor/etc/$XML; then adb shell cp /{vendor,system}/etc/$XML runVTS || FAIL=3 adb shell rm /system/etc/$XML fi echo "# Test invalid config" adb shell sed -i "'2i<fuu/>'" /vendor/etc/$XML runVTS && FAIL=4 adb shell sed -i 2d /vendor/etc/$XML echo "#Test no config" adb shell mv /vendor/etc/$XML{,.hide} runVTS && FAIL=5 adb shell mv /vendor/etc/$XML{.hide,} echo "# Test that the test did not break the config" runVTS || FAIL=6 return $FAIL )} runTest VtsHalAudioV2_0Target CheckConfig.audioPolicyConfigurationValidation audio_policy_configuration.xml && runTest VtsHalAudioEffectV2_0Target CheckConfig.audioEffectsConfigurationValidation audio_effects.xml && echo TEST PASSED Bug: 64881365 Change-Id: If0443f85e0d687eed04819337519e4d9f09f5ca9 Signed-off-by: Kevin Rocard <krocard@google.com> |
||
---|---|---|
audio | ||
automotive | ||
biometrics | ||
bluetooth | ||
boot | ||
broadcastradio | ||
camera | ||
cas | ||
configstore | ||
contexthub | ||
drm | ||
dumpstate | ||
gatekeeper | ||
gnss | ||
graphics | ||
health | ||
ir | ||
keymaster | ||
light | ||
media | ||
memtrack | ||
minijail | ||
neuralnetworks | ||
nfc | ||
oemlock | ||
power | ||
radio | ||
renderscript | ||
sensors | ||
soundtrigger | ||
tests | ||
tetheroffload | ||
thermal | ||
tv | ||
usb | ||
vibrator | ||
vr | ||
weaver | ||
wifi | ||
.clang-format | ||
Android.bp | ||
CleanSpec.mk | ||
compatibility_matrix.26.xml | ||
compatibility_matrix.27.xml | ||
compatibility_matrix.current.xml | ||
compatibility_matrix.legacy.xml | ||
current.txt | ||
MODULE_LICENSE_APACHE2 | ||
NOTICE | ||
OWNERS | ||
PREUPLOAD.cfg | ||
update-base-files.sh | ||
update-makefiles.sh |