@@ -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
@@ -1850,18 +1850,6 @@ function skip_test(string $tested, string $tested_file, string $shortname, strin
1850
1850
return 'SKIPPED ' ;
1851
1851
}
1852
1852
1853
- function skip_ext_test (string $ tested , string $ tested_file , string $ shortname , array $ missing_exts ) {
1854
- global $ junit ;
1855
-
1856
- $ reason = 'Required extension ' . (count ($ missing_exts ) > 1 ? 's ' : '' )
1857
- . ' missing: ' . implode (', ' , $ missing_exts );
1858
-
1859
- show_result ('SKIP_EXT ' , $ tested , $ tested_file , "reason: $ reason " );
1860
- $ junit ->initSuite ($ junit ->getSuiteName ($ shortname ));
1861
- $ junit ->markTestAs ('SKIP_EXT ' , $ shortname , $ tested , 0 , $ reason );
1862
- return 'SKIPPED_EXT ' ;
1863
- }
1864
-
1865
1853
//
1866
1854
// Run an individual test case.
1867
1855
//
@@ -2127,7 +2115,9 @@ function run_test(string $php, $file, array $env): string
2127
2115
}
2128
2116
}
2129
2117
if ($ missing ) {
2130
- return skip_ext_test ($ tested , $ tested_file , $ shortname , $ missing );
2118
+ $ message = 'Required extension ' . (count ($ missing ) > 1 ? 's ' : '' )
2119
+ . ' missing: ' . implode (', ' , $ missing );
2120
+ return skip_test ($ tested , $ tested_file , $ shortname , $ message );
2131
2121
}
2132
2122
}
2133
2123
@@ -3108,7 +3098,6 @@ function compute_summary(): void
3108
3098
'PASSED ' => 0 ,
3109
3099
'WARNED ' => 0 ,
3110
3100
'SKIPPED ' => 0 ,
3111
- 'SKIPPED_EXT ' => 0 ,
3112
3101
'FAILED ' => 0 ,
3113
3102
'BORKED ' => 0 ,
3114
3103
'LEAKED ' => 0 ,
@@ -3131,7 +3120,7 @@ function get_summary(bool $show_ext_summary): string
3131
3120
{
3132
3121
global $ n_total , $ sum_results , $ percent_results , $ end_time , $ start_time , $ failed_test_summary , $ PHP_FAILED_TESTS , $ valgrind ;
3133
3122
3134
- $ x_total = $ n_total - $ sum_results ['SKIPPED ' ] - $ sum_results ['SKIPPED_EXT ' ] - $ sum_results [ ' BORKED ' ];
3123
+ $ x_total = $ n_total - $ sum_results ['SKIPPED ' ] - $ sum_results ['BORKED ' ];
3135
3124
3136
3125
if ($ x_total ) {
3137
3126
$ x_warned = (100.0 * $ sum_results ['WARNED ' ]) / $ x_total ;
@@ -3155,37 +3144,36 @@ function get_summary(bool $show_ext_summary): string
3155
3144
}
3156
3145
3157
3146
$ summary .=
3158
- 'Number of tests : ' . sprintf ('%4d ' , $ n_total ) . ' ' . sprintf ('%8d ' , $ x_total );
3147
+ 'Number of tests : ' . sprintf ('%4d ' , $ n_total ) . ' ' . sprintf ('%8d ' , $ x_total );
3159
3148
3160
3149
if ($ sum_results ['BORKED ' ]) {
3161
3150
$ summary .= '
3162
- Tests borked : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['BORKED ' ], $ percent_results ['BORKED ' ]) . ' -------- ' ;
3151
+ Tests borked : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['BORKED ' ], $ percent_results ['BORKED ' ]) . ' -------- ' ;
3163
3152
}
3164
3153
3165
3154
$ summary .= '
3166
- Tests skipped by ext: ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['SKIPPED_EXT ' ], $ percent_results ['SKIPPED_EXT ' ]) . ' --------
3167
- Tests skipped other : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['SKIPPED ' ], $ percent_results ['SKIPPED ' ]) . ' --------
3168
- Tests warned : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['WARNED ' ], $ percent_results ['WARNED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_warned ) . '
3169
- Tests failed : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['FAILED ' ], $ percent_results ['FAILED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_failed );
3155
+ Tests skipped : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['SKIPPED ' ], $ percent_results ['SKIPPED ' ]) . ' --------
3156
+ Tests warned : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['WARNED ' ], $ percent_results ['WARNED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_warned ) . '
3157
+ Tests failed : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['FAILED ' ], $ percent_results ['FAILED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_failed );
3170
3158
3171
3159
if ($ sum_results ['XFAILED ' ]) {
3172
3160
$ summary .= '
3173
- Expected fail : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['XFAILED ' ], $ percent_results ['XFAILED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_xfailed );
3161
+ Expected fail : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['XFAILED ' ], $ percent_results ['XFAILED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_xfailed );
3174
3162
}
3175
3163
3176
3164
if ($ valgrind ) {
3177
3165
$ summary .= '
3178
- Tests leaked : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['LEAKED ' ], $ percent_results ['LEAKED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_leaked );
3166
+ Tests leaked : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['LEAKED ' ], $ percent_results ['LEAKED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_leaked );
3179
3167
if ($ sum_results ['XLEAKED ' ]) {
3180
3168
$ summary .= '
3181
- Expected leak : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['XLEAKED ' ], $ percent_results ['XLEAKED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_xleaked );
3169
+ Expected leak : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['XLEAKED ' ], $ percent_results ['XLEAKED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_xleaked );
3182
3170
}
3183
3171
}
3184
3172
3185
3173
$ summary .= '
3186
- Tests passed : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['PASSED ' ], $ percent_results ['PASSED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_passed ) . '
3174
+ Tests passed : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['PASSED ' ], $ percent_results ['PASSED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_passed ) . '
3187
3175
---------------------------------------------------------------------
3188
- Time taken : ' . sprintf ('%4d seconds ' , $ end_time - $ start_time ) . '
3176
+ Time taken : ' . sprintf ('%4d seconds ' , $ end_time - $ start_time ) . '
3189
3177
=====================================================================
3190
3178
' ;
3191
3179
$ failed_test_summary = '' ;
@@ -3407,7 +3395,6 @@ class JUnit
3407
3395
'test_fail ' => 0 ,
3408
3396
'test_error ' => 0 ,
3409
3397
'test_skip ' => 0 ,
3410
- 'test_skip_ext ' => 0 ,
3411
3398
'test_warn ' => 0 ,
3412
3399
'files ' => [],
3413
3400
'execution_time ' => 0 ,
@@ -3445,13 +3432,12 @@ public function saveXML(): void
3445
3432
3446
3433
$ xml = '< ' . '? ' . 'xml version="1.0" encoding="UTF-8" ' . '? ' . '> ' . PHP_EOL ;
3447
3434
$ xml .= sprintf (
3448
- '<testsuites name="%s" tests="%s" failures="%d" errors="%d" skip="%d" skip_ext="%d" time="%s"> ' . PHP_EOL ,
3435
+ '<testsuites name="%s" tests="%s" failures="%d" errors="%d" skip="%d" time="%s"> ' . PHP_EOL ,
3449
3436
$ this ->rootSuite ['name ' ],
3450
3437
$ this ->rootSuite ['test_total ' ],
3451
3438
$ this ->rootSuite ['test_fail ' ],
3452
3439
$ this ->rootSuite ['test_error ' ],
3453
3440
$ this ->rootSuite ['test_skip ' ],
3454
- $ this ->rootSuite ['test_skip_ext ' ],
3455
3441
$ this ->rootSuite ['execution_time ' ]
3456
3442
);
3457
3443
$ xml .= $ this ->getSuitesXML ();
@@ -3466,13 +3452,12 @@ private function getSuitesXML(string $suite_name = '')
3466
3452
3467
3453
foreach ($ this ->suites as $ suite_name => $ suite ) {
3468
3454
$ result .= sprintf (
3469
- '<testsuite name="%s" tests="%s" failures="%d" errors="%d" skip="%d" skip_ext="%d" time="%s"> ' . PHP_EOL ,
3455
+ '<testsuite name="%s" tests="%s" failures="%d" errors="%d" skip="%d" time="%s"> ' . PHP_EOL ,
3470
3456
$ suite ['name ' ],
3471
3457
$ suite ['test_total ' ],
3472
3458
$ suite ['test_fail ' ],
3473
3459
$ suite ['test_error ' ],
3474
3460
$ suite ['test_skip ' ],
3475
- $ suite ['test_skip_ext ' ],
3476
3461
$ suite ['execution_time ' ]
3477
3462
);
3478
3463
@@ -3532,9 +3517,6 @@ public function markTestAs(
3532
3517
} elseif ('SKIP ' == $ type ) {
3533
3518
$ this ->record ($ suite , 'test_skip ' );
3534
3519
$ this ->rootSuite ['files ' ][$ file_name ]['xml ' ] .= "<skipped> $ escaped_message</skipped> \n" ;
3535
- } elseif ('SKIP_EXP ' == $ type ) {
3536
- $ this ->record ($ suite , 'test_skip_ext ' );
3537
- $ this ->rootSuite ['files ' ][$ file_name ]['xml ' ] .= "<skipped_ext> $ escaped_message</skipped_ext> \n" ;
3538
3520
} elseif ('WARN ' == $ type ) {
3539
3521
$ this ->record ($ suite , 'test_warn ' );
3540
3522
$ this ->rootSuite ['files ' ][$ file_name ]['xml ' ] .= "<warning> $ escaped_message</warning> \n" ;
@@ -3678,7 +3660,6 @@ private function mergeSuites(array &$dest, array $source): void
3678
3660
$ dest ['test_fail ' ] += $ source ['test_fail ' ];
3679
3661
$ dest ['test_error ' ] += $ source ['test_error ' ];
3680
3662
$ dest ['test_skip ' ] += $ source ['test_skip ' ];
3681
- $ dest ['test_skip_ext ' ] += $ source ['test_skip_ext ' ];
3682
3663
$ dest ['test_warn ' ] += $ source ['test_warn ' ];
3683
3664
$ dest ['execution_time ' ] += $ source ['execution_time ' ];
3684
3665
$ dest ['files ' ] += $ source ['files ' ];
0 commit comments