OSDN Git Service

Audio VTS: do not test duplicate policy configuration file
authorKevin Rocard <krocard@google.com>
Thu, 14 Sep 2017 01:11:14 +0000 (18:11 -0700)
committerKevin Rocard <krocard@google.com>
Thu, 14 Sep 2017 07:39:25 +0000 (07:39 +0000)
commitff7dcd7e4d50ce99f57bd0cee90aded7036c5388
treeaf00dc9b31fd3f3c6e07ea1b18f44cb89f3540d5
parent7eeb6b5079fed4a8555c3b5e9f44478bd7e8ca42
Audio VTS: do not test duplicate policy configuration file

This patch only modifies the VTS tests.

O generic policy configuration fallback is incorrect
(see I2a39606cd820b5cd27a640248bf692204ec2cd71 for the fix).
Nevertheless, has no impact on products because this fallback
is only used in aosp builds and GSI.

Unfortunatly, this break the VTS test when run agains GSI.
Because it is too late to change GSI for Oc and DR,
relax the test to support current O GSI.

For P, ihis patch will not be part of VTS
and the fallback config will be fixed.

Bug: 65535343
Merged-In: I2a39606cd820b5cd27a640248bf692204ec2cd71
Test: Following script:

setup() {
    BUILD_ID=$1
    TARGET_PRODUCT=$2
    TARGET_BUILD_TYPE=${3:-userdebug}
    TARGET_ARCH=${4:-arm64}
    set +x

    echo "The following three variables can be overridden" \
         "by setting the corresponding environment variable"
    set -x
    TEST_SUITES_TARGET=${VTS_TEST_SUITES_TARGET:-test_suites_${TARGET_ARCH}}
    BASE_TARGET=${VTS_BASE_TARGET:-${TARGET_PRODUCT}-${TARGET_BUILD_TYPE}}
    AOSP_TARGET=${VTS_AOSP_TARGET:-aosp_${TARGET_ARCH}_ab-${TARGET_BUILD_TYPE}}
    set +x

    download() {
        local target=$1
        local file=$2
        test -f $file ||
            /google/data/ro/projects/android/fetch_artifact --bid $BUILD_ID --target $target $file ||
            { local r=$?; rm $file; return $r; }
    }

    echo "Downloading"
    download $TEST_SUITES_TARGET 'android-vts.zip'
    download $BASE_TARGET "${TARGET_PRODUCT}-img-${BUILD_ID}.zip"
    download $AOSP_TARGET "aosp_${TARGET_ARCH}_ab-img-${BUILD_ID}.zip"

    echo "Unzipping"
    rm -r system.img android-vts
    unzip aosp_${TARGET_ARCH}_ab-img-$BUILD_ID.zip system.img
    unzip android-vts.zip

    echo "Building vbmeta without verity"
    avbtool make_vbmeta_image --flag 2 --output vbmeta.img

    set -x
    adb reboot bootloader
    fastboot update ${TARGET_PRODUCT}-img-$BUILD_ID.zip --skip-reboot
    fastboot flash vbmeta vbmeta.img || echo "Warning: Device does not support vbmeta"
    fastboot erase system
    fastboot flash system system.img
    fastboot erase metadata
    fastboot -w
    fastboot reboot

    echo "Board setup"
    echo "You may now start vts-tradefed with:"
    echo '$ ANDROID_BUILD_TOP= PATH="$PWD:$PATH" vts-tradefed'
}
VTS_TEST_SUITES_TARGET=test_suites_arm64_fastbuild3d_linux setup 4327646 sailfish
 vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation

Change-Id: Ibe1feed41325a3e4fb25e959bd254156348aa584
Signed-off-by: Kevin Rocard <krocard@google.com>
audio/2.0/vts/functional/ValidateAudioConfiguration.cpp