Skip to content

MQE-2094: Test failure re-run error for extn builds #682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,7 @@ private function getFailedTestList()
if ($suiteName == self::DEFAULT_TEST_GROUP) {
array_push($failedTestDetails['tests'], $testName);
} else {
// Trim potential suite_parallel_0 to suite_parallel
$suiteNameArray = explode("_", $suiteName);
if (is_numeric(array_pop($suiteNameArray))) {
$suiteName = implode("_", $suiteNameArray);
}
$suiteName = $this->sanitizeSuiteName($suiteName);
$failedTestDetails['suites'] = array_merge_recursive(
$failedTestDetails['suites'],
[$suiteName => [$testName]]
Expand All @@ -191,6 +187,23 @@ private function getFailedTestList()
return $testConfigurationJson;
}

/**
* Trim potential suite_parallel_0_G to suite_parallel
*
* @param string $suiteName
* @return string
*/
private function sanitizeSuiteName($suiteName)
{
$suiteNameArray = explode("_", $suiteName);
if (array_pop($suiteNameArray) == 'G') {
if (is_numeric(array_pop($suiteNameArray))) {
$suiteName = implode("_", $suiteNameArray);
}
}
return $suiteName;
}

/**
* Returns an array of run commands read from the manifest file created post generation
*
Expand Down