@@ -69,7 +69,7 @@ function show_usage(): void
69
69
with value 'bar').
70
70
71
71
-g Comma separated list of groups to show during test run
72
- (possible values: PASS, FAIL, XFAIL, XLEAK, SKIP, SKIP_EXT, BORK, WARN, LEAK, REDIRECT).
72
+ (possible values: PASS, FAIL, XFAIL, XLEAK, SKIP, BORK, WARN, LEAK, REDIRECT).
73
73
74
74
-m Test for memory leaks with Valgrind (equivalent to -M memcheck).
75
75
@@ -1773,18 +1773,6 @@ function skip_test(string $tested, string $tested_file, string $shortname, strin
1773
1773
return 'SKIPPED ' ;
1774
1774
}
1775
1775
1776
- function skip_ext_test (string $ tested , string $ tested_file , string $ shortname , array $ missing_exts ) {
1777
- global $ junit ;
1778
-
1779
- $ reason = 'Required extension ' . (count ($ missing_exts ) > 1 ? 's ' : '' )
1780
- . ' missing: ' . implode (', ' , $ missing_exts );
1781
-
1782
- show_result ('SKIP_EXT ' , $ tested , $ tested_file , "reason: $ reason " );
1783
- $ junit ->initSuite ($ junit ->getSuiteName ($ shortname ));
1784
- $ junit ->markTestAs ('SKIP_EXT ' , $ shortname , $ tested , 0 , $ reason );
1785
- return 'SKIPPED_EXT ' ;
1786
- }
1787
-
1788
1776
//
1789
1777
// Run an individual test case.
1790
1778
//
@@ -2054,7 +2042,9 @@ function run_test(string $php, $file, array $env): string
2054
2042
}
2055
2043
}
2056
2044
if ($ missing ) {
2057
- return skip_ext_test ($ tested , $ tested_file , $ shortname , $ missing );
2045
+ $ message = 'Required extension ' . (count ($ missing ) > 1 ? 's ' : '' )
2046
+ . ' missing: ' . implode (', ' , $ missing );
2047
+ return skip_test ($ tested , $ tested_file , $ shortname , $ message );
2058
2048
}
2059
2049
}
2060
2050
@@ -3047,7 +3037,6 @@ function compute_summary(): void
3047
3037
'PASSED ' => 0 ,
3048
3038
'WARNED ' => 0 ,
3049
3039
'SKIPPED ' => 0 ,
3050
- 'SKIPPED_EXT ' => 0 ,
3051
3040
'FAILED ' => 0 ,
3052
3041
'BORKED ' => 0 ,
3053
3042
'LEAKED ' => 0 ,
@@ -3071,7 +3060,7 @@ function get_summary(bool $show_ext_summary): string
3071
3060
{
3072
3061
global $ n_total , $ sum_results , $ percent_results , $ end_time , $ start_time , $ failed_test_summary , $ PHP_FAILED_TESTS , $ valgrind ;
3073
3062
3074
- $ x_total = $ n_total - $ sum_results ['SKIPPED ' ] - $ sum_results ['SKIPPED_EXT ' ] - $ sum_results [ ' BORKED ' ];
3063
+ $ x_total = $ n_total - $ sum_results ['SKIPPED ' ] - $ sum_results ['BORKED ' ];
3075
3064
3076
3065
if ($ x_total ) {
3077
3066
$ x_warned = (100.0 * $ sum_results ['WARNED ' ]) / $ x_total ;
@@ -3094,38 +3083,37 @@ function get_summary(bool $show_ext_summary): string
3094
3083
' ;
3095
3084
}
3096
3085
3097
- $ summary .=
3098
- ' Number of tests : ' . sprintf ('%4d ' , $ n_total ) . ' ' . sprintf ('%8d ' , $ x_total );
3086
+ $ summary .= '
3087
+ Number of tests : ' . sprintf ('%4d ' , $ n_total ) . ' ' . sprintf ('%8d ' , $ x_total );
3099
3088
3100
3089
if ($ sum_results ['BORKED ' ]) {
3101
3090
$ summary .= '
3102
- Tests borked : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['BORKED ' ], $ percent_results ['BORKED ' ]) . ' -------- ' ;
3091
+ Tests borked : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['BORKED ' ], $ percent_results ['BORKED ' ]) . ' -------- ' ;
3103
3092
}
3104
3093
3105
3094
$ summary .= '
3106
- Tests skipped by ext: ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['SKIPPED_EXT ' ], $ percent_results ['SKIPPED_EXT ' ]) . ' --------
3107
- Tests skipped other : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['SKIPPED ' ], $ percent_results ['SKIPPED ' ]) . ' --------
3108
- Tests warned : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['WARNED ' ], $ percent_results ['WARNED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_warned ) . '
3109
- Tests failed : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['FAILED ' ], $ percent_results ['FAILED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_failed );
3095
+ Tests skipped : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['SKIPPED ' ], $ percent_results ['SKIPPED ' ]) . ' --------
3096
+ Tests warned : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['WARNED ' ], $ percent_results ['WARNED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_warned ) . '
3097
+ Tests failed : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['FAILED ' ], $ percent_results ['FAILED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_failed );
3110
3098
3111
3099
if ($ sum_results ['XFAILED ' ]) {
3112
3100
$ summary .= '
3113
- Expected fail : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['XFAILED ' ], $ percent_results ['XFAILED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_xfailed );
3101
+ Expected fail : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['XFAILED ' ], $ percent_results ['XFAILED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_xfailed );
3114
3102
}
3115
3103
3116
3104
if ($ valgrind ) {
3117
3105
$ summary .= '
3118
- Tests leaked : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['LEAKED ' ], $ percent_results ['LEAKED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_leaked );
3106
+ Tests leaked : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['LEAKED ' ], $ percent_results ['LEAKED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_leaked );
3119
3107
if ($ sum_results ['XLEAKED ' ]) {
3120
3108
$ summary .= '
3121
- Expected leak : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['XLEAKED ' ], $ percent_results ['XLEAKED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_xleaked );
3109
+ Expected leak : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['XLEAKED ' ], $ percent_results ['XLEAKED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_xleaked );
3122
3110
}
3123
3111
}
3124
3112
3125
3113
$ summary .= '
3126
- Tests passed : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['PASSED ' ], $ percent_results ['PASSED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_passed ) . '
3114
+ Tests passed : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['PASSED ' ], $ percent_results ['PASSED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_passed ) . '
3127
3115
---------------------------------------------------------------------
3128
- Time taken : ' . sprintf ('%4d seconds ' , $ end_time - $ start_time ) . '
3116
+ Time taken : ' . sprintf ('%4d seconds ' , $ end_time - $ start_time ) . '
3129
3117
=====================================================================
3130
3118
' ;
3131
3119
$ failed_test_summary = '' ;
@@ -3346,7 +3334,6 @@ class JUnit
3346
3334
'test_fail ' => 0 ,
3347
3335
'test_error ' => 0 ,
3348
3336
'test_skip ' => 0 ,
3349
- 'test_skip_ext ' => 0 ,
3350
3337
'test_warn ' => 0 ,
3351
3338
'files ' => [],
3352
3339
'execution_time ' => 0 ,
@@ -3387,13 +3374,12 @@ public function saveXML(): void
3387
3374
3388
3375
$ xml = '< ' . '? ' . 'xml version="1.0" encoding="UTF-8" ' . '? ' . '> ' . PHP_EOL ;
3389
3376
$ xml .= sprintf (
3390
- '<testsuites name="%s" tests="%s" failures="%d" errors="%d" skip="%d" skip_ext="%d" time="%s"> ' . PHP_EOL ,
3377
+ '<testsuites name="%s" tests="%s" failures="%d" errors="%d" skip="%d" time="%s"> ' . PHP_EOL ,
3391
3378
$ this ->rootSuite ['name ' ],
3392
3379
$ this ->rootSuite ['test_total ' ],
3393
3380
$ this ->rootSuite ['test_fail ' ],
3394
3381
$ this ->rootSuite ['test_error ' ],
3395
3382
$ this ->rootSuite ['test_skip ' ],
3396
- $ this ->rootSuite ['test_skip_ext ' ],
3397
3383
$ this ->rootSuite ['execution_time ' ]
3398
3384
);
3399
3385
$ xml .= $ this ->getSuitesXML ();
@@ -3408,13 +3394,12 @@ private function getSuitesXML(string $suite_name = '')
3408
3394
3409
3395
foreach ($ this ->suites as $ suite_name => $ suite ) {
3410
3396
$ result .= sprintf (
3411
- '<testsuite name="%s" tests="%s" failures="%d" errors="%d" skip="%d" skip_ext="%d" time="%s"> ' . PHP_EOL ,
3397
+ '<testsuite name="%s" tests="%s" failures="%d" errors="%d" skip="%d" time="%s"> ' . PHP_EOL ,
3412
3398
$ suite ['name ' ],
3413
3399
$ suite ['test_total ' ],
3414
3400
$ suite ['test_fail ' ],
3415
3401
$ suite ['test_error ' ],
3416
3402
$ suite ['test_skip ' ],
3417
- $ suite ['test_skip_ext ' ],
3418
3403
$ suite ['execution_time ' ]
3419
3404
);
3420
3405
@@ -3474,9 +3459,6 @@ public function markTestAs(
3474
3459
} elseif ('SKIP ' == $ type ) {
3475
3460
$ this ->record ($ suite , 'test_skip ' );
3476
3461
$ this ->rootSuite ['files ' ][$ file_name ]['xml ' ] .= "<skipped> $ escaped_message</skipped> \n" ;
3477
- } elseif ('SKIP_EXP ' == $ type ) {
3478
- $ this ->record ($ suite , 'test_skip_ext ' );
3479
- $ this ->rootSuite ['files ' ][$ file_name ]['xml ' ] .= "<skipped_ext> $ escaped_message</skipped_ext> \n" ;
3480
3462
} elseif ('WARN ' == $ type ) {
3481
3463
$ this ->record ($ suite , 'test_warn ' );
3482
3464
$ this ->rootSuite ['files ' ][$ file_name ]['xml ' ] .= "<warning> $ escaped_message</warning> \n" ;
@@ -3623,7 +3605,6 @@ private function mergeSuites(array &$dest, array $source): void
3623
3605
$ dest ['test_fail ' ] += $ source ['test_fail ' ];
3624
3606
$ dest ['test_error ' ] += $ source ['test_error ' ];
3625
3607
$ dest ['test_skip ' ] += $ source ['test_skip ' ];
3626
- $ dest ['test_skip_ext ' ] += $ source ['test_skip_ext ' ];
3627
3608
$ dest ['test_warn ' ] += $ source ['test_warn ' ];
3628
3609
$ dest ['execution_time ' ] += $ source ['execution_time ' ];
3629
3610
$ dest ['files ' ] += $ source ['files ' ];
0 commit comments