summaryrefslogtreecommitdiffstats
path: root/952.patch
blob: 3cba6f5d906e39bd60ee835e278dc6123f6afe13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From 7720c13ed242e87ce1e934f80378a6f145ebd769 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 9 Jul 2020 07:50:18 +0200
Subject: [PATCH 1/2] improve CGI usage

---
 tests/ext/startup_logging.inc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/ext/startup_logging.inc b/tests/ext/startup_logging.inc
index 17235e11e..869e65da5 100644
--- a/tests/ext/startup_logging.inc
+++ b/tests/ext/startup_logging.inc
@@ -2,8 +2,12 @@
 
 function dd_get_php_cgi()
 {
-    $executable = dirname(getenv('TEST_PHP_EXECUTABLE')) . '/php-cgi';
-    return file_exists($executable) && is_executable($executable) ? $executable : '';
+    $executable = getenv('TEST_PHP_CGI_EXECUTABLE') ?: getenv('TEST_PHP_EXECUTABLE') . '-cgi';
+    if (file_exists($executable) && is_executable($executable)) {
+		$args = getenv('TEST_PHP_ARGS');
+		return $args ? "$executable $args" : "$executable";
+	}
+	return '';
 }
 
 function dd_get_startup_logs(array $args = [], array $env = [])

From 60396869f4ee09a68d532d40a5e72c4c0cfcc102 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 9 Jul 2020 08:09:50 +0200
Subject: [PATCH 2/2] relax test expectation

---
 tests/ext/startup_logging_diagnostics.phpt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/ext/startup_logging_diagnostics.phpt b/tests/ext/startup_logging_diagnostics.phpt
index 13c458997..581b6098b 100644
--- a/tests/ext/startup_logging_diagnostics.phpt
+++ b/tests/ext/startup_logging_diagnostics.phpt
@@ -31,7 +31,7 @@ dd_dump_startup_logs($logs, [
 ]);
 ?>
 --EXPECTF--
-agent_error: "Could not resolve host: invalid_host"
+agent_error: %sinvalid_host%s
 open_basedir_init_hook_allowed: false
 open_basedir_container_tagging_allowed: false
 service_name: "foo_service"