Preserve environment variables when running testing jobs
Issue information
From user: mondrake
Related to !261 (closed) !258 (closed) !293 (merged) !259 (merged)
Problem/Motivation
BROWSERTEST_OUTPUT_VERBOSE is not passed to run-tests.sh when running PHPUnit tests with concurrency on.
The variable works fine when running without concurrency on standard PHPUnit CLI.
Steps to reproduce
Set BROWSERTEST_OUTPUT_VERBOSE to "false" and _PHPUNIT_CONCURRENT to '1', run functional tests and see the full list of links to generated html output; switch _PHPUNIT_CONCURRENT to '0' and see just the count of pages generated.
I think this is due to the processes being run under sudo. However, while the direct call to PHPUnit CLI uses -E to preserve the environment variables, when calling run-tests.sh just two variables are passed in.
Proposed resolution
Set the -E option also when running via run-tests.sh ==> This didn't work
Add www-data user to root group ==> This made it work
Actual resolution
Add options -H -E to all executions of phpunit, run-tests.sh and nightwatch