Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion framework/src/act/act.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def run_act(

config_names: list[str] = []
tasks: list[BuildTask] = []
excluded_extensions = {ext.strip() for ext in exclude.split(",") if ext.strip()}
for config_file in config_files:
# Load configuration
Comment on lines +103 to 105
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excluded_extensions is derived from the CLI --exclude string, which generate_test_dict() applies as a test directory filter (it compares against test_file.parent.name, e.g. Sv). Passing this set into get_untested_implemented_extensions() (which compares against ISA extension tokens like Sv39, Zba, etc.) means excludes like Sv won’t suppress warnings for implemented Sv32/Sv39/..., leading to false-positive warnings. Consider translating excluded directory names into ISA extension names (e.g., treat an excluded prefix like Sv as excluding any implemented extension starting with Sv), or only applying this filter when the excluded value is known to be in the same namespace as implemented_extensions.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like that didn't work.

config = load_config(config_file)
Expand All @@ -113,7 +114,11 @@ def run_act(

# Select tests for config
selected_tests = select_tests(
full_test_dict, implemented_extensions, config_params, include_priv_tests=config.include_priv_tests
full_test_dict,
implemented_extensions,
config_params,
include_priv_tests=config.include_priv_tests,
excluded_extensions=excluded_extensions,
)
mxlen = config_params["MXLEN"]
if not isinstance(mxlen, int):
Expand Down
43 changes: 41 additions & 2 deletions framework/src/act/select_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
#
# Select tests to run based on UDB config and test list
##################################

from __future__ import annotations

import sys
import re

from act.parse_test_constraints import TestMetadata
Expand Down Expand Up @@ -67,6 +66,7 @@ def select_tests(
config_params: dict[str, ConfigParamValue],
*,
include_priv_tests: bool = True,
excluded_extensions: set[str] | None = None,
) -> dict[str, TestMetadata]:
"""Select tests that match the UDB configuration."""
selected_tests: dict[str, TestMetadata] = {}
Expand All @@ -80,4 +80,43 @@ def select_tests(
test_params = test_metadata.params
if check_test_params(test_params, config_params):
selected_tests[test_name] = test_metadata
# Warn about implemented extensions with no tests
untested_extensions = get_untested_implemented_extensions(
selected_tests,
implemented_extensions,
include_priv_tests=include_priv_tests,
excluded_extensions=excluded_extensions,
)

if untested_extensions:
print(
"Warning: no applicable tests selected for implemented extension(s): "
+ ", ".join(untested_extensions),
file=sys.stderr,
)
Comment on lines +83 to +96
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

select_tests() now prints a warning as a side-effect. This causes duplicate/contradictory warnings because act.py also prints a warning (and only does so when extensions == 'all'). Consider removing the warning/printing from select_tests() and letting callers handle reporting via get_untested_implemented_extensions(), or add an explicit warn_untested_extensions flag so callers can control when/if it prints (and pass through excluded_extensions).

Copilot uses AI. Check for mistakes.
Comment on lines +91 to +96
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it would be cleaner to move the warning printing into get_untested_implemented_extensions and then rename that function something like check_untested_implemented_extensions. That way there is no need to pass the list back and forth.


return selected_tests

def _is_excluded_extension(ext: str, excluded_extensions: set[str]) -> bool:
return any(ext.startswith(ex) for ex in excluded_extensions)

def get_untested_implemented_extensions(
selected_tests: dict[str, TestMetadata],
implemented_extensions: set[str],
*,
include_priv_tests: bool = True,
excluded_extensions: set[str] | None = None,
) -> list[str]:
"""Return implemented extensions that have no selected tests."""
covered_extensions = {
extension for test_metadata in selected_tests.values() for extension in test_metadata.required_extensions
}
untested_extensions = implemented_extensions - covered_extensions
if not include_priv_tests:
untested_extensions -= PRIV_EXTENSIONS
if excluded_extensions:
untested_extensions = {
ext for ext in untested_extensions
if not _is_excluded_extension(ext, excluded_extensions)
}
Comment on lines +117 to +121
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's drop the excluded extensions check in this function. If an extension is excluded it is valid to print a warning saying that extension is not tested. The EXCLUDED_EXTENSIONS list can be hidden in a Makefile and might not be obvious to users.

return sorted(untested_extensions)