问题:我不确定此cts测试与哪些xml文件进行比较。
当我运行此特定CTS测试用例run cts -p android.tests.sigtest
失败并抱怨如下:
08-20 15:40:40.957 7195 7208 I TestRunner: failed: testSignature(android.tests.sigtest.SimpleSignatureTest)
08-20 15:40:40.957 7195 7208 I TestRunner: ----- begin exception -----
08-20 15:40:40.957 7195 7208 I TestRunner:
08-20 15:40:40.957 7195 7208 I TestRunner: junit.framework.AssertionFailedError:
08-20 15:40:40.957 7195 7208 I TestRunner: mismatch_field: android.os.Build#BOARD(java.lang.String)
08-20 15:40:40.957 7195 7208 I TestRunner: at junit.framework.Assert.fail(Assert.java:50)
08-20 15:40:40.957 7195 7208 I TestRunner: at android.tests.sigtest.SimpleSignatureTest.testSignature(SimpleSignatureTest.java:118)
08-20 15:40:40.957 7195 7208 I TestRunner: at java.lang.reflect.Method.invokeNative(Native Method)
08-20 15:40:40.957 7195 7208 I TestRunner: at java.lang.reflect.Method.invoke(Method.java:511)
08-20 15:40:40.957 7195 7208 I TestRunner: at junit.framework.TestCase.runTest(TestCase.java:168)
08-20 15:40:40.957 7195 7208 I TestRunner: at junit.framework.TestCase.runBare(TestCase.java:134)
08-20 15:40:40.957 7195 7208 I TestRunner: at junit.framework.TestResult$1.protect(TestResult.java:115)
08-20 15:40:40.957 7195 7208 I TestRunner: at junit.framework.TestResult.runProtected(TestResult.java:133)
08-20 15:40:40.957 7195 7208 I TestRunner: at junit.framework.TestResult.run(TestResult.java:118)
08-20 15:40:40.957 7195 7208 I TestRunner: at junit.framework.TestCase.run(TestCase.java:124)
08-20 15:40:40.957 7195 7208 I TestRunner: at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190)
08-20 15:40:40.957 7195 7208 I TestRunner: at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175)
08-20 15:40:40.957 7195 7208 I TestRunner: at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
08-20 15:40:40.957 7195 7208 I TestRunner: at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1799)
08-20 15:40:40.957 7195 7208 I TestRunner: ----- end exception -----
08-20 15:40:40.967 7195 7208 I TestRunner: finished:
从印刷品中解决问题
08-20 15:40:40.957 7195 7208 I TestRunner: mismatch_field: android.os.Build#BOARD(java.lang.String)
通过查看Build.java,我看到它来自"ro.product.board"
public static final String BOARD = getString("ro.product.board");
(http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/1.5_r4/android/os/Build.java)
跟踪“ro.product.board”一段时间后,我看到它在make文件中定义。 /device/abc_company/device_name.mk
这完全没问题。
但是看一下测试用例本身,我看到它正在读取一个xml文件。它看起来这个xml文件已经是二进制文件(例如。* .apk)所以我不知道它在哪里或它是什么。
start(r.getXml(f.getInt(rClass)));
(ftp://ftp.heanet.ie/mirrors/sourceforge/s/su/supernovaics/ics/cts/tests/SignatureTest/src/android/tests/sigtest/SimpleSignatureTest.java)
最后我想知道的是这个xml文件的位置。
...谢谢
答案 0 :(得分:0)
o期望的集合是从文件frameworks / base / api / current.txt在api.xml文件中生成的 o api.xml文件将在路径out / target / common / obj / APPS / SignatureTest_intermediates / api.xml中生成