Skip to content

Commit f55d44c

Browse files
committed
Be explicit about which repos we update imports in
1 parent f626c72 commit f55d44c

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,25 +1676,11 @@ def update_import_cmd(args):
16761676
vc.git_command(SUITE.dir, ["checkout", "-b", f"update/GR-21590/{datetime.datetime.now().strftime('%d%m%y')}"])
16771677
current_branch = vc.active_branch(SUITE.dir)
16781678

1679-
suite_py_files = []
1680-
local_names = []
1681-
repos = []
1682-
1683-
# find all relevant other repos that may need updating
1684-
for sibling in os.listdir(os.path.join(SUITE.dir, "..")):
1685-
if sibling.startswith("graalpython"):
1686-
dd = os.path.join(SUITE.dir, "..", sibling)
1687-
jsonnetfile = os.path.join(dd, "ci.jsonnet")
1688-
if os.path.exists(jsonnetfile):
1689-
local_names.append(sibling)
1690-
repos.append(dd)
1691-
for dirpath, dirnames, filenames in os.walk(dd):
1692-
mx_dirs = list(filter(lambda x: x.startswith("mx."), dirnames))
1693-
if mx_dirs:
1694-
dirnames[:] = mx_dirs # don't go deeper once we found some mx dirs
1695-
dirnames[:] = list(filter(lambda x: not (x.startswith(".") or x.startswith("__")), dirnames))
1696-
if "suite.py" in filenames:
1697-
suite_py_files.append(join(dirpath, "suite.py"))
1679+
local_names = ["graalpython", "graalpython-apptests"]
1680+
repos = [os.path.join(SUITE.dir, "..", name) for name in local_names]
1681+
suite_py_files = [os.path.join(SUITE.dir, "..", name, f"mx.{name}", "suite.py") for name in local_names]
1682+
for suite_py in suite_py_files:
1683+
assert os.path.isfile(suite_py), f"Cannot find {suite_py}"
16981684

16991685
# make sure all other repos are clean and on the same branch
17001686
for d in repos:

0 commit comments

Comments
 (0)