action #109810
closedcoordination #109569: [epic][qe-core] Unify PHP Testing
[qe-core] PHP tests unification
0%
Description
Problem description¶
Right now, all the PHP tests are set in the main_common.pm
module, for the functional versions and in mau-webserver.pm
for the maintenance ones. Also, there are dedicated modules duplicated depending on the distro version (php7_mysql.pm
and php8_mysql.pm
) for example.
Proposed solution¶
The idea is to extract all the PHP tests to a brand new created testsuite called php_tests
for example, and make them completely generic to avoid code duplication. This way, instead of having two diferent modules with the same code and having the schedule to decide which of them execute, we will have a single file (php_mysql
for example) and inside it the version of PHP to use will be decided. Something like this is already being done in the module php_pcre.pm
:
if (is_leap('<15.0') || is_sle('<15')) {
$php = 'php5';
}
elsif (is_leap("<15.4") || is_sle("<15-SP4")) {
$php = 'php7';
}
else {
$php = 'php8';
}
Further improvement¶
As it's intended to make more intense tests due to the inclusion of Laravel, much more modules can be added to this testsuite in order to check for all the framework requirements.