diff --git a/common_factories.py b/common_factories.py index 6f39e913..ff7e9822 100644 --- a/common_factories.py +++ b/common_factories.py @@ -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, @@ -96,7 +96,7 @@ def addPostTests(f_quick_build): ) ) ## trigger bigtest - f_quick_build.addStep( + factory.addStep( steps.Trigger( schedulerNames=["s_bigtest"], waitForFinish=False, @@ -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, @@ -134,7 +134,7 @@ def addPostTests(f_quick_build): doStepIf=savePackage, ) ) - f_quick_build.addStep( + factory.addStep( steps.Trigger( name="eco", schedulerNames=["s_eco"], @@ -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=""): @@ -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"}, @@ -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, @@ -250,7 +250,7 @@ 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, @@ -258,11 +258,11 @@ def addTests(f_quick_build, test_type, mtrDbPool, mtrArgs): 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", @@ -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, @@ -308,7 +308,7 @@ def addGaleraTests(f_quick_build, mtrDbPool): doStepIf=hasGalera, ) ) - return f_quick_build + return factory def getQuickBuildFactory(test_type, mtrDbPool):