Skip to content

runtest does not find tests in some cases #4699

Closed

Description

@mwichmann

The changes over the last few years attempting to improve the clarity of test selection has led to circumstances where runtest.py does not find tests as expected. In particular, when used in --external mode and given a non-local path to a directory containing external tests, they are not found.

In the mode we usually run it, both as developers and in CI, from an scons checkout, it recognizes a subdirectory named SCons or one named testing to look for unit tests, and one named test to look for e2e tests, and this works fine. When used in external mode and given directory paths, test is unlikely to be the first component of the path given, since you're specifically pointing outside the SCons tree. This section fails to find any tests in that case:

                elif path.parts[0] == 'test':                   
                    endtests.extend(find_e2e_tests(path))   

The logic needs some thought, wondering if it's okay to just change to:

                elif 'test' in path.parts            

Activity

  1. added
    testsuite
    on Mar 22, 2025
  2. mwichmann commented on Mar 27, 2025

    @mwichmann
    CollaboratorAuthor

    Just adding another case seems to be enough - if external was specified, look for tests as one of the parts of the path, not just the first part.

  3. added 2 commits that reference this issue on Apr 2, 2025
    0947b4e
    1ce4895
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsuite

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions