In the same environment, PHP does not have a problem using the Ant build project in the terminal to perform the PHPUnit test, but it will error when Jenkins builds automatically:
PHPUnit
[EXEC] PHP Parse error:syntax error, unexpected ' << ' (T_SL) in/var/lib/jenkins/jobs/hwawoontest/workspace/vendor/ Autoload.php on line 7
[EXEC] PHP Stack Trace:
[EXEC] PHP 1. {main} ()/usr/local/bin/phpunit:0
[EXEC] PHP 2. Phpunit_textui_command::main ()/usr/local/bin/phpunit:612
[EXEC] PHP 3. Phpunit_textui_command->run () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:138
[EXEC] PHP 4. Phpunit_textui_command->handlearguments () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:148
[EXEC] PHP 5. Phpunit_textui_command->handlebootstrap () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:651
[EXEC] PHP 6. Phpunit_util_fileloader::checkandload () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:817
[EXEC] PHP 7. Phpunit_util_fileloader::load () phar:///usr/local/bin/phpunit/phpunit/util/fileloader.php:77
[EXEC] PHP 8. Include_once () phar:///usr/local/bin/phpunit/phpunit/util/fileloader.php:93
BUILD FAILED
/var/lib/jenkins/jobs/hwawoontest/workspace/build.xml:168:exec returned:255
Autoload.php's Code:
// autoload.php @generated by Composer
require_once DIR . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit34c7d9c593778809996626035f6ae5ee::getLoader();
The following paragraph is the code snippet for Build.xml:
Why is this, where is the problem?
Reply content:
In the same environment, PHP does not have a problem using the Ant build project in the terminal to perform the PHPUnit test, but it will error when Jenkins builds automatically:
PHPUnit
[EXEC] PHP Parse error:syntax error, unexpected ' << ' (T_SL) in/var/lib/jenkins/jobs/hwawoontest/workspace/vendor/ Autoload.php on line 7
[EXEC] PHP Stack Trace:
[EXEC] PHP 1. {main} ()/usr/local/bin/phpunit:0
[EXEC] PHP 2. Phpunit_textui_command::main ()/usr/local/bin/phpunit:612
[EXEC] PHP 3. Phpunit_textui_command->run () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:138
[EXEC] PHP 4. Phpunit_textui_command->handlearguments () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:148
[EXEC] PHP 5. Phpunit_textui_command->handlebootstrap () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:651
[EXEC] PHP 6. Phpunit_util_fileloader::checkandload () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:817
[EXEC] PHP 7. Phpunit_util_fileloader::load () phar:///usr/local/bin/phpunit/phpunit/util/fileloader.php:77
[EXEC] PHP 8. Include_once () phar:///usr/local/bin/phpunit/phpunit/util/fileloader.php:93
BUILD FAILED
/var/lib/jenkins/jobs/hwawoontest/workspace/build.xml:168:exec returned:255
Autoload.php's Code:
// autoload.php @generated by Composer
require_once DIR . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit34c7d9c593778809996626035f6ae5ee::getLoader();
The following paragraph is the code snippet for Build.xml:
Why is this, where is the problem?