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

Add more granular --exclude in x.py #91965

Merged
merged 2 commits into from
Jan 22, 2022

Commits on Jan 21, 2022

  1. Configuration menu
    Copy the full SHA
    b27d59d View commit details
    Browse the repository at this point in the history
  2. allow excluding paths only from a single module

    x.py has support for excluding some steps from the invocation, but
    unfortunately that's not granular enough: some steps have the same name
    in different modules, and that prevents excluding only *some* of them.
    
    As a practical example, let's say you need to run everything in `./x.py
    test` except for the standard library tests, as those tests require IPv6
    and need to be executed on a separate machine. Before this commit, if
    you were to just run this:
    
        ./x.py test --exclude library/std
    
    ...the execution would fail, as that would not only exclude running the
    tests for the standard library, it would also exclude generating its
    documentation (breaking linkchecker).
    
    This commit adds support for an optional module annotation in --exclude
    paths, allowing the user to choose which module to exclude from:
    
        ./x.py test --exclude test::library/std
    
    This maintains backward compatibility, but also allows for more ganular
    exclusion. More examples on how this works:
    
    | `--exclude`         | Docs    | Tests   |
    | ------------------- | ------- | ------- |
    | `library/std`       | Skipped | Skipped |
    | `doc::library/std`  | Skipped | Run     |
    | `test::library/std` | Run     | Skipped |
    
    Note that the new behavior only works in the `--exclude` flag, and not
    in other x.py arguments or flags yet.
    pietroalbini committed Jan 21, 2022
    Configuration menu
    Copy the full SHA
    b3ad405 View commit details
    Browse the repository at this point in the history