mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
Match unittest results by name or file
Summary: Just talked to @tuomaspelkonen, and turns out there is a case where postponed tests results use the filepath for both the name and file parameters. Then, after the tests have completed, the unittest results are updated with the class name as the test name. To handle this, this diff matches the stored unittest results name against either the name or file component of the updated unittest info. Not sure of great way to generally handle these situations. Perhaps, long term, we can just use a placeholder unittest result, mark that as passed (or delete it?) then add a new test result with the correct name. Test Plan: updated unittest result with new name (but file was the same). Reviewers: epriestley, tuomaspelkonen Reviewed By: epriestley CC: aran, epriestley, andrewjcg Differential Revision: https://secure.phabricator.com/D1356
This commit is contained in:
parent
48f53ba095
commit
840eb46d03
1 changed files with 3 additions and 1 deletions
|
@ -77,7 +77,9 @@ extends ConduitAPIMethod {
|
|||
// If the test result already exists, then update it with
|
||||
// the new info.
|
||||
foreach ($unit_results as &$unit_result) {
|
||||
if ($unit_result['name'] === $name) {
|
||||
if ($unit_result['name'] === $name ||
|
||||
$unit_result['name'] === $file) {
|
||||
$unit_result['name'] = $name;
|
||||
$unit_result['file'] = $file;
|
||||
$unit_result['result'] = $result;
|
||||
$unit_result['userdata'] = $message;
|
||||
|
|
Loading…
Reference in a new issue