-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Update the hasValue constraint test by adding a dedicated file #25344
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,6 +125,13 @@ def _GetSlowTests() -> Set[str]: | |
} | ||
|
||
|
||
def _GetPythonYamlOnlyTests() -> Set[str]: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is currently making this a test that only works in python and not codegen? |
||
"""List of tests that does not have a codegen version.""" | ||
return { | ||
"TestConstraintHasValue", | ||
} | ||
|
||
|
||
def _GetInDevelopmentTests() -> Set[str]: | ||
"""Tests that fail in YAML for some reason. | ||
|
||
|
@@ -191,6 +198,7 @@ def _hardcoded_python_yaml_tests(): | |
manual_tests = _GetManualTests() | ||
flaky_tests = _GetFlakyTests() | ||
slow_tests = _GetSlowTests() | ||
python_yaml_only_tests = _GetPythonYamlOnlyTests() | ||
in_development_tests = _GetInDevelopmentTests() | ||
|
||
for path in _AllYamlTests(): | ||
|
@@ -207,6 +215,9 @@ def _hardcoded_python_yaml_tests(): | |
if path.name in slow_tests: | ||
tags.add(TestTag.SLOW) | ||
|
||
if path.name in python_yaml_only_tests: | ||
tags.add(TestTag.PYTHON_YAML_ONLY) | ||
|
||
if path.name in in_development_tests: | ||
tags.add(TestTag.IN_DEVELOPMENT) | ||
|
||
|
@@ -223,6 +234,22 @@ def AllYamlTests(): | |
yield test | ||
|
||
|
||
def AllChipToolPythonTests(chip_tool: str): | ||
for test in tests_with_command(chip_tool, is_manual=False): | ||
yield test | ||
|
||
for test in tests_with_command(chip_tool, is_manual=True): | ||
yield test | ||
|
||
for test in _GetPythonYamlOnlyTests(): | ||
yield TestDefinition( | ||
run_name=test, | ||
name=test, | ||
target=target_for_name(test), | ||
tags=set([TestTag.PYTHON_YAML_ONLY]) | ||
) | ||
|
||
|
||
def AllChipToolTests(chip_tool: str): | ||
for test in tests_with_command(chip_tool, is_manual=False): | ||
yield test | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,6 +181,8 @@ def main(context, dry_run, log_level, target, target_glob, target_skip_glob, | |
# Figures out selected test that match the given name(s) | ||
if runtime == TestRunTime.CHIP_REPL_PYTHON: | ||
all_tests = [test for test in chiptest.AllYamlTests()] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we expect to converge on using the same subset of test? What is preventing us from using the same subset right now? The only thing that is not enabled for chip-repl is Andrei's argument is right now we have an allow list with |
||
elif runtime == TestRunTime.CHIP_TOOL_PYTHON: | ||
all_tests = [test for test in chiptest.AllChipToolPythonTests(chip_tool)] | ||
else: | ||
all_tests = [test for test in chiptest.AllChipToolTests(chip_tool)] | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, add type hinting value as
ConstraintValue