File tree Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Original file line number Diff line number Diff line change @@ -29,32 +29,12 @@ function getAvailableLibraries(string $libFolder): array
29
29
function runAutomatedTests (string $ library ): array
30
30
{
31
31
$ cmd = sprintf (PHPUNIT_TEST_CMD , ucwords (str_replace ('- ' , '_ ' , $ library )));
32
- $ output = shell_exec ($ cmd );
33
-
34
- if (($ position = strpos ($ output , 'OK ' )) !== false ) {
35
- return [
36
- 'status ' => true ,
37
- 'output ' => substr ($ output , $ position )
38
- ];
39
- }
40
-
41
- if (($ position = strpos ($ output , 'FAILURES! ' )) !== false ) {
42
- return [
43
- 'status ' => false ,
44
- 'output ' => substr ($ output , $ position )
45
- ];
46
- }
47
-
48
- if (($ position = strpos ($ output , 'ERRORS! ' )) !== false ) {
49
- return [
50
- 'status ' => false ,
51
- 'output ' => substr ($ output , $ position )
52
- ];
53
- }
32
+ echo $ cmd , PHP_EOL ;
33
+ exec ($ cmd , $ output , $ exitcode );
54
34
55
35
return [
56
- 'status ' => false ,
57
- 'output ' => ' Unknown Failure '
36
+ 'status ' => $ exitcode === 0 ,
37
+ 'output ' => end ( $ output )
58
38
];
59
39
}
60
40
You can’t perform that action at this time.
0 commit comments