Skip to content

Commit

Permalink
common: change f_quick_build arg to just factory
Browse files Browse the repository at this point in the history
  • Loading branch information
grooverdan committed Apr 24, 2024
1 parent a8f040b commit 03383e5
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions common_factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ def run(self):
return results.SUCCESS


def addPostTests(f_quick_build):
f_quick_build.addStep(saveLogs())
def addPostTests(factory):
factory.addStep(saveLogs())

## trigger packages
f_quick_build.addStep(
factory.addStep(
steps.Trigger(
schedulerNames=["s_packages"],
waitForFinish=False,
Expand All @@ -96,7 +96,7 @@ def addPostTests(f_quick_build):
)
)
## trigger bigtest
f_quick_build.addStep(
factory.addStep(
steps.Trigger(
schedulerNames=["s_bigtest"],
waitForFinish=False,
Expand All @@ -111,14 +111,14 @@ def addPostTests(f_quick_build):
)
)
# create package and upload to master
f_quick_build.addStep(
factory.addStep(
steps.SetPropertyFromCommand(
command="basename mariadb-*-linux-*.tar.gz",
property="mariadb_binary",
doStepIf=savePackage,
)
)
f_quick_build.addStep(
factory.addStep(
steps.ShellCommand(
name="save_packages",
timeout=7200,
Expand All @@ -134,7 +134,7 @@ def addPostTests(f_quick_build):
doStepIf=savePackage,
)
)
f_quick_build.addStep(
factory.addStep(
steps.Trigger(
name="eco",
schedulerNames=["s_eco"],
Expand All @@ -151,12 +151,12 @@ def addPostTests(f_quick_build):
doStepIf=lambda step: savePackage(step) and hasEco(step),
)
)
f_quick_build.addStep(
factory.addStep(
steps.ShellCommand(
name="cleanup", command="rm -r * .* 2> /dev/null || true", alwaysRun=True
)
)
return f_quick_build
return factory


def getBuildFactoryPreTest(build_type="RelWithDebInfo", additional_args=""):
Expand Down Expand Up @@ -210,8 +210,8 @@ def getBuildFactoryPreTest(build_type="RelWithDebInfo", additional_args=""):
return f_quick_build


def addTests(f_quick_build, test_type, mtrDbPool, mtrArgs):
f_quick_build.addStep(
def addTests(factory, test_type, mtrDbPool, mtrArgs):
factory.addStep(
steps.MTR(
name=f"{test_type} test",
logfiles={"mysqld*": "./buildbot/mysql_logs.html"},
Expand All @@ -236,7 +236,7 @@ def addTests(f_quick_build, test_type, mtrDbPool, mtrArgs):
env=MTR_ENV,
)
)
f_quick_build.addStep(
factory.addStep(
steps.ShellCommand(
name=f"move {test_type} mariadb log files",
alwaysRun=True,
Expand All @@ -250,19 +250,19 @@ def addTests(f_quick_build, test_type, mtrDbPool, mtrArgs):
],
)
)
f_quick_build.addStep(
factory.addStep(
steps.ShellCommand(
name=f"create {test_type} var archive",
alwaysRun=True,
command=["bash", "-c", util.Interpolate(createVar(output_dir=test_type))],
doStepIf=hasFailed,
)
)
return f_quick_build
return factory


def addGaleraTests(f_quick_build, mtrDbPool):
f_quick_build.addStep(
def addGaleraTests(factory, mtrDbPool):
factory.addStep(
steps.MTR(
description="testing galera",
descriptionDone="test galera",
Expand Down Expand Up @@ -291,7 +291,7 @@ def addGaleraTests(f_quick_build, mtrDbPool):
doStepIf=hasGalera,
)
)
f_quick_build.addStep(
factory.addStep(
steps.ShellCommand(
name="move mariadb galera log files",
alwaysRun=True,
Expand All @@ -308,7 +308,7 @@ def addGaleraTests(f_quick_build, mtrDbPool):
doStepIf=hasGalera,
)
)
return f_quick_build
return factory


def getQuickBuildFactory(test_type, mtrDbPool):
Expand Down

0 comments on commit 03383e5

Please sign in to comment.