[Libguestfs] [PATCH 2/3] php: remove the custom "env" loading in tests

Pino Toscano ptoscano at redhat.com
Thu Mar 13 09:35:51 UTC 2014


Other than being too late for changing environment variables like
LD_LIBRARY_PATH, now it is no more needed.
---
 php/extension/guestfs_php_001.phpt | 14 --------------
 php/extension/guestfs_php_002.phpt | 14 --------------
 php/extension/guestfs_php_003.phpt | 14 --------------
 3 files changed, 42 deletions(-)

diff --git a/php/extension/guestfs_php_001.phpt b/php/extension/guestfs_php_001.phpt
index 65723a6..013ebb5 100644
--- a/php/extension/guestfs_php_001.phpt
+++ b/php/extension/guestfs_php_001.phpt
@@ -2,20 +2,6 @@
 Load the module and create a handle.
 --FILE--
 <?php
-
-// See comment in php/run-php-tests.sh.
-//putenv ('LIBGUESTFS_DEBUG=1');
-if (! $fp = fopen ("env", "r")) {
-  die ("Error: cannot open environment file 'env'\n");
-}
-while (($buffer = fgets ($fp)) != false) {
-  putenv (chop ($buffer, "\n"));
-}
-if (!feof ($fp)) {
-  die ("Error: unexpected failure of fgets\n");
-}
-fclose ($fp);
-
 $g = guestfs_create ();
 if ($g == false) {
   echo ("Failed to create guestfs_php handle.\n");
diff --git a/php/extension/guestfs_php_002.phpt b/php/extension/guestfs_php_002.phpt
index e4d3faf..91b2067 100644
--- a/php/extension/guestfs_php_002.phpt
+++ b/php/extension/guestfs_php_002.phpt
@@ -2,20 +2,6 @@
 Launch the appliance and run basic tests.
 --FILE--
 <?php
-
-// See comment in php/run-php-tests.sh.
-//putenv ('LIBGUESTFS_DEBUG=1');
-if (! $fp = fopen ("env", "r")) {
-  die ("Error: cannot open environment file 'env'\n");
-}
-while (($buffer = fgets ($fp)) != false) {
-  putenv (chop ($buffer, "\n"));
-}
-if (!feof ($fp)) {
-  die ("Error: unexpected failure of fgets\n");
-}
-fclose ($fp);
-
 $g = guestfs_create ();
 if ($g == false) {
   echo ("Failed to create guestfs_php handle.\n");
diff --git a/php/extension/guestfs_php_003.phpt b/php/extension/guestfs_php_003.phpt
index 8cb78da..e268e98 100644
--- a/php/extension/guestfs_php_003.phpt
+++ b/php/extension/guestfs_php_003.phpt
@@ -2,20 +2,6 @@
 Check function with optional arguments.
 --FILE--
 <?php
-
-// See comment in php/run-php-tests.sh.
-//putenv ('LIBGUESTFS_DEBUG=1');
-if (! $fp = fopen ("env", "r")) {
-  die ("Error: cannot open environment file 'env'\n");
-}
-while (($buffer = fgets ($fp)) != false) {
-  putenv (chop ($buffer, "\n"));
-}
-if (!feof ($fp)) {
-  die ("Error: unexpected failure of fgets\n");
-}
-fclose ($fp);
-
 $g = guestfs_create ();
 if ($g == false) {
   echo ("Failed to create guestfs_php handle.\n");
-- 
1.8.3.1




More information about the Libguestfs mailing list