Run pre-commit's whitespace related hooks on .github and .azuredevops (#2129)

In order for pre-commit to be useful, everything needs to meet a common
baseline.

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
This commit is contained in:
Mario Limonciello
2025-12-08 14:39:42 -06:00
gecommit door GitHub
bovenliggende 354cc98d55
commit 6a899b5f6d
11 gewijzigde bestanden met toevoegingen van 59 en 59 verwijderingen
@@ -12,60 +12,60 @@ class ConfigureCITest(unittest.TestCase):
"is_pull_request": True,
"input_subtrees": "projects/rocprim\nprojects/hipcub"
}
project_to_run = therock_configure_ci.retrieve_projects(args)
self.assertEqual(len(project_to_run), 1)
def test_pull_request_empty(self):
args = {
"is_pull_request": True,
"input_subtrees": ""
}
project_to_run = therock_configure_ci.retrieve_projects(args)
self.assertEqual(len(project_to_run), 0)
def test_workflow_dispatch(self):
args = {
"is_workflow_dispatch": True,
"input_projects": "projects/rocprim projects/hipcub"
}
project_to_run = therock_configure_ci.retrieve_projects(args)
self.assertEqual(len(project_to_run), 1)
def test_workflow_dispatch_bad_input(self):
args = {
"is_workflow_dispatch": True,
"input_projects": "projects/rocprim$$projects/hipcub"
}
project_to_run = therock_configure_ci.retrieve_projects(args)
self.assertEqual(len(project_to_run), 0)
def test_workflow_dispatch_all(self):
args = {
"is_workflow_dispatch": True,
"input_projects": "all"
}
project_to_run = therock_configure_ci.retrieve_projects(args)
self.assertGreaterEqual(len(project_to_run), 1)
def test_workflow_dispatch_empty(self):
args = {
"is_workflow_dispatch": True,
"input_projects": ""
}
project_to_run = therock_configure_ci.retrieve_projects(args)
self.assertEqual(len(project_to_run), 0)
def test_is_push(self):
args = {
"is_push": True,
}
project_to_run = therock_configure_ci.retrieve_projects(args)
self.assertGreaterEqual(len(project_to_run), 1)
@@ -30,7 +30,7 @@ def set_github_output(d: Mapping[str, str]):
return
with open(step_output_file, "a") as f:
f.writelines(f"{k}={v}" + "\n" for k, v in d.items())
def retry(max_attempts, delay_seconds, exceptions):
def decorator(func):
def newfn(*args, **kwargs):
@@ -111,7 +111,7 @@ def retrieve_projects(args):
# retrieve the subtrees to checkout, cmake options to build, and projects to test
project_to_run = []
# Currently as we have no tests, we just build all packages available if an applicable change is made.
# Currently as we have no tests, we just build all packages available if an applicable change is made.
# As we start to get an idea of test times, we can divide test jobs.
if projects:
for project in ["all"]:
+15 -15
Bestand weergeven
@@ -2,21 +2,21 @@
This dictionary is used to map specific file directory changes to the corresponding build flag and tests
"""
subtree_to_project_map = {
'projects/aqlprofile': 'profiler',
'projects/clr': 'core',
'projects/hip': 'core',
'projects/hip-tests': 'core',
'projects/hipother': 'core',
'projects/rdc': 'rdc',
'projects/rocm-core': 'core',
'projects/rocm-smi-lib': 'core',
'projects/rocminfo': 'core',
'projects/rocprofiler-compute': 'profiler',
'projects/rocprofiler-register': 'profiler',
'projects/rocprofiler-sdk': 'profiler',
'projects/rocprofiler-systems': 'profiler',
'projects/rocprofiler': 'profiler',
'projects/rocr-runtime': 'core',
'projects/aqlprofile': 'profiler',
'projects/clr': 'core',
'projects/hip': 'core',
'projects/hip-tests': 'core',
'projects/hipother': 'core',
'projects/rdc': 'rdc',
'projects/rocm-core': 'core',
'projects/rocm-smi-lib': 'core',
'projects/rocminfo': 'core',
'projects/rocprofiler-compute': 'profiler',
'projects/rocprofiler-register': 'profiler',
'projects/rocprofiler-sdk': 'profiler',
'projects/rocprofiler-systems': 'profiler',
'projects/rocprofiler': 'profiler',
'projects/rocr-runtime': 'core',
'projects/roctracer': 'profiler'
}