SonarQube PHP
  1. SonarQube PHP
  2. SONARPHP-42

sonar launch PHPUnit without working directory

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 0.4
    • Fix Version/s: 0.6
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Hi,

      I'm currently setting up Sonar with our PHP projects, using Ant.

      Setup is somewhat classical. "sonar.sources" property is set (/data/www/app/mobile/).

      Launching "ant sonar" starts correctly :

      • pdepend... OK
      • phpcs... OK
      • phpunit : KO

      command line for phpunit is :
      phpunit --log-junit=/data/.sonar/target/logs/phpunit.xml --coverage-clover=/data/.sonar/target/logs/phpunit.coverage.xml

      Working directory seems to be missing in the command line

      I don't know if it is really a bug or a misconfiguration/misanderstanding but I can't find why it's happening

      I'm using latest versions of Sonar/PHP Plugin, with designated versions of others tools like phpunit, phpmd... (as told in the installation manual)

      Any advice ?

      Thanks in advance and sorry for my english :/

        Activity

        Hide
        Franck added a comment -

        forgot to add part of the log returned by "ant sonar" command :

        ...
        [sonar:sonar] [INFO] Report file for: phpunit : /data/.sonar/target/logs/phpunit.xml
        [sonar:sonar] [INFO] Executing Phpunit with command 'phpunit --log-junit=/data/.sonar/target/logs/phpunit.xml --coverage-clover=/data/.sonar/target/logs/phpunit.coverage.xml'
        [sonar:sonar] [INFO] Phpunit ended with returned code '2'.
        [sonar:sonar] [INFO] Report file for: phpunit : /data/.sonar/target/logs/phpunit.xml
        [sonar:sonar] [INFO] Parsing file :
        BUILD FAILED
        /data/build.xml:39: org.sonar.api.utils.SonarException: Can't read PhpUnit report : /data/.sonar/target/logs/phpunit.xml
        ...

        Manually running the phpunit command with given parameters show me the phpunit help screen

        Show
        Franck added a comment - forgot to add part of the log returned by "ant sonar" command : ... [sonar:sonar] [INFO] Report file for: phpunit : /data/.sonar/target/logs/phpunit.xml [sonar:sonar] [INFO] Executing Phpunit with command 'phpunit --log-junit=/data/.sonar/target/logs/phpunit.xml --coverage-clover=/data/.sonar/target/logs/phpunit.coverage.xml' [sonar:sonar] [INFO] Phpunit ended with returned code '2'. [sonar:sonar] [INFO] Report file for: phpunit : /data/.sonar/target/logs/phpunit.xml [sonar:sonar] [INFO] Parsing file : BUILD FAILED /data/build.xml:39: org.sonar.api.utils.SonarException: Can't read PhpUnit report : /data/.sonar/target/logs/phpunit.xml ... Manually running the phpunit command with given parameters show me the phpunit help screen
        Hide
        Sebastian Marek added a comment -

        Closing the issue as this is a duplication of SONARPLUGINS-1440. Please see my comments there regarding how phpunit is and should be executed.

        Show
        Sebastian Marek added a comment - Closing the issue as this is a duplication of SONARPLUGINS-1440 . Please see my comments there regarding how phpunit is and should be executed.

          People

          • Assignee:
            Sebastian Marek
            Reporter:
            Anonymous
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: