Skip to content
Snippets Groups Projects
Commit f0c52b76 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

auto-case: add rust variant when applicable

parent fca46a01
No related branches found
No related tags found
No related merge requests found
Pipeline #55418 passed
......@@ -15,6 +15,11 @@
"3.7": 'tagged("5.2")::',
}
FLAVOR_COMPATIBILITY = {
"rust": '(9183b7dcfa8d::)'
}
class Case:
def __init__(
......@@ -41,5 +46,5 @@
def mercurial_repository_path(base_dir):
return base_dir / "repos" / "mercurial"
def list_mercurial_variants(base_dir):
def list_mercurial_variants(base_dir, changeset):
"""return a list of possible mercurial variants"""
......@@ -45,5 +50,12 @@
"""return a list of possible mercurial variants"""
return ["default", "pure"] # lets keep it simple for now
variants = ["default", "pure"] # lets keep it simple for now
for k, v in FLAVOR_COMPATIBILITY.items():
revs = list_mercurial_hashes(base_dir, v)
if changeset in revs:
variants.append(k)
return variants
def list_mercurial_hashes(base_dir, interval="all()"):
"""return a list of possible mercurial hashes"""
......@@ -115,9 +127,8 @@
mercurial_intervals = PY_VERSION_COMPATIBILITY.get(python_version, "all()")
variants = list_mercurial_variants(base_dir)
hashes = list_mercurial_hashes(base_dir, mercurial_intervals)
datas = list_data_envs(base_dir)
benchmarks = list_benchmarks(base_dir)
for i in range(size):
h = random.choice(hashes)
......@@ -119,8 +130,9 @@
hashes = list_mercurial_hashes(base_dir, mercurial_intervals)
datas = list_data_envs(base_dir)
benchmarks = list_benchmarks(base_dir)
for i in range(size):
h = random.choice(hashes)
variants = list_mercurial_variants(base_dir, h)
compatible_datas = [d for d in datas if compatible_with(base_dir, d, h)]
yield Case(
h,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment