Fix syntax error in azure subtree script (#988)
Αυτή η υποβολή περιλαμβάνεται σε:
υποβλήθηκε από
GitHub
γονέας
f24e2ca676
υποβολή
c0e7091b9f
@@ -32,20 +32,25 @@ from typing import List, Optional
|
||||
def parse_arguments(argv: Optional[List[str]] = None) -> argparse.Namespace:
|
||||
"""Parse command-line arguments."""
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Given a list of changed subtrees, determine which Azure pipelines to run.")
|
||||
parser.add_argument("--subtree-file", required=True,
|
||||
help="Path to the file containing changed subtrees")
|
||||
description="Given a list of changed subtrees, determine which Azure pipelines to run."
|
||||
)
|
||||
parser.add_argument(
|
||||
"--subtree-file",
|
||||
required=True,
|
||||
help="Path to the file containing changed subtrees",
|
||||
)
|
||||
return parser.parse_args(argv)
|
||||
|
||||
|
||||
def read_file_into_set(file_path):
|
||||
"""Reads the project names from the file into a set."""
|
||||
with open(file_path, 'r') as file:
|
||||
with open(file_path, "r") as file:
|
||||
return {line.strip() for line in file}
|
||||
|
||||
|
||||
def resolve_dependencies(projects, dependencies):
|
||||
"""Resolves projects to be run by checking all levels of dependencies."""
|
||||
|
||||
def has_dependency(project, projects_set):
|
||||
"""Recursively checks if a project has any dependencies in the projects_set."""
|
||||
if project not in dependencies:
|
||||
@@ -69,7 +74,7 @@ def main(argv=None) -> None:
|
||||
# Systems build+test dependency tree as defined in Azure CI and TheRock
|
||||
systems_dependencies = {
|
||||
"projects/clr": {"projects/hip"},
|
||||
"projects/hip": {"projects/hipother"}
|
||||
"projects/hip": {"projects/hipother"},
|
||||
}
|
||||
# Azure pipeline IDs for each project, to be populated as projects are enabled
|
||||
definition_ids = {
|
||||
@@ -82,7 +87,7 @@ def main(argv=None) -> None:
|
||||
"projects/rocprofiler-compute": 344,
|
||||
"projects/rocprofiler-systems": 345,
|
||||
"projects/rocm-core": 349,
|
||||
"projects/rocr-runtime": 354
|
||||
"projects/rocr-runtime": 354,
|
||||
"projects/rocminfo": 356,
|
||||
"projects/rocm-smi-lib": 358,
|
||||
"projects/hip-tests": 362,
|
||||
|
||||
Αναφορά σε νέο ζήτημα
Block a user