Skip to content

Task state detection incorrect when have sub-projects with same task #140

@esword

Description

@esword

Checking the state/result of a task can return an incorrect value if the same task also ran in a sub-project. This method can incorrectly return the result from the sub-project task:

https://github.com/nebula-plugins/nebula-test/blob/master/src/main/groovy/nebula/test/functional/internal/toolingapi/BuildLauncherBackedGradleHandle.groovy#L118-L119

e.g. if it is checking if :myTask was SKIPPED, it will return true if :subproject:myTask was SKIPPED even if :myTask was not.

A simple fix would be to ensure there was whitespace before the task name so it matches the whole task path:

stdout.contains(" $taskName $stateIdentifier".toString())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions