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

scripts: twister: Fix warnings & update some style (dependency injection/type hints). #77989

Merged
merged 6 commits into from
Sep 12, 2024

Commits on Sep 10, 2024

  1. scripts: twister: check for deprecation notice for space-separated lists

    Space separated lists are deprecated but this notice is not checked for.
    extract_fields_from_arg_list also converts lists back to space-separated
    lists causing a warning on get_scenario
    
    Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
    ithinuel committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    1427113 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. scripts: twister: Solve deprecation notice when running tests

    CONF_FILE, DTC_OVERLAY_FILE and OVERLAY_CONFIG are deprecated but still
    used by the tests causing warnings when running them.
    
    This adds a test_data specific to validate the emission of the warning,
    and removes the offending args from the other test_data files.
    
    Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
    ithinuel committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    7dd4b00 View commit details
    Browse the repository at this point in the history
  2. scripts: twisterlib: Fix warning about deprecation of truthiness

    Python 3.12 warns that
    
    > Testing an element's truth value will raise an exception in future
    > versions. Use specific 'len(elem)' or 'elem is not None' test instead.
    >    if elem_ts := root.find('testsuite'):
    
    Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
    ithinuel committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    49a847d View commit details
    Browse the repository at this point in the history
  3. scripts: twister: TwisterEnv is always used with an options parameter

    Adjusting the type hints and code accordingly.
    
    Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
    ithinuel committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    98f0133 View commit details
    Browse the repository at this point in the history
  4. scripts: twister: Use args rather than injecting members

    This changes how some arguments are set in the `Handler`s.
    `options`, `generator_cmd` and `suite_name_check` are now passed as
    arguments to the constructor rather than injected from an other module.
    
    Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
    ithinuel committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    4def3ce View commit details
    Browse the repository at this point in the history
  5. scripts: twister: add type hint to twister_main.py

    Twister main expects an instance of TwisterEnv. Let's the linter know
    about this.
    
    Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
    ithinuel committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    b61c5fc View commit details
    Browse the repository at this point in the history