def test_s(self): """ L{s} is deprecated, but pass keyword arguments to the first argument, to construct a step. """ stepFactory = s(BuildStep, name='test') self.assertEqual(stepFactory, _BuildStepFactory(BuildStep, name='test')) warnings = self.flushWarnings([self.test_s]) self.assertEqual(len(warnings), 1) self.assertEqual(warnings[0]['category'], DeprecationWarning)
def test_addStep_deprecated(self): """ Passing keyword arguments to L{BuildFactory.addStep} is deprecated, but pass the arguments to the first argument, to construct a step. """ factory = BuildFactory() factory.addStep(BuildStep) self.assertEqual(factory.steps, [_BuildStepFactory(BuildStep)]) warnings = self.flushWarnings([self.test_addStep_deprecated]) self.assertEqual(len(warnings), 1) self.assertEqual(warnings[0]['category'], DeprecationWarning)
def test_addStep_deprecated_withArguments(self): """ Passing keyword arguments to L{BuildFactory.addStep} is deprecated, but pass the arguments to the first argument, to construct a step. """ self.factory.addStep(BuildStep, name='test') self.assertEqual(self.factory.steps[-1], _BuildStepFactory(BuildStep, name='test')) warnings = self.flushWarnings([self.test_addStep_deprecated_withArguments]) self.assertEqual(len(warnings), 1) self.assertEqual(warnings[0]['category'], DeprecationWarning)
def test_addStep(self): # create a string random string that will probably not collide # with what is already in the factory string = ''.join(choice(ascii_uppercase) for x in range(6)) length = len(self.factory.steps) step = BuildStep(name=string) self.factory.addStep(step) # check if the number of nodes grew by one self.assertTrue(length + 1, len(self.factory.steps)) # check if the 'right' node added in the factory self.assertEqual(self.factory.steps[-1], _BuildStepFactory(BuildStep, name=string))
def test_tvos_build_factory(self): factory = factories.tvOSBuildFactory(platform='tvos-13', configuration='release', architectures=["arm64"]) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='tvos-13', configuration='release', architectures=["arm64"], buildOnly=False, triggers=None, triggered_by=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.FetchBranches), _BuildStepFactory(steps.ShowIdentifier), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory(steps.CompileWebKit, skipUpload=True), ])
def test_bindings_factory(self): factory = factories.BindingsFactory(platform='*', configuration=None, architectures=None) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='*', configuration=None, architectures=None, buildOnly=False, triggers=None, triggered_by=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.CheckPatchRelevance), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.FetchBranches), _BuildStepFactory(steps.ShowIdentifier), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.RunBindingsTests), ])
def test_generic_factory(self): factory = factories.Factory(platform='ios-simulator-13', configuration='release', architectures='arm64') self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='ios-simulator-13', configuration='release', architectures='arm64', buildOnly=True, triggers=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.ApplyPatch), ])
def test_jsc_armv7_factory(self): factory = factories.JSCBuildFactory(platform='jsc', configuration='release', architectures=["armv7"]) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='jsc', configuration='release', architectures=["armv7"], buildOnly=False, triggers=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.CheckPatchRelevance), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory(steps.CompileJSC), ])
def test_wpe_factory(self): factory = factories.WPEFactory(platform='wpe', configuration='release', architectures=['x86_64']) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='wpe', configuration='release', architectures=['x86_64'], buildOnly=True, triggers=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory(steps.InstallWpeDependencies), _BuildStepFactory(steps.CompileWebKit, skipUpload=True), ])
def test_macos_build_only_factory(self): factory = factories.macOSBuildOnlyFactory(platform='mac-bigsur', configuration='release', architectures=["arm64"]) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='mac-bigsur', configuration='release', architectures=["arm64"], buildOnly=False, triggers=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.CheckPatchRelevance), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory(steps.CompileWebKit, skipUpload=True), ])
def test_webkitpy_factory(self): factory = factories.WebKitPyFactory(platform='*', configuration=None, architectures=None) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='*', configuration=None, architectures=None, buildOnly=False, triggers=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.CheckPatchRelevance), _BuildStepFactory(steps.ValidatePatch, verifycqplus=False), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.RunWebKitPyPython2Tests), _BuildStepFactory(steps.RunWebKitPyPython3Tests), ])
def test_watchlist_factory(self): factory = factories.WatchListFactory(platform='*', configuration=None, architectures=None) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='*', configuration=None, architectures=None, buildOnly=False, triggers=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.FetchBranches), _BuildStepFactory(steps.ShowIdentifier), _BuildStepFactory(steps.UpdateWorkingDirectory), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.ApplyWatchList), ])
def test_ios_build_factory(self): factory = factories.iOSBuildFactory(platform='ios-simulator-13', configuration='release', architectures=["x86_64"]) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='ios-simulator-13', configuration='release', architectures=["x86_64"], buildOnly=False, triggers=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory(steps.CompileWebKit, skipUpload=False), ])
def test_webkitperl_factory(self): factory = factories.WebKitPerlFactory(platform='*', configuration=None, architectures=None) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='*', configuration=None, architectures=None, buildOnly=False, triggers=None, triggered_by=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.ShowIdentifier), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.RunWebKitPerlTests), ])
def test_style_factory(self): factory = factories.StyleFactory(platform='*', configuration=None, architectures=None) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='*', configuration=None, architectures=None, buildOnly=False, triggers=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.UpdateWorkingDirectory), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.CheckStyle), ])
def test_jsc_armv7_factory(self): factory = factories.JSCTestsFactory(platform='jsc', configuration='release', architectures=["armv7"]) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='jsc', configuration='release', architectures=["armv7"], buildOnly=False, triggers=None, triggered_by=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.CheckPatchRelevance), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.ShowIdentifier), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.DownloadBuiltProduct), _BuildStepFactory(steps.ExtractBuiltProduct), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory(steps.RunJavaScriptCoreTests), ])
def test_gtk_factory(self): factory = factories.GTKTestsFactory(platform='gtk', configuration='release', architectures=["x86_64"]) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='gtk', configuration='release', architectures=["x86_64"], buildOnly=False, triggers=None, triggered_by=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.ShowIdentifier), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.InstallGtkDependencies), _BuildStepFactory(steps.DownloadBuiltProduct), _BuildStepFactory(steps.ExtractBuiltProduct), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory(steps.RunWebKitTests), _BuildStepFactory(steps.SetBuildSummary), ])
def test_ios_wk2_factory(self): factory = factories.iOSTestsFactory(platform='ios-simulator-13', configuration='release', architectures=["x86_64"]) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='ios-simulator-13', configuration='release', architectures=["x86_64"], buildOnly=False, triggers=None, triggered_by=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.ShowIdentifier), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.DownloadBuiltProduct), _BuildStepFactory(steps.ExtractBuiltProduct), _BuildStepFactory(steps.WaitForCrashCollection), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory(steps.RunWebKitTests), _BuildStepFactory(steps.TriggerCrashLogSubmission), _BuildStepFactory(steps.SetBuildSummary), ])
def test_init(self): step = BuildStep() self.factory = BuildFactory([step]) self.assertEqual(self.factory.steps, [_BuildStepFactory(BuildStep)])
def test_windows_factory(self): factory = factories.WindowsFactory(platform='win', configuration='release', architectures=["x86_64"]) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='win', configuration='release', architectures=["x86_64"], buildOnly=False, triggers=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.ValidatePatch, verifycqplus=False), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory(steps.CompileWebKit, skipUpload=True), _BuildStepFactory( steps.ValidatePatch, verifyBugClosed=False, addURLs=False), _BuildStepFactory(steps.RunWebKit1Tests), _BuildStepFactory(steps.SetBuildSummary), ])
def test_addStep(self): step = BuildStep() factory = BuildFactory() factory.addStep(step) self.assertEqual(factory.steps, [_BuildStepFactory(BuildStep)])
def test_addSteps(self): factory = BuildFactory() factory.addSteps([BuildStep(), BuildStep()]) self.assertEqual(factory.steps, [_BuildStepFactory(BuildStep), _BuildStepFactory(BuildStep)])
def test_macos_wk1_debug_factory(self): factory = factories.macOSWK1Factory(platform='mac-catalina', configuration='debug', architectures=["x86_64"]) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='mac-catalina', configuration='debug', architectures=["x86_64"], buildOnly=False, triggers=None, triggered_by=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.CheckPatchRelevance), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.FetchBranches), _BuildStepFactory(steps.ShowIdentifier), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.DownloadBuiltProduct), _BuildStepFactory(steps.ExtractBuiltProduct), _BuildStepFactory(steps.WaitForCrashCollection), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory(steps.FindModifiedLayoutTests, skipBuildIfNoResult=False), _BuildStepFactory(steps.RunWebKitTestsInStressMode, num_iterations=10), _BuildStepFactory(steps.RunWebKit1Tests), _BuildStepFactory(steps.TriggerCrashLogSubmission), _BuildStepFactory(steps.SetBuildSummary), ])
def test_gtk_build_factory(self): factory = factories.GTKBuildFactory(platform='gtk', configuration='release', architectures=['x86_64']) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='gtk', configuration='release', architectures=['x86_64'], buildOnly=False, triggers=None, triggered_by=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.FetchBranches), _BuildStepFactory(steps.ShowIdentifier), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory(steps.InstallGtkDependencies), _BuildStepFactory(steps.CompileWebKit, skipUpload=False), ])
def test_init(self): step = BuildStep() factory = BuildFactory([step]) self.assertEqual(factory.steps, [_BuildStepFactory(BuildStep)])
def test_services_factory(self): factory = factories.ServicesFactory(platform='*', configuration=None, architectures=None) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='*', configuration=None, architectures=None, buildOnly=False, triggers=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.CheckPatchRelevance), _BuildStepFactory(steps.ValidatePatch, verifycqplus=False), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.RunEWSUnitTests), _BuildStepFactory(steps.RunEWSBuildbotCheckConfig), _BuildStepFactory(steps.RunResultsdbpyTests), _BuildStepFactory(steps.RunBuildWebKitOrgUnitTests), ])
def test_addSteps(self): self.factory.addSteps([BuildStep(), BuildStep()]) self.assertEqual( self.factory.steps[-2:], [_BuildStepFactory(BuildStep), _BuildStepFactory(BuildStep)])
def test_addSteps(self): self.factory.addSteps([BuildStep(), BuildStep()]) self.assertEqual(self.factory.steps[-2:], [_BuildStepFactory(BuildStep), _BuildStepFactory(BuildStep)])
def test_commit_queue_factory(self): factory = factories.CommitQueueFactory(platform='mac-mojave', configuration='release', architectures=["x86_64"]) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='mac-mojave', configuration='release', architectures=["x86_64"], buildOnly=False, triggers=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.ValidatePatch, verifycqplus=True), _BuildStepFactory(steps.ValidateCommiterAndReviewer), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.ShowIdentifier), _BuildStepFactory(steps.UpdateWorkingDirectory), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.ValidateChangeLogAndReviewer), _BuildStepFactory(steps.FindModifiedChangeLogs), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory(steps.CompileWebKit, skipUpload=True), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory( steps.ValidatePatch, addURLs=False, verifycqplus=True), _BuildStepFactory(steps.CheckPatchStatusOnEWSQueues), _BuildStepFactory(steps.RunWebKitTests), _BuildStepFactory( steps.ValidatePatch, addURLs=False, verifycqplus=True), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.UpdateWorkingDirectory), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.CreateLocalGITCommit), _BuildStepFactory(steps.PushCommitToWebKitRepo), _BuildStepFactory(steps.SetBuildSummary), ])
def test_macos_wk1_debug_factory(self): factory = factories.macOSWK1Factory(platform='mac-mojave', configuration='debug', architectures=["x86_64"]) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='mac-mojave', configuration='debug', architectures=["x86_64"], buildOnly=False, triggers=None, triggered_by=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.CheckPatchRelevance), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.DownloadBuiltProduct), _BuildStepFactory(steps.ExtractBuiltProduct), _BuildStepFactory(steps.WaitForCrashCollection), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory(steps.RunWebKit1Tests), _BuildStepFactory(steps.TriggerCrashLogSubmission), _BuildStepFactory(steps.SetBuildSummary), ])
def test_stress_test_factory(self): factory = factories.StressTestFactory(platform='mac-catalina', configuration='release', architectures=["x86_64"]) self.assertBuildSteps(factory.steps, [ _BuildStepFactory(steps.ConfigureBuild, platform='mac-catalina', configuration='release', architectures=["x86_64"], buildOnly=False, triggers=None, triggered_by=None, remotes=None, additionalArguments=None), _BuildStepFactory(steps.FindModifiedLayoutTests), _BuildStepFactory(steps.ValidatePatch), _BuildStepFactory(steps.PrintConfiguration), _BuildStepFactory(steps.CheckOutSource), _BuildStepFactory(steps.CheckOutSpecificRevision), _BuildStepFactory(steps.FetchBranches), _BuildStepFactory(steps.ShowIdentifier), _BuildStepFactory(steps.ApplyPatch), _BuildStepFactory(steps.DownloadBuiltProduct), _BuildStepFactory(steps.ExtractBuiltProduct), _BuildStepFactory(steps.WaitForCrashCollection), _BuildStepFactory(steps.KillOldProcesses), _BuildStepFactory(steps.RunWebKitTestsInStressMode), _BuildStepFactory(steps.RunWebKitTestsInStressGuardmallocMode), _BuildStepFactory(steps.TriggerCrashLogSubmission), _BuildStepFactory(steps.SetBuildSummary), ])