Skip to content

spread test skips tests with same name prefixes #817

@zhijie-yang

Description

@zhijie-yang

In the spread.yaml workflow line 65, a regex is used to prevent duplicated tests being passed to the spread command.

However, this regex gives false negatives in certain scenarios:

Suppose the changed files include slices/golang-1.22-go.yaml and tests/spread/integration/golang/task.yaml.

The variable $spread_tasks will be filled with lxd:tests/spread/integration/golang-1.22-go. When tests/spread/integration/golang is taken in to the expression $spread_tasks != *"${pkg_tests}"*, it evaluates to false, since lxd:tests/spread/integration/golang-1.22-go equals to the pattern *tests/spread/integration/golang*.

In this case, although changes are made to tests/spread/integration/golang/task.yaml, the tests won't never run, since lxd:tests/spread/integration/golang-1.22-go takes the precedence.

A workflow run can also prove this behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PriorityLook at me firstbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions