No description
Find a file
Kevin Rocard 69a76b1dfa Audio VTS: improve audio policy validation error messages
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>
2017-09-26 17:15:59 +00:00
audio Audio VTS: improve audio policy validation error messages 2017-09-26 17:15:59 +00:00
automotive Merge "Register mock EVS driver as EvsEnumeratorHw" 2017-09-19 21:34:45 +00:00
biometrics Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
bluetooth Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
boot Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
broadcastradio Merge "Adjust AM/FM region ranges." into oc-mr1-dev 2017-09-13 15:36:09 +00:00
camera Merge "Camera: Add default implementation of camera.device@3.3" into oc-mr1-dev am: 3f55d8735e 2017-09-19 16:01:04 +00:00
cas Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
configstore Merge "Allow clock_gettime syscall for logging" into oc-mr1-dev am: 3816306137 2017-09-14 06:00:39 +00:00
contexthub Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
drm Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
dumpstate Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
gatekeeper Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
gnss Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
graphics Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
health Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
ir Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
keymaster Merge "Don't send more than 2K to addRngEntropy" into oc-dev am: 7eeb6b5079 am: 35e1be70b4 2017-09-12 16:37:22 +00:00
light Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
media Merge "Fix typos in IOmxStore.hal" into oc-mr1-dev am: 941b614064 2017-09-19 01:30:07 +00:00
memtrack Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
minijail configstore: sandbox with seccomp filter 2017-08-10 10:34:08 -07:00
neuralnetworks Support ignored output in test harness 2017-09-13 20:16:47 -07:00
nfc Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
oemlock Revert "Revert "Updating all makefiles."" 2017-08-11 23:02:01 +00:00
power Merge "Remove default implementation for PowerHal 1.1" into oc-mr1-dev 2017-09-12 16:57:07 +00:00
radio Fix docstrings for RIL_CellIdentity 2017-09-13 15:32:49 -07:00
renderscript Load libRS_internal.so from the rs namespace 2017-08-16 23:35:57 +09:00
sensors Merge "Add capability for sensor hal to use wakelock" am: 2adf343f57 am: b3698f066c am: 6d7dfdbe63 2017-09-18 18:59:34 +00:00
soundtrigger sound trigger: fix array overflow in HAL wrapper 2017-09-07 12:48:41 -07:00
tests Merge "hidl_test: update expression test" am: 9dc1284388 am: eed76d6fc9 am: 23072f6c52 2017-09-18 21:02:42 +00:00
tetheroffload Merge "Tetheroffload tests static link to HAL def libs." into oc-mr1-dev 2017-08-14 22:26:09 +00:00
thermal Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
tv Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
usb Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
vibrator Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
vr Add 'vendor.' prefix to a vendor HAL service name 2017-09-12 08:01:42 +09:00
weaver Revert "Revert "Updating all makefiles."" 2017-08-11 23:02:01 +00:00
wifi Merge "[WIFI][TREBLE] Uprev Wi-Fi HAL 1.2" 2017-09-15 13:58:43 +00:00
.clang-format
Android.bp
CleanSpec.mk resolve merge conflicts of d8a2e2f0 to master 2017-09-08 08:21:35 +09:00
compatibility_matrix.26.xml Merge "Finalize O-MR1 compat matrix." into oc-mr1-dev am: 0289fc42b4 2017-09-05 21:22:03 +00:00
compatibility_matrix.27.xml Remove media.cas requirement. 2017-09-05 22:59:21 +00:00
compatibility_matrix.current.xml Merge "Remove media.cas requirement." into oc-mr1-dev am: 05143cf85e 2017-09-06 04:49:31 +00:00
compatibility_matrix.legacy.xml Merge "Finalize O-MR1 compat matrix." into oc-mr1-dev am: 0289fc42b4 2017-09-05 21:22:03 +00:00
current.txt Merge "Fix typos in IOmxStore.hal" into oc-mr1-dev am: 941b614064 2017-09-19 01:30:07 +00:00
MODULE_LICENSE_APACHE2
NOTICE
OWNERS
PREUPLOAD.cfg
update-base-files.sh
update-makefiles.sh