Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
esword opened this issue Sep 30, 2021 · 0 comments
Open

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

esword opened this issue Sep 30, 2021 · 0 comments

Comments

@esword
Copy link

esword commented Sep 30, 2021

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())

esword added a commit to esword/nebula-test that referenced this issue Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant