summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2020-05-01 19:50:56 +0200
committerjvoisin2020-05-01 20:39:05 +0200
commit3e2b6545b623f0ba1b016c03b43d999cfcbc8d2f (patch)
tree9f213016094a6b03f4871599f1350a21f7a896d1
parent4a5a1922f105bf0d4ee002088a6e6ece67ae0b9e (diff)
Make the testsuite work on php7.4
Before php7.4, it seems that the curl module was loaded by default, but since it's no the case anymore, it has to be manually specified in the testsuite. Interestingly, Php's testsuite mechanism is running snippets to determine some runtime parameters like the extension directory. Unfortunately,it tries to run them with Snuffleupagus loaded, resulting in an error, since no configuration file is passed.
-rw-r--r--.travis.yml2
-rw-r--r--Makefile1
-rw-r--r--src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt2
-rw-r--r--src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt2
-rw-r--r--src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt2
-rw-r--r--src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt2
-rw-r--r--src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt2
-rw-r--r--src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt6
-rw-r--r--src/tests/xxe/disable_xxe_dom.phpt2
-rw-r--r--src/tests/xxe/disable_xxe_dom_disabled.phpt2
-rw-r--r--src/tests/xxe/disable_xxe_simplexml.phpt2
-rw-r--r--src/tests/xxe/disable_xxe_simplexml_oop.phpt2
-rw-r--r--src/tests/xxe/disable_xxe_xml_parse.phpt2
13 files changed, 27 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index 4e2ec64..f5a8fee 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,6 +42,8 @@ script:
42 - phpize 42 - phpize
43 - ./configure --enable-snuffleupagus --enable-coverage 43 - ./configure --enable-snuffleupagus --enable-coverage
44 - make -j 2 44 - make -j 2
45 - sed -i "s/\$ext_params -d display_errors=0 -r/-d display_errors=0 -r/" run-tests.php
46 - cat run-tests.php
45 - TEST_PHP_ARGS="-q" REPORT_EXIT_STATUS=1 make test 47 - TEST_PHP_ARGS="-q" REPORT_EXIT_STATUS=1 make test
46 48
47after_success: 49after_success:
diff --git a/Makefile b/Makefile
index c0d65c2..db5878e 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,7 @@ compile_debug: ## compile a debug build
19 make -C src 19 make -C src
20 20
21debug: compile_debug ## compile and run a debug build 21debug: compile_debug ## compile and run a debug build
22 sed -i "s/\$$ext_params -d display_errors=0 -r/-d display_errors=0 -r/" src/run-tests.php
22 TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test 23 TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test
23 24
24coverage: ## compile snuffleugpaus, and run the testsuite with coverage 25coverage: ## compile snuffleugpaus, and run the testsuite with coverage
diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt
index 1d51b05..dc53593 100644
--- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt
+++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt
@@ -5,6 +5,8 @@ Disable functions - Ensure that client certificates validation can't be disabled
5if (!extension_loaded("snuffleupagus")) { die("skip"); } 5if (!extension_loaded("snuffleupagus")) { die("skip"); }
6if (!extension_loaded("curl")) { die("skip"); } 6if (!extension_loaded("curl")) { die("skip"); }
7?> 7?>
8--EXTENSIONS--
9curl
8--INI-- 10--INI--
9sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini 11sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini
10--FILE-- 12--FILE--
diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt
index a79ff48..9ff37ec 100644
--- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt
+++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt
@@ -5,6 +5,8 @@ Disable functions - Ensure that client certificates validation can't be disabled
5if (!extension_loaded("snuffleupagus")) { die("skip"); } 5if (!extension_loaded("snuffleupagus")) { die("skip"); }
6if (!extension_loaded("curl")) { die("skip"); } 6if (!extension_loaded("curl")) { die("skip"); }
7?> 7?>
8--EXTENSIONS--
9curl
8--INI-- 10--INI--
9sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini 11sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini
10--FILE-- 12--FILE--
diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt
index 6c7bc93..246fee6 100644
--- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt
+++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt
@@ -5,6 +5,8 @@ Disable functions - Ensure that client certificates validation can't be disabled
5if (!extension_loaded("snuffleupagus")) { die("skip"); } 5if (!extension_loaded("snuffleupagus")) { die("skip"); }
6if (!extension_loaded("curl")) { die("skip"); } 6if (!extension_loaded("curl")) { die("skip"); }
7?> 7?>
8--EXTENSIONS--
9curl
8--INI-- 10--INI--
9sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini 11sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini
10--FILE-- 12--FILE--
diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt
index 40b58cc..fa583b0 100644
--- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt
+++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt
@@ -5,6 +5,8 @@ Disable functions - Ensure that server certificates validation can't be disabled
5if (!extension_loaded("snuffleupagus")) { die("skip"); } 5if (!extension_loaded("snuffleupagus")) { die("skip"); }
6if (!extension_loaded("curl")) { die("skip"); } 6if (!extension_loaded("curl")) { die("skip"); }
7?> 7?>
8--EXTENSIONS--
9curl
8--INI-- 10--INI--
9sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini 11sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini
10--FILE-- 12--FILE--
diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt
index 06acd6c..3b374ee 100644
--- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt
+++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt
@@ -5,6 +5,8 @@ Disable functions - Ensure that server certificates validation can't be disabled
5if (!extension_loaded("snuffleupagus")) { die("skip"); } 5if (!extension_loaded("snuffleupagus")) { die("skip"); }
6if (!extension_loaded("curl")) { die("skip"); } 6if (!extension_loaded("curl")) { die("skip"); }
7?> 7?>
8--EXTENSIONS--
9curl
8--INI-- 10--INI--
9sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini 11sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini
10--FILE-- 12--FILE--
diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt
index c716625..97accce 100644
--- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt
+++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt
@@ -2,9 +2,11 @@
2Disable functions - Ensure that server certificates validation can't be disabled via `curl_setopt_array` 2Disable functions - Ensure that server certificates validation can't be disabled via `curl_setopt_array`
3--SKIPIF-- 3--SKIPIF--
4<?php 4<?php
5if (!extension_loaded("snuffleupagus")) { die("skip"); } 5if (!extension_loaded("snuffleupagus")) { echo("skip"); }
6if (!extension_loaded("curl")) { die("skip"); } 6if (!extension_loaded("curl")) { echo("skip"); }
7?> 7?>
8--EXTENSIONS--
9curl
8--INI-- 10--INI--
9sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini 11sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini
10--FILE-- 12--FILE--
diff --git a/src/tests/xxe/disable_xxe_dom.phpt b/src/tests/xxe/disable_xxe_dom.phpt
index e1459e3..2f45f66 100644
--- a/src/tests/xxe/disable_xxe_dom.phpt
+++ b/src/tests/xxe/disable_xxe_dom.phpt
@@ -8,6 +8,8 @@ Disable XXE
8 echo "skip"; 8 echo "skip";
9} 9}
10 ?> 10 ?>
11--EXTENSIONS--
12dom
11--INI-- 13--INI--
12sp.configuration_file={PWD}/config/disable_xxe.ini 14sp.configuration_file={PWD}/config/disable_xxe.ini
13--FILE-- 15--FILE--
diff --git a/src/tests/xxe/disable_xxe_dom_disabled.phpt b/src/tests/xxe/disable_xxe_dom_disabled.phpt
index a791ebc..59526d2 100644
--- a/src/tests/xxe/disable_xxe_dom_disabled.phpt
+++ b/src/tests/xxe/disable_xxe_dom_disabled.phpt
@@ -5,6 +5,8 @@ Disable XXE
5 if (!extension_loaded("snuffleupagus")) echo "skip"; 5 if (!extension_loaded("snuffleupagus")) echo "skip";
6 if (!extension_loaded("dom")) echo "skip"; 6 if (!extension_loaded("dom")) echo "skip";
7 ?> 7 ?>
8--extensions--
9dom
8--INI-- 10--INI--
9sp.configuration_file={PWD}/config/disable_xxe_disable.ini 11sp.configuration_file={PWD}/config/disable_xxe_disable.ini
10--FILE-- 12--FILE--
diff --git a/src/tests/xxe/disable_xxe_simplexml.phpt b/src/tests/xxe/disable_xxe_simplexml.phpt
index 88396c0..35d79de 100644
--- a/src/tests/xxe/disable_xxe_simplexml.phpt
+++ b/src/tests/xxe/disable_xxe_simplexml.phpt
@@ -5,6 +5,8 @@ Disable XXE
5 if (!extension_loaded("snuffleupagus")) echo "skip"; 5 if (!extension_loaded("snuffleupagus")) echo "skip";
6 if (!extension_loaded("simplexml")) echo "skip"; 6 if (!extension_loaded("simplexml")) echo "skip";
7 ?> 7 ?>
8--EXTENSIONS--
9xml
8--INI-- 10--INI--
9sp.configuration_file={PWD}/config/disable_xxe.ini 11sp.configuration_file={PWD}/config/disable_xxe.ini
10--FILE-- 12--FILE--
diff --git a/src/tests/xxe/disable_xxe_simplexml_oop.phpt b/src/tests/xxe/disable_xxe_simplexml_oop.phpt
index 43c4fbf..33c3bb5 100644
--- a/src/tests/xxe/disable_xxe_simplexml_oop.phpt
+++ b/src/tests/xxe/disable_xxe_simplexml_oop.phpt
@@ -5,6 +5,8 @@ Disable XXE
5 if (!extension_loaded("snuffleupagus")) echo "skip"; 5 if (!extension_loaded("snuffleupagus")) echo "skip";
6 if (!extension_loaded("simplexml")) echo "skip"; 6 if (!extension_loaded("simplexml")) echo "skip";
7 ?> 7 ?>
8--EXTENSIONS--
9xml
8--INI-- 10--INI--
9sp.configuration_file={PWD}/config/disable_xxe.ini 11sp.configuration_file={PWD}/config/disable_xxe.ini
10--FILE-- 12--FILE--
diff --git a/src/tests/xxe/disable_xxe_xml_parse.phpt b/src/tests/xxe/disable_xxe_xml_parse.phpt
index ca77729..b6dec2d 100644
--- a/src/tests/xxe/disable_xxe_xml_parse.phpt
+++ b/src/tests/xxe/disable_xxe_xml_parse.phpt
@@ -8,6 +8,8 @@ Disable XXE in xml_parse
8 echo "skip because the `xml` extension isn't loaded"; 8 echo "skip because the `xml` extension isn't loaded";
9} 9}
10 ?> 10 ?>
11--EXTENSIONS--
12xml
11--INI-- 13--INI--
12sp.configuration_file={PWD}/config/disable_xxe.ini 14sp.configuration_file={PWD}/config/disable_xxe.ini
13--FILE-- 15--FILE--