CTS sensor 测试项失败分析
时间:10-02
整理:3721RD
点击:
【CTS】android.hardware.cts.sensorTest#testBatchAndFlush
【CTS】android.hardware.cts.SensorTest#testBatchAndFlushWithHandler
如果碰到上面两项的CTS测试项fail,请参考下面方法:
1. 请先确认是哪个sensor导致的fail,方法是看main_log:
如果CTS测试项成功会打印log:
TestRunner: started ···
TestRunner: finished ···
TestRunner: passed ···
如果失败的会只会打印 “TestRunner: started” 不会有 “TestRunner: passed” ,
所以可以搜索log “TestRunner” ,如果只有“started”而没有“passed”的说明此测试项fail了,
再搜索“SensorDevice” ,可以看到具体测试了哪些sensor,而最后一个sensor就是导致失败的sensor,
比如下面的log,可以看出是测试到handle=0x0000000d的sensor时失败了,然后再对照hwmsensor.h,确认是哪颗sensor
Line 16981: 09-23 10:38:51.672 3795 3807 I TestRunner: started:
testBatchAndFlushWithHandler(android.hardware.cts.SensorTest)
Line 16996: 09-23 10:38:51.687 662 1349 D SensorService: SensorDevice::batch: ident=0x66e43b10,
handle=0x00000000, flags=0, period_ns=200000000 timeout=0
Line 16999: 09-23 10:38:51.687 662 1349 D SensorService: SensorDevice::activate: ident=0x66e43b10,
handle=0x00000000, enabled=1, count=2
Line 17258: 09-23 10:38:53.112 662 787 D SensorService: SensorDevice::activate: ident=0x66e43b10,
handle=0x00000000, enabled=0, count=2
Line 17285: 09-23 10:38:53.123 662 1349 D SensorService: SensorDevice::batch: ident=0x66e43668,
handle=0x0000000d, flags=0, period_ns=200000000 timeout=0
Line 17288: 09-23 10:38:53.123 662 1349 D SensorService: SensorDevice::activate: ident=0x66e43668,
handle=0x0000000d, enabled=1, count=1
2.确认出问题的sensor硬件上是否存在,如果不存在的话请将改sensor的开关关闭,比如硬件上没有陀螺仪,
CUSTOM_KERNEL_GYROSOPE就必须为空 。
目前碰到的多数原因都是在硬件不存在的情况下将开关打开了。
3.如果碰到msensor导致的失败,且不是上面的原因,请测试前将msensor先校准试一下
4.也有碰到测试时屏幕休眠, sensor被disable掉,进而导致测试失败,所以测试时请将手机stay awake,方法是将菜
单
“设置---开发者选项---不锁定屏幕” 勾上 。
5.如果还有问题请提交e-service,并提供mtklog
【CTS】android.hardware.cts.SensorTest#testBatchAndFlushWithHandler
如果碰到上面两项的CTS测试项fail,请参考下面方法:
1. 请先确认是哪个sensor导致的fail,方法是看main_log:
如果CTS测试项成功会打印log:
TestRunner: started ···
TestRunner: finished ···
TestRunner: passed ···
如果失败的会只会打印 “TestRunner: started” 不会有 “TestRunner: passed” ,
所以可以搜索log “TestRunner” ,如果只有“started”而没有“passed”的说明此测试项fail了,
再搜索“SensorDevice” ,可以看到具体测试了哪些sensor,而最后一个sensor就是导致失败的sensor,
比如下面的log,可以看出是测试到handle=0x0000000d的sensor时失败了,然后再对照hwmsensor.h,确认是哪颗sensor
Line 16981: 09-23 10:38:51.672 3795 3807 I TestRunner: started:
testBatchAndFlushWithHandler(android.hardware.cts.SensorTest)
Line 16996: 09-23 10:38:51.687 662 1349 D SensorService: SensorDevice::batch: ident=0x66e43b10,
handle=0x00000000, flags=0, period_ns=200000000 timeout=0
Line 16999: 09-23 10:38:51.687 662 1349 D SensorService: SensorDevice::activate: ident=0x66e43b10,
handle=0x00000000, enabled=1, count=2
Line 17258: 09-23 10:38:53.112 662 787 D SensorService: SensorDevice::activate: ident=0x66e43b10,
handle=0x00000000, enabled=0, count=2
Line 17285: 09-23 10:38:53.123 662 1349 D SensorService: SensorDevice::batch: ident=0x66e43668,
handle=0x0000000d, flags=0, period_ns=200000000 timeout=0
Line 17288: 09-23 10:38:53.123 662 1349 D SensorService: SensorDevice::activate: ident=0x66e43668,
handle=0x0000000d, enabled=1, count=1
2.确认出问题的sensor硬件上是否存在,如果不存在的话请将改sensor的开关关闭,比如硬件上没有陀螺仪,
CUSTOM_KERNEL_GYROSOPE就必须为空 。
目前碰到的多数原因都是在硬件不存在的情况下将开关打开了。
3.如果碰到msensor导致的失败,且不是上面的原因,请测试前将msensor先校准试一下
4.也有碰到测试时屏幕休眠, sensor被disable掉,进而导致测试失败,所以测试时请将手机stay awake,方法是将菜
单
“设置---开发者选项---不锁定屏幕” 勾上 。
5.如果还有问题请提交e-service,并提供mtklog
