Andorid S xTS

最近在搞项目上的 xts 认证,解了一些问题,记录一些知识。

1.  DeclaredInputStreamConfigSupport/InputStreamTest#SetAudioProperties/1_default_primary_1__11025_AUDIO_CHANNEL_IN_MONO___,flow:

(1)open:

testOpen -> helper.open -> openStream(AudioPrimaryHidlHalTest.h)

open input stream(hal)

(2)getSupportedProfiles:

testSetAudioProperties
->
    stream->getSupportedProfiles(AudioPrimaryHidlHalTest.h)
    Stream::getSupportedProfiles(Stream.cpp)

    getParam分别get keyStreamSupportedFormats、keyStreamSupportedSamplingRates、            
    keyStreamSupportedChannels

    get parameter(hal)

hal需要返回支持的格式字符串,每种format、ch、sr中间用 '|' 隔开。

现在解决的问题就是:如果在get的这一步,hal 已经返回了不支持,那整个测项就会返回Ignore。

(3)setAudioProperties

testSetAudioProperties
->
    stream->setAudioProperties(AudioPrimaryHidlHalTest.h)

    set parameter(hal)

这一步也得注意要做的事情和返回值。

(4)closeStream

closeStream
-->
    helper.close(AudioPrimaryHidlHalTest.h)
    mStream->close()

    close input stream(HAL)

2. run cts -m CtsMediaTestCases -t android.media.cts.DecoderTest#testTunneledAccurateVideoFlushVp9

该测项遇到create audio track不成功,但xml 里明明有相符的mixport;

log显示,在下面的位置会直接rerun:

bool IOProfile::isCompatibleProfile(……)
{
    ……
    if (!devices.isEmpty()) {
        if (!mSupportedDevices.containsAllDevices(devices)) {
            return false;
        }
    }

    ……
}

devices 是当前要求的输出设备,mSupportedDevices 是当前某个mixport支持的输出设备,定义在xml 中<routes>标签下,当routes中没有时,就会找不到。

3. "Audio Frequency Speaker Test" in CtsVerifier.apk

安照要求,是需要用usb麦克录设备的喇叭出来的声音;但是如果不想那么麻烦的话,直接用耳机播出的声音也可以(因为插上usb声卡,就直接切到usb耳机出声了,设置里也没有可调节的选项)。

测试时,直接用同一个usb耳机自己的麦克录耳机的声音,即可pass。

需注意的是,pm install 安装CtsVerifier.apk时,需要带-g 选项(把所有权限都带上)。

Caused by: MobileHarnessException: Failed to unzip file /root/xts/mcts_dynamic_download/android/xts/mcts/35/arm64/android-mcts-permission.zip to dir /tmp/olc_server_temp_files/session_6f0a63ff-ea2c-4f5b-9df6-49f000b42fd4/job_tmp_xts-tradefed-test-job_db105dd1-4158-428b-a2e2-7cb7541c73d9/test_5394de8f-68c8-4c07-86cb-9cd56e048be1/android/xts/mcts [MH|UNDETERMINED|LOCAL_FILE_UNZIP_ERROR|30123] [MobileHarnessException],Caused by: com.google.devtools.mobileharness.shared.util.command.CommandFailureException: Failed command with exit_code=9 and success_exit_codes=[0], result=[code=9, out=[ End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. note: /root/xts/mcts_dynamic_download/android/xts/mcts/35/arm64/android-mcts-permission.zip may be a plain executable, not an archive unzip: cannot find zipfile directory in one of /root/xts/mcts_dynamic_download/android/xts/mcts/35/arm64/android-mcts-permission.zip or /root/xts/mcts_dynamic_download/android/xts/mcts/35/arm64/android-mcts-permission.zip.zip, and cannot find /root/xts/mcts_dynamic_download/android/xts/mcts/35/arm64/android-mcts-permission.zip.ZIP, period. Archive: /root/xts/mcts_dynamic_download/android/xts/mcts/35/arm64/android-mcts-permission.zip ], err=[]], command=[unzip -o /root/xts/mcts_dynamic_download/android/xts/mcts/35/arm64/android-mcts-permission.zip] [MH|UNDETERMINED|COMMAND_EXEC_FAIL|39998] [CommandFailureException]
03-21
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值