commit | fc68ab30d30b7994819e40d207440f361b0bd8e6 | [log] [tgz] |
---|---|---|
author | Cui, Yuxin <yuxin.cui@intel.com> | Mon Jun 03 16:08:06 2024 +0800 |
committer | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | Mon Jun 24 18:06:56 2024 +0000 |
tree | 3c3d443dcb504bd783efe43338fd9600bd4cfa90 | |
parent | 2ca1cbf616f504d523e2099c2b688ec3abf8acaf [diff] |
Split getTestRecordId only on the first occurence of '#' When the first time running the CtsLibcoreTestCases, the tests' names in the test_result.xml are right while the tests' names stored in test-record.pd are missing the suffixes "#Cyrl" and "#Latn". For example, the full test name is "libcore.highmemorytest.java.text. DateFormatTest#test_toPattern_allLocales[az__#Cyrl]", and the mutilated name is "libcore.highmemorytest.java.text.DateFormatTest# test_toPattern_allLocales[az__ ". Therefore, when retrying this module, the cts load from the wrong test-record.pd, miss 819 tests and add 486 mutilated tests. The delta between running and collecting is 333. When generating pd file, the tradefed will first generate 3 tmp files: test-record.pd0, test-record.pd1 and test-record.pd2. Among them, test-record.pd1 contains the test names. When finishing tests, tradefed will read tmp files and process them to generate the final pd file. When tradefed processing record, it will split the childProto's TestRecordId with "#" and only get info[0] and info[1], which results in the loss of the suffix string after the second “#”. To fix this bug, tradefed should split getTestRecordId only on the first occurrence of '#'. Test: run retry. All tests in CtsLibcoreTestCases should be run. Bug: 344688732 Change-Id: I0b53fb401da1dce73f0ce4540f5e8312646f9748 Signed-off-by: Cui, Yuxin <yuxin.cui@intel.com> Deng, Bing <bing.deng@intel.com>
TF is a test harness used to drive Android automated testing. It runs on test hosts and monitors the connected devices, handling test scheduling & execution and device management.
Other test harnesses like Compatibility Test Suite (CTS) and Vendor Test Suite (VTS) use TF as a basis and extend it for their particular needs.
1. Create your change in Gerrit 2. Add the reviewer named "Tradefed Codereview" (email: tradefed-codereview@tradefederation.google.com.iam.gserviceaccount.com) 3. Review the code review guidance at go/tf-guidelines and go/tradefed-code-reviews 4. GWSQ should add a couple of people from the team to review your code and give feedback.
More information at: https://source.android.com/docs/core/tests/tradefed/
See more details about Tradefed Architecture at: https://source.android.com/docs/core/tests/tradefed/architecture
If you are a tests writer you should start looking in the test_framework/ component which contains everything needed to write a tests in Tradefed.