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

Commit f08d61d3 authored by Pawin Vongmasa's avatar Pawin Vongmasa
Browse files

Codec2 VTS: Move device resource files to data/local/tmp

Some devices make /sdcard a symbolic link to a non-constant target. The
target changes between the setup and the execution, so files pushed to
/sdcard during the setup cannot be found when the test runs.

Test: vts-tradefed run vts -m VtsHalMediaC2V1_0Host

Bug: 138388013
Change-Id: Ia27bd9eedfc6f97225abb553c4b8efbb8957966e
parent b9df2ec0
Loading
Loading
Loading
Loading
+24 −19
Original line number Diff line number Diff line
## Codec2 VTS Hal @ 1.0 tests ##
---
#### master :
# Codec2 VTS Hal @ 1.0 tests #

## master :
Functionality of master is to enumerate all the Codec2 components available in C2 media service.

usage: VtsHalMediaC2V1\_0TargetMasterTest -I default
usage: `VtsHalMediaC2V1_0TargetMasterTest -I default`

#### component :
## component :
Functionality of component test is to validate common functionality across all the Codec2 components available in C2 media service. For a standard C2 component, these tests are expected to pass.

usage: VtsHalMediaC2V1\_0TargetComponentTest -I software -C <comp name>
example: VtsHalMediaC2V1\_0TargetComponentTest -I software -C c2.android.vorbis.decoder
usage: `VtsHalMediaC2V1_0TargetComponentTest -I software -C <comp name>`

example: `VtsHalMediaC2V1_0TargetComponentTest -I software -C c2.android.vorbis.decoder`

## audio :
Functionality of audio test is to validate audio specific functionality of Codec2 components. The resource files for this test are taken from `frameworks/av/media/codec2/hidl/1.0/vts/functional/res`. The path to these files on the device can be specified with `-P`. (If the device path is omitted, `/data/local/tmp/media/` is the default value.)

usage: `VtsHalMediaC2V1_0TargetAudioDecTest -I default -C <comp name> -P <path to resource files>`

usage: `VtsHalMediaC2V1_0TargetAudioEncTest -I software -C <comp name> -P <path to resource files>`

example: `VtsHalMediaC2V1_0TargetAudioDecTest -I software -C c2.android.flac.decoder -P /data/local/tmp/media/`

#### audio :
Functionality of audio test is to validate audio specific functionality Codec2 components. The resource files for this test are taken from media/codec2/hidl/1.0/vts/functional/res. The path to these files on the device is required to be given for bitstream tests.
example: `VtsHalMediaC2V1_0TargetAudioEncTest -I software -C c2.android.opus.encoder -P /data/local/tmp/media/`

usage: VtsHalMediaC2V1\_0TargetAudioDecTest -I default -C <comp name> -P /sdcard/media/
usage: VtsHalMediaC2V1\_0TargetAudioEncTest -I software -C <comp name> -P /sdcard/media/
## video :
Functionality of video test is to validate video specific functionality of Codec2 components. The resource files for this test are taken from `frameworks/av/media/codec2/hidl/1.0/vts/functional/res`. The path to these files on the device can be specified with `-P`. (If the device path is omitted, `/data/local/tmp/media/` is the default value.)

example: VtsHalMediaC2V1\_0TargetAudioDecTest -I software -C c2.android.flac.decoder -P /sdcard/media/
example: VtsHalMediaC2V1\_0TargetAudioEncTest -I software -C c2.android.opus.encoder -P /sdcard/media/
usage: `VtsHalMediaC2V1_0TargetVideoDecTest -I default -C <comp name> -P <path to resource files>`

#### video :
Functionality of video test is to validate video specific functionality Codec2 components. The resource files for this test are taken from media/codec2/hidl/1.0/vts/functional/res. The path to these files on the device is required to be given for bitstream tests.
usage: `VtsHalMediaC2V1_0TargetVideoEncTest -I software -C <comp name> -P <path to resource files>`

usage: VtsHalMediaC2V1\_0TargetVideoDecTest -I default -C <comp name> -P /sdcard/media/
usage: VtsHalMediaC2V1\_0TargetVideoEncTest -I software -C <comp name> -P /sdcard/media/
example: `VtsHalMediaC2V1_0TargetVideoDecTest -I software -C c2.android.avc.decoder -P /data/local/tmp/media/`

example: VtsHalMediaC2V1\_0TargetVideoDecTest -I software -C c2.android.avc.decoder -P /sdcard/media/
example: VtsHalMediaC2V1\_0TargetVideoEncTest -I software -C c2.android.vp9.encoder -P /sdcard/media/
example: `VtsHalMediaC2V1_0TargetVideoEncTest -I software -C c2.android.vp9.encoder -P /data/local/tmp/media/`
+1 −1
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ class ComponentTestEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase {
        registerTestService<IComponentStore>();
    }

    ComponentTestEnvironment() : res("/sdcard/media/") {}
    ComponentTestEnvironment() : res("/data/local/tmp/media/") {}

    void setComponent(const char* _component) { component = _component; }