Skip to content

Commit 4a42ca3

Browse files
committed
Modernization of run-tests.php
1 parent 33a0632 commit 4a42ca3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

run-tests.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ function main()
446446
break;
447447
case 'r':
448448
case 'l':
449+
// @Dragoonis
449450
$test_list = file($argv[++$i]);
450451
if ($test_list) {
451452
foreach ($test_list as $test) {
@@ -1071,7 +1072,7 @@ function test_sort($a, $b)
10711072
// Send Email to QA Team
10721073
//
10731074

1074-
function mail_qa_team($data, $status = false)
1075+
function mail_qa_team($data, $status = false): bool
10751076
{
10761077
$url_bits = parse_url(QA_SUBMISSION_PAGE);
10771078

@@ -1110,7 +1111,7 @@ function mail_qa_team($data, $status = false)
11101111
fwrite($fs, "\r\n\r\n");
11111112
fclose($fs);
11121113

1113-
return 1;
1114+
return true;
11141115
}
11151116

11161117
//
@@ -1633,15 +1634,15 @@ function run_all_tests_parallel($test_files, $env, $redir_tested)
16331634
}
16341635
}
16351636

1636-
function send_message($stream, array $message)
1637+
function send_message($stream, array $message): void
16371638
{
16381639
$blocking = stream_get_meta_data($stream)["blocked"];
16391640
stream_set_blocking($stream, true);
16401641
fwrite($stream, base64_encode(serialize($message)) . "\n");
16411642
stream_set_blocking($stream, $blocking);
16421643
}
16431644

1644-
function kill_children(array $children)
1645+
function kill_children(array $children): void
16451646
{
16461647
foreach ($children as $child) {
16471648
if ($child) {
@@ -1650,7 +1651,7 @@ function kill_children(array $children)
16501651
}
16511652
}
16521653

1653-
function run_worker($workerID)
1654+
function run_worker($workerID): void
16541655
{
16551656
global $workerSock;
16561657

0 commit comments

Comments
 (0)