@@ -87,13 +87,9 @@ function show_usage()
87
87
--help
88
88
-h This Help.
89
89
90
- --html <file> Generate HTML output.
91
-
92
90
--temp-source <sdir> --temp-target <tdir> [--temp-urlbase <url>]
93
91
Write temporary files to <tdir> by replacing <sdir> from the
94
- filenames to generate with <tdir>. If --html is being used and
95
- <url> given then the generated links are relative and prefixed
96
- with the given url. In general you want to make <sdir> the path
92
+ filenames to generate with <tdir>. In general you want to make <sdir> the path
97
93
to your source files and <tdir> some patch in your web page
98
94
hierarchy with <url> pointing to <tdir>.
99
95
@@ -137,7 +133,7 @@ function main()
137
133
global $ DETAILED , $ PHP_FAILED_TESTS , $ SHOW_ONLY_GROUPS , $ argc , $ argv , $ cfg ,
138
134
$ cfgfiles , $ cfgtypes , $ conf_passed , $ end_time , $ environment ,
139
135
$ exts_skipped , $ exts_tested , $ exts_to_test , $ failed_tests_file ,
140
- $ html_file , $ html_output , $ ignored_by_ext , $ ini_overwrites , $ is_switch ,
136
+ $ ignored_by_ext , $ ini_overwrites , $ is_switch ,
141
137
$ just_save_results , $ log_format , $ matches , $ no_clean , $ no_file_cache ,
142
138
$ optionals , $ output_file , $ pass_option_n , $ pass_options ,
143
139
$ pattern_match , $ php , $ php_cgi , $ phpdbg , $ preload , $ redir_tests ,
@@ -378,8 +374,6 @@ function main()
378
374
379
375
$ just_save_results = false ;
380
376
$ valgrind = null ;
381
- $ html_output = false ;
382
- $ html_file = null ;
383
377
$ temp_source = null ;
384
378
$ temp_target = null ;
385
379
$ temp_urlbase = null ;
@@ -606,10 +600,6 @@ function main()
606
600
$ repeat = true ;
607
601
}
608
602
break ;
609
- case '--html ' :
610
- $ html_file = fopen ($ argv [++$ i ], 'wt ' );
611
- $ html_output = is_resource ($ html_file );
612
- break ;
613
603
case '--version ' :
614
604
echo '$Id$ ' . "\n" ;
615
605
exit (1 );
@@ -691,20 +681,12 @@ function main()
691
681
usort ($ test_files , "test_sort " );
692
682
$ start_time = time ();
693
683
694
- if (!$ html_output ) {
695
- echo "Running selected tests. \n" ;
696
- } else {
697
- show_start ($ start_time );
698
- }
684
+ echo "Running selected tests. \n" ;
699
685
700
686
$ test_idx = 0 ;
701
687
run_all_tests ($ test_files , $ environment );
702
688
$ end_time = time ();
703
689
704
- if ($ html_output ) {
705
- show_end ($ end_time );
706
- }
707
-
708
690
if ($ failed_tests_file ) {
709
691
fclose ($ failed_tests_file );
710
692
}
@@ -719,16 +701,9 @@ function main()
719
701
}
720
702
721
703
compute_summary ();
722
- if ($ html_output ) {
723
- fwrite ($ html_file , "<hr/> \n" . get_summary (false , true ));
724
- }
725
704
echo "===================================================================== " ;
726
705
echo get_summary (false , false );
727
706
728
- if ($ html_output ) {
729
- fclose ($ html_file );
730
- }
731
-
732
707
if ($ output_file != '' && $ just_save_results ) {
733
708
save_or_mail_results ();
734
709
}
@@ -792,10 +767,6 @@ function main()
792
767
show_end ($ end_time );
793
768
show_summary ();
794
769
795
- if ($ html_output ) {
796
- fclose ($ html_file );
797
- }
798
-
799
770
save_or_mail_results ();
800
771
}
801
772
@@ -3014,7 +2985,7 @@ function compute_summary()
3014
2985
}
3015
2986
}
3016
2987
3017
- function get_summary ($ show_ext_summary, $ show_html )
2988
+ function get_summary ($ show_ext_summary )
3018
2989
{
3019
2990
global $ exts_skipped , $ exts_tested , $ n_total , $ sum_results , $ percent_results , $ end_time , $ start_time , $ failed_test_summary , $ PHP_FAILED_TESTS , $ valgrind ;
3020
2991
@@ -3033,10 +3004,6 @@ function get_summary($show_ext_summary, $show_html)
3033
3004
3034
3005
$ summary = '' ;
3035
3006
3036
- if ($ show_html ) {
3037
- $ summary .= "<pre> \n" ;
3038
- }
3039
-
3040
3007
if ($ show_ext_summary ) {
3041
3008
$ summary .= '
3042
3009
=====================================================================
@@ -3178,55 +3145,27 @@ function get_summary($show_ext_summary, $show_html)
3178
3145
$ summary .= $ failed_test_summary ;
3179
3146
}
3180
3147
3181
- if ($ show_html ) {
3182
- $ summary .= "</pre> " ;
3183
- }
3184
-
3185
3148
return $ summary ;
3186
3149
}
3187
3150
3188
3151
function show_start ($ start_time )
3189
3152
{
3190
- global $ html_output , $ html_file ;
3191
-
3192
- if ($ html_output ) {
3193
- fwrite ($ html_file , "<h2>Time Start: " . date ('Y-m-d H:i:s ' , $ start_time ) . "</h2> \n" );
3194
- fwrite ($ html_file , "<table> \n" );
3195
- }
3196
-
3197
3153
echo "TIME START " . date ('Y-m-d H:i:s ' , $ start_time ) . "\n===================================================================== \n" ;
3198
3154
}
3199
3155
3200
3156
function show_end ($ end_time )
3201
3157
{
3202
- global $ html_output , $ html_file ;
3203
-
3204
- if ($ html_output ) {
3205
- fwrite ($ html_file , "</table> \n" );
3206
- fwrite ($ html_file , "<h2>Time End: " . date ('Y-m-d H:i:s ' , $ end_time ) . "</h2> \n" );
3207
- }
3208
-
3209
3158
echo "===================================================================== \nTIME END " . date ('Y-m-d H:i:s ' , $ end_time ) . "\n" ;
3210
3159
}
3211
3160
3212
3161
function show_summary ()
3213
3162
{
3214
- global $ html_output , $ html_file ;
3215
-
3216
- if ($ html_output ) {
3217
- fwrite ($ html_file , "<hr/> \n" . get_summary (true , true ));
3218
- }
3219
-
3220
3163
echo get_summary (true , false );
3221
3164
}
3222
3165
3223
3166
function show_redirect_start ($ tests , $ tested , $ tested_file )
3224
3167
{
3225
- global $ html_output , $ html_file , $ line_length , $ SHOW_ONLY_GROUPS ;
3226
-
3227
- if ($ html_output ) {
3228
- fwrite ($ html_file , "<tr><td colspan='3'>---> $ tests ( $ tested [ $ tested_file]) begin</td></tr> \n" );
3229
- }
3168
+ global $ SHOW_ONLY_GROUPS ;
3230
3169
3231
3170
if (!$ SHOW_ONLY_GROUPS || in_array ('REDIRECT ' , $ SHOW_ONLY_GROUPS )) {
3232
3171
echo "REDIRECT $ tests ( $ tested [ $ tested_file]) begin \n" ;
@@ -3237,11 +3176,7 @@ function show_redirect_start($tests, $tested, $tested_file)
3237
3176
3238
3177
function show_redirect_ends ($ tests , $ tested , $ tested_file )
3239
3178
{
3240
- global $ html_output , $ html_file , $ line_length , $ SHOW_ONLY_GROUPS ;
3241
-
3242
- if ($ html_output ) {
3243
- fwrite ($ html_file , "<tr><td colspan='3'>---> $ tests ( $ tested [ $ tested_file]) done</td></tr> \n" );
3244
- }
3179
+ global $ SHOW_ONLY_GROUPS ;
3245
3180
3246
3181
if (!$ SHOW_ONLY_GROUPS || in_array ('REDIRECT ' , $ SHOW_ONLY_GROUPS )) {
3247
3182
echo "REDIRECT $ tests ( $ tested [ $ tested_file]) done \n" ;
@@ -3282,56 +3217,14 @@ function parse_conflicts(string $text): array
3282
3217
3283
3218
function show_result ($ result , $ tested , $ tested_file , $ extra = '' , $ temp_filenames = null )
3284
3219
{
3285
- global $ html_output , $ html_file , $ temp_target , $ temp_urlbase , $ line_length , $ SHOW_ONLY_GROUPS ;
3220
+ global $ temp_target , $ temp_urlbase , $ line_length , $ SHOW_ONLY_GROUPS ;
3286
3221
3287
3222
if (!$ SHOW_ONLY_GROUPS || in_array ($ result , $ SHOW_ONLY_GROUPS )) {
3288
3223
echo "$ result $ tested [ $ tested_file] $ extra \n" ;
3289
3224
} elseif (!$ SHOW_ONLY_GROUPS ) {
3290
3225
clear_show_test ();
3291
3226
}
3292
3227
3293
- if ($ html_output ) {
3294
- if (isset ($ temp_filenames ['file ' ]) && file_exists ($ temp_filenames ['file ' ])) {
3295
- $ url = str_replace ($ temp_target , $ temp_urlbase , $ temp_filenames ['file ' ]);
3296
- $ tested = "<a href=' $ url'> $ tested</a> " ;
3297
- }
3298
-
3299
- if (isset ($ temp_filenames ['skip ' ]) && file_exists ($ temp_filenames ['skip ' ])) {
3300
- if (empty ($ extra )) {
3301
- $ extra = "skipif " ;
3302
- }
3303
-
3304
- $ url = str_replace ($ temp_target , $ temp_urlbase , $ temp_filenames ['skip ' ]);
3305
- $ extra = "<a href=' $ url'> $ extra</a> " ;
3306
- } elseif (empty ($ extra )) {
3307
- $ extra = " " ;
3308
- }
3309
-
3310
- if (isset ($ temp_filenames ['diff ' ]) && file_exists ($ temp_filenames ['diff ' ])) {
3311
- $ url = str_replace ($ temp_target , $ temp_urlbase , $ temp_filenames ['diff ' ]);
3312
- $ diff = "<a href=' $ url'>diff</a> " ;
3313
- } else {
3314
- $ diff = " " ;
3315
- }
3316
-
3317
- if (isset ($ temp_filenames ['mem ' ]) && file_exists ($ temp_filenames ['mem ' ])) {
3318
- $ url = str_replace ($ temp_target , $ temp_urlbase , $ temp_filenames ['mem ' ]);
3319
- $ mem = "<a href=' $ url'>leaks</a> " ;
3320
- } else {
3321
- $ mem = " " ;
3322
- }
3323
-
3324
- fwrite (
3325
- $ html_file ,
3326
- "<tr> " .
3327
- "<td> $ result</td> " .
3328
- "<td> $ tested</td> " .
3329
- "<td> $ extra</td> " .
3330
- "<td> $ diff</td> " .
3331
- "<td> $ mem</td> " .
3332
- "</tr> \n"
3333
- );
3334
- }
3335
3228
}
3336
3229
3337
3230
function junit_init ()
0 commit comments