run-tests.php
Interfaces, Classes, Traits and Enums
Table of Contents
- INIT_DIR = getcwd()
- IS_WINDOWS = substr(PHP_OS, 0, 3) == "WIN"
- PHP_QA_EMAIL = 'qa-reports@lists.php.net'
- QA_REPORTS_PAGE = 'http://qa.php.net/reports'
- QA_SUBMISSION_PAGE = 'http://qa.php.net/buildtest-process.php'
- TEST_PHP_SRCDIR = getcwd()
- TESTED_PHP_VERSION = `{$php} -n -r "echo PHP_VERSION;"`
- TRAVIS_CI = (bool) getenv('TRAVIS')
- show_usage() : void
- main() : void
- One function to rule them all, one function to find them, one function to bring them all and in the darkness bind them.
- hrtime() : array<string|int, mixed>|float|int
- verify_config() : void
- write_information() : void
- save_or_mail_results() : void
- find_files() : void
- test_name() : string
- test_sort() : int
- mail_qa_team() : bool
- save_text() : void
- error_report() : void
- system_with_timeout() : false|string
- run_all_tests() : void
- run_all_tests_parallel() : void
- The heart of parallel testing.
- send_message() : void
- kill_children() : void
- run_worker() : void
- show_file_block() : void
- run_test() : string
- comp_line() : bool|int
- count_array_diff() : int
- generate_array_diff() : array<string|int, mixed>
- generate_diff() : string
- error() : void
- settings2array() : void
- settings2params() : string
- compute_summary() : void
- get_summary() : string
- show_start() : void
- show_end() : void
- show_summary() : void
- show_redirect_start() : void
- show_redirect_ends() : void
- show_test() : void
- clear_show_test() : void
- parse_conflicts() : array<string|int, mixed>
- show_result() : void
- junit_init() : void
- junit_save_xml() : void
- junit_get_suite_xml() : string
- junit_enabled() : bool
- junit_mark_test_as() : void
- junit_suite_record() : void
- junit_get_timer() : float
- junit_start_timer() : void
- junit_get_suitename_for() : string
- junit_path_to_classname() : string
- junit_init_suite() : void
- junit_finish_timer() : void
- junit_merge_results() : void
- init_output_buffers() : void
- check_proc_open_function_exists() : void
Constants
INIT_DIR
public
mixed
INIT_DIR
= getcwd()
IS_WINDOWS
public
mixed
IS_WINDOWS
= substr(PHP_OS, 0, 3) == "WIN"
PHP_QA_EMAIL
public
mixed
PHP_QA_EMAIL
= 'qa-reports@lists.php.net'
QA_REPORTS_PAGE
public
mixed
QA_REPORTS_PAGE
= 'http://qa.php.net/reports'
QA_SUBMISSION_PAGE
public
mixed
QA_SUBMISSION_PAGE
= 'http://qa.php.net/buildtest-process.php'
TEST_PHP_SRCDIR
public
mixed
TEST_PHP_SRCDIR
= getcwd()
TESTED_PHP_VERSION
public
mixed
TESTED_PHP_VERSION
= `{$php} -n -r "echo PHP_VERSION;"`
TRAVIS_CI
public
mixed
TRAVIS_CI
= (bool) getenv('TRAVIS')
Functions
show_usage()
show_usage() : void
Return values
void —main()
One function to rule them all, one function to find them, one function to bring them all and in the darkness bind them.
main() : void
This is the entry point and exit point überfunction. It contains all the code that was previously found at the top level. It could and should be refactored to be smaller and more manageable.
Return values
void —hrtime()
hrtime([bool $as_num = false ]) : array<string|int, mixed>|float|int
Parameters
- $as_num : bool = false
Return values
array<string|int, mixed>|float|int —verify_config()
verify_config() : void
Return values
void —write_information()
write_information() : void
Return values
void —save_or_mail_results()
save_or_mail_results() : void
Return values
void —find_files()
find_files(string $dir[, bool $is_ext_dir = false ][, bool $ignore = false ]) : void
Parameters
- $dir : string
- $is_ext_dir : bool = false
- $ignore : bool = false
Return values
void —test_name()
test_name(array<string|int, mixed>|string $name) : string
Parameters
- $name : array<string|int, mixed>|string
Return values
string —test_sort()
test_sort(array<string|int, mixed>|string $a, array<string|int, mixed>|string $b) : int
Parameters
- $a : array<string|int, mixed>|string
- $b : array<string|int, mixed>|string
Return values
int —mail_qa_team()
mail_qa_team(string $data[, bool $status = false ]) : bool
Parameters
- $data : string
- $status : bool = false
Return values
bool —save_text()
save_text(string $filename, string $text[, string|null $filename_copy = null ]) : void
Parameters
- $filename : string
- $text : string
- $filename_copy : string|null = null
Return values
void —error_report()
error_report(string $testname, string $logname, string $tested) : void
Parameters
- $testname : string
- $logname : string
- $tested : string
Return values
void —system_with_timeout()
system_with_timeout(string $commandline[, array<string|int, mixed>|null $env = null ][, string|null $stdin = null ][, bool $captureStdIn = true ][, bool $captureStdOut = true ][, bool $captureStdErr = true ]) : false|string
Parameters
- $commandline : string
- $env : array<string|int, mixed>|null = null
- $stdin : string|null = null
- $captureStdIn : bool = true
- $captureStdOut : bool = true
- $captureStdErr : bool = true
Return values
false|string —run_all_tests()
run_all_tests(array<string|int, mixed> $test_files, array<string|int, mixed> $env[, string|array<string|int, mixed>|null $redir_tested = null ]) : void
Parameters
- $test_files : array<string|int, mixed>
- $env : array<string|int, mixed>
- $redir_tested : string|array<string|int, mixed>|null = null
Return values
void —run_all_tests_parallel()
The heart of parallel testing.
run_all_tests_parallel(array<string|int, mixed> $test_files, array<string|int, mixed> $env, string|array<string|int, mixed>|null $redir_tested) : void
Parameters
- $test_files : array<string|int, mixed>
- $env : array<string|int, mixed>
- $redir_tested : string|array<string|int, mixed>|null
Return values
void —send_message()
send_message(mixed $stream, array<string|int, mixed> $message) : void
Parameters
- $stream : mixed
- $message : array<string|int, mixed>
Return values
void —kill_children()
kill_children(array<string|int, mixed> $children) : void
Parameters
- $children : array<string|int, mixed>
Return values
void —run_worker()
run_worker() : void
Return values
void —show_file_block()
show_file_block(string $file, string $block[, string|null $section = null ]) : void
Parameters
- $file : string
- $block : string
- $section : string|null = null
Return values
void —run_test()
run_test(string $php, string|array<string|int, mixed> $file, array<string|int, mixed> $env) : string
Parameters
- $php : string
- $file : string|array<string|int, mixed>
- $env : array<string|int, mixed>
Return values
string —comp_line()
comp_line(string $l1, string $l2, bool $is_reg) : bool|int
Parameters
- $l1 : string
- $l2 : string
- $is_reg : bool
Return values
bool|int —count_array_diff()
count_array_diff(array<string|int, mixed> $ar1, array<string|int, mixed> $ar2, bool $is_reg, array<string|int, mixed> $w, int $idx1, int $idx2, int $cnt1, int $cnt2, int $steps) : int
Parameters
- $ar1 : array<string|int, mixed>
- $ar2 : array<string|int, mixed>
- $is_reg : bool
- $w : array<string|int, mixed>
- $idx1 : int
- $idx2 : int
- $cnt1 : int
- $cnt2 : int
- $steps : int
Return values
int —generate_array_diff()
generate_array_diff(array<string|int, mixed> $ar1, array<string|int, mixed> $ar2, bool $is_reg, array<string|int, mixed> $w) : array<string|int, mixed>
Parameters
- $ar1 : array<string|int, mixed>
- $ar2 : array<string|int, mixed>
- $is_reg : bool
- $w : array<string|int, mixed>
Return values
array<string|int, mixed> —generate_diff()
generate_diff(string $wanted, string|null $wanted_re, string $output) : string
Parameters
- $wanted : string
- $wanted_re : string|null
- $output : string
Return values
string —error()
error(string $message) : void
Parameters
- $message : string
Return values
void —settings2array()
settings2array(array<string|int, mixed> $settings, mixed &$ini_settings) : void
Parameters
- $settings : array<string|int, mixed>
- $ini_settings : mixed
Return values
void —settings2params()
settings2params(array<string|int, mixed> $ini_settings) : string
Parameters
- $ini_settings : array<string|int, mixed>
Return values
string —compute_summary()
compute_summary() : void
Return values
void —get_summary()
get_summary(bool $show_ext_summary) : string
Parameters
- $show_ext_summary : bool
Return values
string —show_start()
show_start(mixed $start_time) : void
Parameters
- $start_time : mixed
Return values
void —show_end()
show_end(mixed $end_time) : void
Parameters
- $end_time : mixed
Return values
void —show_summary()
show_summary() : void
Return values
void —show_redirect_start()
show_redirect_start(string $tests, string $tested, string $tested_file) : void
Parameters
- $tests : string
- $tested : string
- $tested_file : string
Return values
void —show_redirect_ends()
show_redirect_ends(string $tests, string $tested, string $tested_file) : void
Parameters
- $tests : string
- $tested : string
- $tested_file : string
Return values
void —show_test()
show_test(int $test_idx, string $shortname) : void
Parameters
- $test_idx : int
- $shortname : string
Return values
void —clear_show_test()
clear_show_test() : void
Return values
void —parse_conflicts()
parse_conflicts(string $text) : array<string|int, mixed>
Parameters
- $text : string
Return values
array<string|int, mixed> —show_result()
show_result(string $result, string $tested, string $tested_file[, string $extra = '' ][, array<string|int, mixed>|null $temp_filenames = null ]) : void
Parameters
- $result : string
- $tested : string
- $tested_file : string
- $extra : string = ''
- $temp_filenames : array<string|int, mixed>|null = null
Return values
void —junit_init()
junit_init() : void
Return values
void —junit_save_xml()
junit_save_xml() : void
Return values
void —junit_get_suite_xml()
junit_get_suite_xml([string $suite_name = '' ]) : string
Parameters
- $suite_name : string = ''
Return values
string —junit_enabled()
junit_enabled() : bool
Return values
bool —junit_mark_test_as()
junit_mark_test_as(array<string|int, mixed>|string $type, string $file_name, string $test_name[, float|null $time = null ][, string $message = '' ][, string $details = '' ]) : void
Parameters
- $type : array<string|int, mixed>|string
- $file_name : string
- $test_name : string
- $time : float|null = null
- $message : string = ''
- $details : string = ''
Return values
void —junit_suite_record()
junit_suite_record(string $suite, string $param[, float $value = 1 ]) : void
Parameters
- $suite : string
- $param : string
- $value : float = 1
Return values
void —junit_get_timer()
junit_get_timer(string $file_name) : float
Parameters
- $file_name : string
Return values
float —junit_start_timer()
junit_start_timer(string $file_name) : void
Parameters
- $file_name : string
Return values
void —junit_get_suitename_for()
junit_get_suitename_for(string $file_name) : string
Parameters
- $file_name : string
Return values
string —junit_path_to_classname()
junit_path_to_classname(string $file_name) : string
Parameters
- $file_name : string
Return values
string —junit_init_suite()
junit_init_suite(string $suite_name) : void
Parameters
- $suite_name : string
Return values
void —junit_finish_timer()
junit_finish_timer(string $file_name) : void
Parameters
- $file_name : string
Return values
void —junit_merge_results()
junit_merge_results(array<string|int, mixed> $junit) : void
Parameters
- $junit : array<string|int, mixed>
Return values
void —init_output_buffers()
init_output_buffers() : void
Return values
void —check_proc_open_function_exists()
check_proc_open_function_exists() : void