Skip to content

Commit

Permalink
Reduce code repeating in common_factories
Browse files Browse the repository at this point in the history
  • Loading branch information
cvicentiu committed Dec 3, 2024
1 parent e17185e commit 874c8dc
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions common_factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,22 @@ def run(self):
def addPostTests(factory):
factory.addStep(saveLogs())

properties = {
"tarbuildnum": Property("tarbuildnum"),
"mariadb_binary": Property("mariadb_binary"),
"mariadb_version": Property("mariadb_version"),
"master_branch": Property("master_branch"),
"parentbuildername": Property("buildername"),
}

# trigger packages
factory.addStep(
steps.Trigger(
schedulerNames=["s_packages"],
waitForFinish=False,
updateSourceStamp=False,
alwaysRun=True,
set_properties={
"parentbuildername": Property("buildername"),
"tarbuildnum": Property("tarbuildnum"),
"mariadb_version": Property("mariadb_version"),
"master_branch": Property("master_branch"),
},
set_properties=properties,
doStepIf=hasAutobake,
)
)
Expand All @@ -128,12 +131,7 @@ def addPostTests(factory):
schedulerNames=["s_bigtest"],
waitForFinish=False,
updateSourceStamp=False,
set_properties={
"parentbuildername": Property("buildername"),
"tarbuildnum": Property("tarbuildnum"),
"mariadb_version": Property("mariadb_version"),
"master_branch": Property("master_branch"),
},
set_properties=properties,
doStepIf=hasBigtest,
)
)
Expand Down Expand Up @@ -167,13 +165,7 @@ def addPostTests(factory):
schedulerNames=["s_eco"],
waitForFinish=False,
updateSourceStamp=False,
set_properties={
"tarbuildnum": Property("tarbuildnum"),
"mariadb_binary": Property("mariadb_binary"),
"mariadb_version": Property("mariadb_version"),
"master_branch": Property("master_branch"),
"parentbuildername": Property("buildername"),
},
set_properties=properties,
doStepIf=lambda step: savePackage(step) and hasEco(step),
)
)
Expand Down

0 comments on commit 874c8dc

Please sign in to comment.