Skip to content

"File name too long" error with deep paths in JUnit reports #405

Description

@strido

When using the htmlSanityCheck Gradle plugin within a sub-project, I encounter a "File name too long" error during the generation of JUnit reports.

This issue arises because the generated report filenames incorporate both the full path to the Gradle sub-project and the deeply nested folder structure of the files being checked, exceeding some filename length limit.

Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: /home/xxxxx/xxx/xxxxxxxx/xxxxxxxxxx/xxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxx/documentation/build/test-results/htmlchecks/TEST-unit-html-_xxxx_xxxxx_xxx_xxxxxxxx_xxxxxxxxxx_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxx_documentation_build_test-results_htmlchecks_xxxxxxxxxxxxxxx_xx_xxxxx_xxxxxxxx_xxx_xxxx_xxxxxxxxx_xx_xxxx_xx_xx_xxxxxxxxxxxxx_xx_xxxxxx_xxxxxxxxxxxxx_xx_xxxxxxxx_xxxxxxxxxx_xxxx.xml (File name too long)
        at org.aim42.htmlsanitycheck.report.JUnitXmlReporter.reportPageSummary(JUnitXmlReporter.java:95)
...
Caused by: java.io.FileNotFoundException: /home/xxxxx/xxx/xxxxxxxx/xxxxxxxxxx/xxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxx/documentation/build/test-results/htmlchecks/TEST-unit-html-_xxxx_xxxxx_xxx_xxxxxxxx_xxxxxxxxxx_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxx_documentation_build_test-results_htmlchecks_xxxxxxxxxxxxxxx_xx_xxxxx_xxxxxxxx_xxx_xxxx_xxxxxxxxx_xx_xxxx_xx_xx_xxxxxxxxxxxxx_xx_xxxxxx_xxxxxxxxxxxxx_xx_xxxxxxxx_xxxxxxxxxx_xxxx.xml (File name too long)
        at org.aim42.htmlsanitycheck.report.JUnitXmlReporter.reportPageSummary(JUnitXmlReporter.java:62)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions