Skip to content

Commit 2e57c94

Browse files
authored
Merge pull request #552 from magento/MQE-1761
MQE-1761: Allure reporting error for multiple suite run
2 parents e344c6f + 63ddca9 commit 2e57c94

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

src/Magento/FunctionalTestingFramework/Console/RunTestGroupCommand.php

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,31 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9494
$command->run(new ArrayInput($args), $output);
9595
}
9696

97-
$codeceptionCommand = realpath(PROJECT_ROOT . '/vendor/bin/codecept') . ' run functional --verbose --steps';
97+
$commandString = realpath(PROJECT_ROOT . '/vendor/bin/codecept') . ' run functional --verbose --steps';
9898

99+
$exitCode = -1;
100+
$returnCodes = [];
99101
foreach ($groups as $group) {
100-
$codeceptionCommand .= " -g {$group}";
101-
}
102+
$codeceptionCommandString = $commandString . " -g {$group}";
103+
104+
$process = new Process($codeceptionCommandString);
105+
$process->setWorkingDirectory(TESTS_BP);
106+
$process->setIdleTimeout(600);
107+
$process->setTimeout(0);
102108

103-
$process = new Process($codeceptionCommand);
104-
$process->setWorkingDirectory(TESTS_BP);
105-
$process->setIdleTimeout(600);
106-
$process->setTimeout(0);
109+
$returnCodes[] = $process->run(
110+
function ($type, $buffer) use ($output) {
111+
$output->write($buffer);
112+
}
113+
);
114+
}
107115

108-
return $process->run(
109-
function ($type, $buffer) use ($output) {
110-
$output->write($buffer);
116+
foreach ($returnCodes as $returnCode) {
117+
if ($returnCode != 0) {
118+
return $returnCode;
111119
}
112-
);
120+
$exitCode = 0;
121+
}
122+
return $exitCode;
113123
}
114124
}

0 commit comments

Comments
 (0)