maderic_m
maderic_m

Reputation: 73

Jenkins won't run PHPUunit - Permission denied

I have installed PHPUnit via Composer and when I try to run PHPUnit as an Ant task it fails.

The Task:

<target name="phpunit" description="Run unit tests with PHPUnit">
    <exec executable="bin/phpunit" failonerror="true">
        <arg value="-c" />
        <arg path="${basedir}/app/phpunit.xml.dist" />
    </exec>
</target>

The error: phpunit:

BUILD FAILED /var/lib/jenkins/workspace/Project/build.xml:23: Execute failed: java.io.IOException: Cannot run >program “bin/phpunit”: error=13, Permission denied at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041) ........

I have tried to implement CI server for a Symfony2 project on Ubuntu 12.04. Any idea what may be happening?

Upvotes: 1

Views: 2334

Answers (1)

Keerthivasan
Keerthivasan

Reputation: 12890

Check the permissions for executing phpunit program. Please try using sudo to execute your script.

Note : Try modifying the permissions of phpunit installation directory using chmod like

chmod 777

Upvotes: 1

Related Questions