@@ -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
@@ -1768,18 +1768,6 @@ function skip_test(string $tested, string $tested_file, string $shortname, strin
1768
1768
return 'SKIPPED ' ;
1769
1769
}
1770
1770
1771
- function skip_ext_test (string $ tested , string $ tested_file , string $ shortname , array $ missing_exts ) {
1772
- global $ junit ;
1773
-
1774
- $ reason = 'Required extension ' . (count ($ missing_exts ) > 1 ? 's ' : '' )
1775
- . ' missing: ' . implode (', ' , $ missing_exts );
1776
-
1777
- show_result ('SKIP_EXT ' , $ tested , $ tested_file , "reason: $ reason " );
1778
- $ junit ->initSuite ($ junit ->getSuiteName ($ shortname ));
1779
- $ junit ->markTestAs ('SKIP_EXT ' , $ shortname , $ tested , 0 , $ reason );
1780
- return 'SKIPPED_EXT ' ;
1781
- }
1782
-
1783
1771
//
1784
1772
// Run an individual test case.
1785
1773
//
@@ -2049,7 +2037,9 @@ function run_test(string $php, $file, array $env): string
2049
2037
}
2050
2038
}
2051
2039
if ($ missing ) {
2052
- return skip_ext_test ($ tested , $ tested_file , $ shortname , $ missing );
2040
+ $ message = 'Required extension ' . (count ($ missing ) > 1 ? 's ' : '' )
2041
+ . ' missing: ' . implode (', ' , $ missing );
2042
+ return skip_test ($ tested , $ tested_file , $ shortname , $ message );
2053
2043
}
2054
2044
}
2055
2045
@@ -3041,7 +3031,6 @@ function compute_summary(): void
3041
3031
'PASSED ' => 0 ,
3042
3032
'WARNED ' => 0 ,
3043
3033
'SKIPPED ' => 0 ,
3044
- 'SKIPPED_EXT ' => 0 ,
3045
3034
'FAILED ' => 0 ,
3046
3035
'BORKED ' => 0 ,
3047
3036
'LEAKED ' => 0 ,
@@ -3064,7 +3053,7 @@ function get_summary(bool $show_ext_summary): string
3064
3053
{
3065
3054
global $ n_total , $ sum_results , $ percent_results , $ end_time , $ start_time , $ failed_test_summary , $ PHP_FAILED_TESTS , $ valgrind ;
3066
3055
3067
- $ x_total = $ n_total - $ sum_results ['SKIPPED ' ] - $ sum_results ['SKIPPED_EXT ' ] - $ sum_results [ ' BORKED ' ];
3056
+ $ x_total = $ n_total - $ sum_results ['SKIPPED ' ] - $ sum_results ['BORKED ' ];
3068
3057
3069
3058
if ($ x_total ) {
3070
3059
$ x_warned = (100.0 * $ sum_results ['WARNED ' ]) / $ x_total ;
@@ -3088,37 +3077,36 @@ function get_summary(bool $show_ext_summary): string
3088
3077
}
3089
3078
3090
3079
$ summary .=
3091
- 'Number of tests : ' . sprintf ('%4d ' , $ n_total ) . ' ' . sprintf ('%8d ' , $ x_total );
3080
+ 'Number of tests : ' . sprintf ('%4d ' , $ n_total ) . ' ' . sprintf ('%8d ' , $ x_total );
3092
3081
3093
3082
if ($ sum_results ['BORKED ' ]) {
3094
3083
$ summary .= '
3095
- Tests borked : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['BORKED ' ], $ percent_results ['BORKED ' ]) . ' -------- ' ;
3084
+ Tests borked : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['BORKED ' ], $ percent_results ['BORKED ' ]) . ' -------- ' ;
3096
3085
}
3097
3086
3098
3087
$ summary .= '
3099
- Tests skipped by ext: ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['SKIPPED_EXT ' ], $ percent_results ['SKIPPED_EXT ' ]) . ' --------
3100
- Tests skipped other : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['SKIPPED ' ], $ percent_results ['SKIPPED ' ]) . ' --------
3101
- Tests warned : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['WARNED ' ], $ percent_results ['WARNED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_warned ) . '
3102
- Tests failed : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['FAILED ' ], $ percent_results ['FAILED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_failed );
3088
+ Tests skipped : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['SKIPPED ' ], $ percent_results ['SKIPPED ' ]) . ' --------
3089
+ Tests warned : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['WARNED ' ], $ percent_results ['WARNED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_warned ) . '
3090
+ Tests failed : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['FAILED ' ], $ percent_results ['FAILED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_failed );
3103
3091
3104
3092
if ($ sum_results ['XFAILED ' ]) {
3105
3093
$ summary .= '
3106
- Expected fail : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['XFAILED ' ], $ percent_results ['XFAILED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_xfailed );
3094
+ Expected fail : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['XFAILED ' ], $ percent_results ['XFAILED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_xfailed );
3107
3095
}
3108
3096
3109
3097
if ($ valgrind ) {
3110
3098
$ summary .= '
3111
- Tests leaked : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['LEAKED ' ], $ percent_results ['LEAKED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_leaked );
3099
+ Tests leaked : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['LEAKED ' ], $ percent_results ['LEAKED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_leaked );
3112
3100
if ($ sum_results ['XLEAKED ' ]) {
3113
3101
$ summary .= '
3114
- Expected leak : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['XLEAKED ' ], $ percent_results ['XLEAKED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_xleaked );
3102
+ Expected leak : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['XLEAKED ' ], $ percent_results ['XLEAKED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_xleaked );
3115
3103
}
3116
3104
}
3117
3105
3118
3106
$ summary .= '
3119
- Tests passed : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['PASSED ' ], $ percent_results ['PASSED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_passed ) . '
3107
+ Tests passed : ' . sprintf ('%4d (%5.1f%%) ' , $ sum_results ['PASSED ' ], $ percent_results ['PASSED ' ]) . ' ' . sprintf ('(%5.1f%%) ' , $ x_passed ) . '
3120
3108
---------------------------------------------------------------------
3121
- Time taken : ' . sprintf ('%4d seconds ' , $ end_time - $ start_time ) . '
3109
+ Time taken : ' . sprintf ('%4d seconds ' , $ end_time - $ start_time ) . '
3122
3110
=====================================================================
3123
3111
' ;
3124
3112
$ failed_test_summary = '' ;
@@ -3339,7 +3327,6 @@ class JUnit
3339
3327
'test_fail ' => 0 ,
3340
3328
'test_error ' => 0 ,
3341
3329
'test_skip ' => 0 ,
3342
- 'test_skip_ext ' => 0 ,
3343
3330
'test_warn ' => 0 ,
3344
3331
'files ' => [],
3345
3332
'execution_time ' => 0 ,
@@ -3380,13 +3367,12 @@ public function saveXML(): void
3380
3367
3381
3368
$ xml = '< ' . '? ' . 'xml version="1.0" encoding="UTF-8" ' . '? ' . '> ' . PHP_EOL ;
3382
3369
$ xml .= sprintf (
3383
- '<testsuites name="%s" tests="%s" failures="%d" errors="%d" skip="%d" skip_ext="%d" time="%s"> ' . PHP_EOL ,
3370
+ '<testsuites name="%s" tests="%s" failures="%d" errors="%d" skip="%d" time="%s"> ' . PHP_EOL ,
3384
3371
$ this ->rootSuite ['name ' ],
3385
3372
$ this ->rootSuite ['test_total ' ],
3386
3373
$ this ->rootSuite ['test_fail ' ],
3387
3374
$ this ->rootSuite ['test_error ' ],
3388
3375
$ this ->rootSuite ['test_skip ' ],
3389
- $ this ->rootSuite ['test_skip_ext ' ],
3390
3376
$ this ->rootSuite ['execution_time ' ]
3391
3377
);
3392
3378
$ xml .= $ this ->getSuitesXML ();
@@ -3401,13 +3387,12 @@ private function getSuitesXML(string $suite_name = '')
3401
3387
3402
3388
foreach ($ this ->suites as $ suite_name => $ suite ) {
3403
3389
$ result .= sprintf (
3404
- '<testsuite name="%s" tests="%s" failures="%d" errors="%d" skip="%d" skip_ext="%d" time="%s"> ' . PHP_EOL ,
3390
+ '<testsuite name="%s" tests="%s" failures="%d" errors="%d" skip="%d" time="%s"> ' . PHP_EOL ,
3405
3391
$ suite ['name ' ],
3406
3392
$ suite ['test_total ' ],
3407
3393
$ suite ['test_fail ' ],
3408
3394
$ suite ['test_error ' ],
3409
3395
$ suite ['test_skip ' ],
3410
- $ suite ['test_skip_ext ' ],
3411
3396
$ suite ['execution_time ' ]
3412
3397
);
3413
3398
@@ -3467,9 +3452,6 @@ public function markTestAs(
3467
3452
} elseif ('SKIP ' == $ type ) {
3468
3453
$ this ->record ($ suite , 'test_skip ' );
3469
3454
$ this ->rootSuite ['files ' ][$ file_name ]['xml ' ] .= "<skipped> $ escaped_message</skipped> \n" ;
3470
- } elseif ('SKIP_EXP ' == $ type ) {
3471
- $ this ->record ($ suite , 'test_skip_ext ' );
3472
- $ this ->rootSuite ['files ' ][$ file_name ]['xml ' ] .= "<skipped_ext> $ escaped_message</skipped_ext> \n" ;
3473
3455
} elseif ('WARN ' == $ type ) {
3474
3456
$ this ->record ($ suite , 'test_warn ' );
3475
3457
$ this ->rootSuite ['files ' ][$ file_name ]['xml ' ] .= "<warning> $ escaped_message</warning> \n" ;
@@ -3616,7 +3598,6 @@ private function mergeSuites(array &$dest, array $source): void
3616
3598
$ dest ['test_fail ' ] += $ source ['test_fail ' ];
3617
3599
$ dest ['test_error ' ] += $ source ['test_error ' ];
3618
3600
$ dest ['test_skip ' ] += $ source ['test_skip ' ];
3619
- $ dest ['test_skip_ext ' ] += $ source ['test_skip_ext ' ];
3620
3601
$ dest ['test_warn ' ] += $ source ['test_warn ' ];
3621
3602
$ dest ['execution_time ' ] += $ source ['execution_time ' ];
3622
3603
$ dest ['files ' ] += $ source ['files ' ];
0 commit comments