Edit report at https://bugs.php.net/bug.php?id=60981&edit=1

 ID:                 60981
 User updated by:    david at davidfavor dot com
 Reported by:        david at davidfavor dot com
 Summary:            Shell environment inaccessible in tests
-Status:             Feedback
+Status:             Assigned
 Type:               Bug
 Package:            Testing related
 Operating System:   Ubuntu 11.10
 PHP Version:        5.3.10
 Assigned To:        danielc
 Block user comment: N
 Private report:     N

 New Comment:

export var=foo is the same as sourcing a file that includes...
export var=foo

Problem is no shell environment is reaching the test scripts.

Please suggest a way to turn off clearing of the environment.


Previous Comments:
------------------------------------------------------------------------
[2012-02-05 19:00:29] dani...@php.net

The environment variables need to be established in a scope available all shell 
scripts.  For example, them in the ~/.bashrc script of the user executing "make 
test".

Set the variables in ~/.bashrc
source ~/.bashrc
make test ....

The "source" step is only necessary in the first shell since the variables were 
not available when the shell was opened.  All future shells will have them.

------------------------------------------------------------------------
[2012-02-05 18:50:42] david at davidfavor dot com

Description:
------------
Shell environment variables are not accessible via getenv() during tests.

Test script:
---------------
export MYSQL_TEST_PASSWD=...

make test TESTS=ext/mysql*/tests/001.phpt

Runs the mysql + mysqli connect tests and both are skipped.

Tests are skipped showing... (using password: NO)

Manually setting $passwd in connect.inc for both test sets runs all tests as 
expected.

So MYSQL_TEST_PASSWD is ignored.



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60981&edit=1

Reply via email to