Skip to content

Broken code coverage collection #3337

@swissspidy

Description

@swissspidy

The code coverage analysis job on Travis that runs on develop currently fails due to Maximum function nesting level of '256' reached errors.

Example: https://travis-ci.org/ampproject/amp-wp/jobs/588932199

The failings tests are as follows:

  • AMP_Tag_And_Attribute_Sanitizer_Test::test_body_sanitizer with data set deeply_nested_elements_250
  • AMP_Tag_And_Attribute_Sanitizer_Test::test_html_sanitizer with data set #228 ('<html amp><head><meta charset.../html>', null, array(), null)

Looks like these were introduced in #3243.

Since the first test is specifically for deeply nested elements, we might need to increase the maximum function nesting level by quite a bit to accomodate for this during code coverage analysis.

This could be done by adding a custom php.ini config file with the content xdebug.max_nesting_level=9999 (or similar) and using phpenv config-add path/to/custom/php.ini (docs) to load it. I guess we could even create that config on the fly just for this one job.

Related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingInfrastructureChanges impacting testing infrastructure or build tooling

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions