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

enhance common_config.py and generate_test_code.py #48

Merged
merged 8 commits into from
Oct 11, 2024

Commits on Oct 9, 2024

  1. config.py: add get-all and get-all-enabled commands

    Both commands use regex expressions to get a list of symbols.
    The difference between the 2 is that:
    
    - get-all returns both enabled and commented out symbols while
    - get-all-enabled returns only enabled ones.
    
    Signed-off-by: Valerio Setti <vsetti@baylibre.com>
    valeriosetti committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    9b987bd View commit details
    Browse the repository at this point in the history
  2. config_common.py: make get_matching() a generator

    Signed-off-by: Valerio Setti <vsetti@baylibre.com>
    valeriosetti committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    40a28bd View commit details
    Browse the repository at this point in the history
  3. config_common.py: remove unnecessary if statements

    Signed-off-by: Valerio Setti <vsetti@baylibre.com>
    valeriosetti committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    6b04996 View commit details
    Browse the repository at this point in the history
  4. generate_test_code: ease checks on the test data depends_on

    In case of depends_on elements that include a conditional check
    on some symbol's value, we allow the comparison element to
    be anything and not just a fixed value as it was before.
    This allows for more complex depends_on conditions where
    build symbols and macros are used on both sides of the comparison.
    
    Signed-off-by: Valerio Setti <vsetti@baylibre.com>
    valeriosetti committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    b6dc14c View commit details
    Browse the repository at this point in the history
  5. generate_test_code.py: add check for numerical format

    Do not allow values starting with a 0 because they can be either
    accidentally octal or accidentally decimal. Hex values are not
    affected by this change.
    
    Signed-off-by: Valerio Setti <vsetti@baylibre.com>
    valeriosetti committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    a6e9c08 View commit details
    Browse the repository at this point in the history
  6. generate_test_code.py: allow bitwise operators in depends_on expressions

    Signed-off-by: Valerio Setti <vsetti@baylibre.com>
    valeriosetti committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    f8025e4 View commit details
    Browse the repository at this point in the history
  7. generate_test_code.py: improve detection of ambiguous numerical values

    Signed-off-by: Valerio Setti <vsetti@baylibre.com>
    valeriosetti committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    bf87497 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2024

  1. generate_test_code.py: simplify regex expression

    "\w" already matches "[a-zA-Z0-9_]" so CONDITION_VALUE_REGEX
    can be simplified as proposed in this commit.
    
    Signed-off-by: Valerio Setti <vsetti@baylibre.com>
    valeriosetti committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    c9d6bf4 View commit details
    Browse the repository at this point in the history