[DESCRIPTION]
run cts -m CtsHardwareTestCases -t android.hardware.consumerir.cts.ConsumerIrTest#test_timing
fail
06-12 15:34:34 D/ModuleListener: ModuleListener.testStarted(android.hardware.consumerir.cts.ConsumerIrTest#test_timing)
06-12 15:34:34 D/ModuleListener: ModuleListener.testFailed(android.hardware.consumerir.cts.ConsumerIrTest#test_timing, junit.framework.AssertionFailedError: Pattern length pattern:499995000, actual:926538
at junit.framework.Assert.fail(Assert.java:50)
at junit.framework.Assert.assertTrue(Assert.java:20)
at android.hardware.consumerir.cts.ConsumerIrTest.test_timing(ConsumerIrTest.java:94)
at java.lang.reflect.Method.invoke(Native Method)
[SOLUTION]
此项测试是测试红外的,测试源码如下:
1 2 3 4 5 |
<a class="l" href="http://10.16.20.15/alps-mp-o1-mp1/xref/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java#39">39</a> <a class="d" href="http://10.16.20.15/alps-mp-o1-mp1/xref/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java#mHasConsumerIr">mHasConsumerIr</a> = <a href="http://10.16.20.15/alps-mp-o1-mp1/s?defs=getContext&project=cts">getContext</a>().<a href="http://10.16.20.15/alps-mp-o1-mp1/s?defs=getPackageManager&project=cts">getPackageManager</a>().<a href="http://10.16.20.15/alps-mp-o1-mp1/s?defs=hasSystemFeature&project=cts">hasSystemFeature</a>( <a class="hl" href="http://10.16.20.15/alps-mp-o1-mp1/xref/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java#40">40</a> <a href="http://10.16.20.15/alps-mp-o1-mp1/s?defs=PackageManager&project=cts">PackageManager</a>.<a href="http://10.16.20.15/alps-mp-o1-mp1/s?defs=FEATURE_CONSUMER_IR&project=cts">FEATURE_CONSUMER_IR</a>); <a class="l" href="http://10.16.20.15/alps-mp-o1-mp1/xref/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java#41">41</a> <strong>if</strong> (<a class="d" href="http://10.16.20.15/alps-mp-o1-mp1/xref/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java#mHasConsumerIr">mHasConsumerIr</a>) { <a class="l" href="http://10.16.20.15/alps-mp-o1-mp1/xref/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java#42">42</a> <a class="d" href="http://10.16.20.15/alps-mp-o1-mp1/xref/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java#mCIR">mCIR</a> = (<a href="http://10.16.20.15/alps-mp-o1-mp1/s?defs=ConsumerIrManager&project=cts">ConsumerIrManager</a>)<a href="http://10.16.20.15/alps-mp-o1-mp1/s?defs=getContext&project=cts">getContext</a>().<a href="http://10.16.20.15/alps-mp-o1-mp1/s?defs=getSystemService&project=cts">getSystemService</a>( <a class="l" href="http://10.16.20.15/alps-mp-o1-mp1/xref/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java#43">43</a> <a href="http://10.16.20.15/alps-mp-o1-mp1/s?defs=Context&project=cts">Context</a>.<a href="http://10.16.20.15/alps-mp-o1-mp1/s?defs=CONSUMER_IR_SERVICE&project=cts">CONSUMER_IR_SERVICE</a>); |
1 2 3 4 5 |
<a class="l" href="http://10.16.20.15/alps-mp-o1-mp1/xref/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java#72">72</a> <strong>public</strong> <strong>void</strong> <a class="xmt" href="http://10.16.20.15/alps-mp-o1-mp1/s?refs=test_timing&project=cts">test_timing</a>() { <a class="l" href="http://10.16.20.15/alps-mp-o1-mp1/xref/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java#73">73</a> <strong>if</strong> (!<a class="d" href="http://10.16.20.15/alps-mp-o1-mp1/xref/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java#mHasConsumerIr">mHasConsumerIr</a>) { <a class="l" href="http://10.16.20.15/alps-mp-o1-mp1/xref/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java#74">74</a> <span class="c">// Skip the test if consumer IR is not present.</span> <a class="l" href="http://10.16.20.15/alps-mp-o1-mp1/xref/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java#75">75</a> <strong>return</strong>; <a class="l" href="http://10.16.20.15/alps-mp-o1-mp1/xref/cts/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java#76">76</a> } |
因此,请确认,测试项目是否支持红外:
1、如果支持红外,请确认红外实现方式,比如是否外挂等,然后提交eService;
2、如果不支持红外,请把红外的配置拿掉:
MTK_IRTX_SUPPORT=no MTK_IR_LEARNING_SUPPORT=no MTK_IRTX_PWM_SUPPORT=no
然后复测!
如果支持红外,这个是对比红外发射的时间,要按照cts的要求,这个时间段发完?