Skip to content

Commit 6a722ba

Browse files
committed
update verify_ci wrapper function to support the multi repo case as well
1 parent a098492 commit 6a722ba

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -908,18 +908,21 @@ def import_python_sources(args):
908908
# add ci verification util
909909
#
910910
# ----------------------------------------------------------------------------------------------------------------------
911-
def verify_ci(dest_suite, common_dirs=None, args=None):
911+
def verify_ci(dest_suite, common_ci_dir="ci_common", args=None, ext=('.jsonnet', '.libsonnet')):
912912
"""Verify CI configuration"""
913-
if common_dirs is None:
914-
common_dirs = ['ci_common']
915913
base_suite = SUITE
916914
if not isinstance(dest_suite, mx.SourceSuite) or not isinstance(base_suite, mx.SourceSuite):
917915
raise mx.abort("Can not use verify-ci on binary suites: {} and {} need to be source suites".format(
918916
SUITE.name, dest_suite.name))
919917
assert isinstance(base_suite, mx.SourceSuite)
920-
for ext in [".libsonnet", ".jsonnet"]:
921-
mx.log("CI setup verifying *{} files ... ".format(ext))
922-
mx.verify_ci(args, base_suite, dest_suite, common_dirs=common_dirs, extension=ext)
918+
919+
ci_files = [os.path.join(common_ci_dir, name)
920+
for name in os.listdir(os.path.join(SUITE.dir, common_ci_dir))
921+
if os.path.splitext(name)[-1] in ext]
922+
923+
for common_file in ci_files:
924+
mx.log("CI setup verifying {} ... ".format(common_file))
925+
mx.verify_ci(args, base_suite, dest_suite, common_file=common_file)
923926

924927

925928
# ----------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)