You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dennis Lundberg (JIRA)" <ji...@codehaus.org> on 2012/01/14 00:11:02 UTC

[jira] (MCHECKSTYLE-170) Test errors and failures on Windows

Dennis Lundberg created MCHECKSTYLE-170:
-------------------------------------------

             Summary: Test errors and failures on Windows
                 Key: MCHECKSTYLE-170
                 URL: https://jira.codehaus.org/browse/MCHECKSTYLE-170
             Project: Maven 2.x Checkstyle Plugin
          Issue Type: Bug
    Affects Versions: 2.9
            Reporter: Dennis Lundberg


The current trunk has test errors and failures on Windows 7 with Java 5 and Maven 2.2.1/3.0.3.

On Ubuntu with Java 5 and Maven 2.2.1/3.0.3 it works though.

{noformat}
Failed tests:
  testListeners(org.apache.maven.plugin.checkstyle.CheckstyleReportListenerMultiSourceTest): Test total files expected:<4> but was:<1>
  testListeners(org.apache.maven.plugin.checkstyle.CheckstyleReportListenerTest): Test total files expected:<4> but was:<1>

Tests in error:
  testMinConfiguration(org.apache.maven.plugin.checkstyle.CheckstyleAggregateReportTest)
  testMinConfiguration(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
  testCustomConfiguration(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
  testUseFile(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
  testNoRulesSummary(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
  testNoSeveritySummary(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
  testNoFilesSummary(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
  testTestSourceDirectory(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)

Tests run: 22, Failures: 2, Errors: 8, Skipped: 0
{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCHECKSTYLE-170) Test errors and failures on Windows

Posted by "Robert Scholte (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MCHECKSTYLE-170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Scholte closed MCHECKSTYLE-170.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.9

Fixed in [rev. 1231408|http://svn.apache.org/viewvc?rev=1231408&view=rev]
                
> Test errors and failures on Windows
> -----------------------------------
>
>                 Key: MCHECKSTYLE-170
>                 URL: https://jira.codehaus.org/browse/MCHECKSTYLE-170
>             Project: Maven 2.x Checkstyle Plugin
>          Issue Type: Bug
>    Affects Versions: 2.9
>            Reporter: Dennis Lundberg
>            Assignee: Robert Scholte
>             Fix For: 2.9
>
>
> The current trunk has test errors and failures on Windows 7 with Java 5 and Maven 2.2.1/3.0.3.
> On Ubuntu with Java 5 and Maven 2.2.1/3.0.3 it works though.
> {noformat}
> Failed tests:
>   testListeners(org.apache.maven.plugin.checkstyle.CheckstyleReportListenerMultiSourceTest): Test total files expected:<4> but was:<1>
>   testListeners(org.apache.maven.plugin.checkstyle.CheckstyleReportListenerTest): Test total files expected:<4> but was:<1>
> Tests in error:
>   testMinConfiguration(org.apache.maven.plugin.checkstyle.CheckstyleAggregateReportTest)
>   testMinConfiguration(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
>   testCustomConfiguration(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
>   testUseFile(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
>   testNoRulesSummary(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
>   testNoSeveritySummary(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
>   testNoFilesSummary(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
>   testTestSourceDirectory(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
> Tests run: 22, Failures: 2, Errors: 8, Skipped: 0
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCHECKSTYLE-170) Test errors and failures on Windows

Posted by "Robert Scholte (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCHECKSTYLE-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288267#comment-288267 ] 

Robert Scholte commented on MCHECKSTYLE-170:
--------------------------------------------

This method is causing trouble
{code}
/** {@inheritDoc} */
    public void fileStarted( AuditEvent event )
    {
        for ( File sourceDirectory : sourceDirectories )
        {
            String sourceDirectoryPath = sourceDirectory.getPath();
            String fileName = StringUtils.replace( event.getFileName(), "\\", "/" );
            if ( fileName.startsWith( sourceDirectoryPath + "/" ) )
            {
                currentFile = StringUtils.substring( fileName, sourceDirectoryPath.length() + 1 );

                events = getResults().getFileViolations( currentFile );
            }
        }

        if ( events == null )
        {
            events = new ArrayList<AuditEvent>();
        }
    }
{code}

The line {{if ( fileName.startsWith( sourceDirectoryPath + "/" ) )}} uses different path separators for fileName and sourceDirectoryPath under Windows
                
> Test errors and failures on Windows
> -----------------------------------
>
>                 Key: MCHECKSTYLE-170
>                 URL: https://jira.codehaus.org/browse/MCHECKSTYLE-170
>             Project: Maven 2.x Checkstyle Plugin
>          Issue Type: Bug
>    Affects Versions: 2.9
>            Reporter: Dennis Lundberg
>            Assignee: Robert Scholte
>
> The current trunk has test errors and failures on Windows 7 with Java 5 and Maven 2.2.1/3.0.3.
> On Ubuntu with Java 5 and Maven 2.2.1/3.0.3 it works though.
> {noformat}
> Failed tests:
>   testListeners(org.apache.maven.plugin.checkstyle.CheckstyleReportListenerMultiSourceTest): Test total files expected:<4> but was:<1>
>   testListeners(org.apache.maven.plugin.checkstyle.CheckstyleReportListenerTest): Test total files expected:<4> but was:<1>
> Tests in error:
>   testMinConfiguration(org.apache.maven.plugin.checkstyle.CheckstyleAggregateReportTest)
>   testMinConfiguration(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
>   testCustomConfiguration(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
>   testUseFile(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
>   testNoRulesSummary(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
>   testNoSeveritySummary(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
>   testNoFilesSummary(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
>   testTestSourceDirectory(org.apache.maven.plugin.checkstyle.CheckstyleReportTest)
> Tests run: 22, Failures: 2, Errors: 8, Skipped: 0
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira