Changeset 247694 in webkit


Ignore:
Timestamp:
Jul 22, 2019 12:16:34 PM (5 years ago)
Author:
aakash_jain@apple.com
Message:

[ews-build] Add an EWS to run services tests
https://bugs.webkit.org/show_bug.cgi?id=199994

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/config.json: Added Services-EWS configuration.
  • BuildSlaveSupport/ews-build/factories.py: Added ServicesFactory.
  • BuildSlaveSupport/ews-build/steps.py:

(CheckPatchRelevance): Run this EWS only for patches with changes in relevant files.
(RunEWSUnitTests): Build step to run EWS unit-tests.
(RunEWSBuildbotCheckConfig): Build step to run buildbot checkconfig command.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py: Added services status-bubble.
Location:
trunk/Tools
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py

    r247622 r247694  
    4141    # FIXME: Auto-generate this list https://bugs.webkit.org/show_bug.cgi?id=195640
    4242    ALL_QUEUES = ['ios', 'ios-sim', 'gtk', 'wpe', 'wincairo', 'ios-wk2', 'api-ios', 'api-mac', 'bindings', 'jsc', 'mac', 'mac-32bit', 'mac-32bit-wk2',
    43                     'mac-debug', 'mac-debug-wk1', 'mac-wk1', 'mac-wk2', 'style', 'webkitperl', 'webkitpy', 'win']
    44     ENABLED_QUEUES = ['ios', 'ios-sim', 'gtk', 'wpe', 'wincairo', 'ios-wk2', 'api-ios', 'api-mac', 'bindings', 'webkitperl', 'webkitpy']
     43                    'mac-debug', 'mac-debug-wk1', 'mac-wk1', 'mac-wk2', 'style', 'webkitperl', 'webkitpy', 'win', 'services']
     44    ENABLED_QUEUES = ['ios', 'ios-sim', 'gtk', 'wpe', 'wincairo', 'ios-wk2', 'api-ios', 'api-mac', 'bindings', 'webkitperl', 'webkitpy', 'services']
    4545    # FIXME: Auto-generate the queue's trigger relationship
    4646    QUEUE_TRIGGERS = {
  • trunk/Tools/BuildSlaveSupport/ews-build/config.json

    r247622 r247694  
    440440      "platform": "*",
    441441      "workernames": ["ews119", "ews150", "ews153", "ews155"]
     442    },
     443    {
     444      "name": "Services-EWS",
     445      "shortname": "services",
     446      "factory": "ServicesFactory",
     447      "platform": "*",
     448      "workernames": ["ews151"]
    442449    }
    443450  ],
     
    448455      "port": 5555,
    449456      "builderNames": ["Bindings-Tests-EWS", "GTK-Webkit2-EWS", "iOS-12-Build-EWS", "iOS-12-Simulator-Build-EWS",
    450                        "macOS-High-Sierra-Release-Build-EWS", "WebKitPerl-Tests-EWS", "WebKitPy-Tests-EWS", "WPE-EWS", "WinCairo-EWS"]
     457                       "macOS-High-Sierra-Release-Build-EWS", "Services-EWS", "WebKitPerl-Tests-EWS", "WebKitPy-Tests-EWS", "WPE-EWS", "WinCairo-EWS"]
    451458    },
    452459    {
  • trunk/Tools/BuildSlaveSupport/ews-build/factories.py

    r247412 r247694  
    2828                   CheckStyle, CompileJSCOnly, CompileJSCOnlyToT, CompileWebKit, ConfigureBuild,
    2929                   DownloadBuiltProduct, ExtractBuiltProduct, InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses,
    30                    PrintConfiguration, ReRunJavaScriptCoreTests, RunAPITests, RunBindingsTests,
     30                   PrintConfiguration, ReRunJavaScriptCoreTests, RunAPITests, RunBindingsTests, RunEWSBuildbotCheckConfig, RunEWSUnitTests,
    3131                   RunJavaScriptCoreTests, RunJavaScriptCoreTestsToT, RunWebKit1Tests, RunWebKitPerlTests,
    3232                   RunWebKitPyTests, RunWebKitTests, UnApplyPatchIfRequired, ValidatePatch)
     
    159159        self.addStep(InstallWpeDependencies())
    160160        self.addStep(CompileWebKit(skipUpload=True))
     161
     162
     163class ServicesFactory(Factory):
     164    def __init__(self, platform, configuration=None, architectures=None, additionalArguments=None, **kwargs):
     165        Factory.__init__(self, platform, configuration, architectures, False, additionalArguments, checkRelevance=True)
     166        self.addStep(RunEWSUnitTests())
     167        self.addStep(RunEWSBuildbotCheckConfig())
  • trunk/Tools/BuildSlaveSupport/ews-build/loadConfig.py

    r246862 r247694  
    3434                       JSCTestsFactory, StyleFactory, TestFactory, WPEFactory, WebKitPerlFactory,
    3535                       WebKitPyFactory, WinCairoFactory, WindowsFactory, iOSBuildFactory, iOSTestsFactory,
    36                        macOSBuildFactory, macOSWK1Factory, macOSWK2Factory)
     36                       macOSBuildFactory, macOSWK1Factory, macOSWK2Factory, ServicesFactory)
    3737
    3838BUILDER_NAME_LENGTH_LIMIT = 70
  • trunk/Tools/BuildSlaveSupport/ews-build/steps.py

    r247683 r247694  
    207207    ]
    208208
     209    services_paths = [
     210        'Tools/BuildSlaveSupport/ews-build',
     211    ]
     212
    209213    jsc_paths = [
    210214        'JSTests/',
     
    235239    group_to_paths_mapping = {
    236240        'bindings': bindings_paths,
     241        'services-ews': services_paths,
    237242        'jsc': jsc_paths,
    238243        'webkitpy': webkitpy_paths,
     
    568573    def __init__(self, **kwargs):
    569574        super(RunWebKitPerlTests, self).__init__(timeout=2 * 60, logEnviron=False, **kwargs)
     575
     576
     577class RunEWSUnitTests(shell.ShellCommand):
     578    name = 'ews-unit-tests'
     579    description = ['ews-unit-tests running']
     580    command = ['python', 'Tools/BuildSlaveSupport/ews-build/runUnittests.py']
     581
     582    def __init__(self, **kwargs):
     583        super(RunEWSUnitTests, self).__init__(timeout=2 * 60, logEnviron=False, **kwargs)
     584
     585    def getResultSummary(self):
     586        if self.results == SUCCESS:
     587            return {u'step': u'Passed EWS unit tests'}
     588        return {u'step': u'Failed EWS unit tests'}
     589
     590
     591class RunEWSBuildbotCheckConfig(shell.ShellCommand):
     592    name = 'buildbot-check-config'
     593    description = ['buildbot-checkconfig running']
     594    command = ['buildbot', 'checkconfig']
     595
     596    def __init__(self, **kwargs):
     597        super(RunEWSBuildbotCheckConfig, self).__init__(workdir='build/Tools/BuildSlaveSupport/ews-build', timeout=2 * 60, logEnviron=False, **kwargs)
     598
     599    def getResultSummary(self):
     600        if self.results == SUCCESS:
     601            return {u'step': u'Passed buildbot checkconfig'}
     602        return {u'step': u'Failed buildbot checkconfig'}
    570603
    571604
  • trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py

    r247683 r247694  
    4040                   DownloadBuiltProduct, ExtractBuiltProduct, ExtractTestResults, InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses,
    4141                   PrintConfiguration, ReRunAPITests, ReRunJavaScriptCoreTests, ReRunWebKitTests, RunAPITests, RunAPITestsWithoutPatch,
    42                    RunBindingsTests, RunJavaScriptCoreTests, RunJavaScriptCoreTestsToT, RunWebKit1Tests, RunWebKitPerlTests,
    43                    RunWebKitPyTests, RunWebKitTests, TestWithFailureCount, Trigger, TransferToS3, UnApplyPatchIfRequired,
     42                   RunBindingsTests, RunEWSBuildbotCheckConfig, RunEWSUnitTests, RunJavaScriptCoreTests, RunJavaScriptCoreTestsToT, RunWebKit1Tests,
     43                   RunWebKitPerlTests, RunWebKitPyTests, RunWebKitTests, TestWithFailureCount, Trigger, TransferToS3, UnApplyPatchIfRequired,
    4444                   UploadBuiltProduct, UploadTestResults, ValidatePatch)
    4545
     
    407407        )
    408408        self.expectOutcome(result=FAILURE, state_string='webkitpy-tests (failure)')
     409        return self.runStep()
     410
     411
     412class TestRunEWSBuildbotCheckConfig(BuildStepMixinAdditions, unittest.TestCase):
     413    def setUp(self):
     414        self.longMessage = True
     415        return self.setUpBuildStep()
     416
     417    def tearDown(self):
     418        return self.tearDownBuildStep()
     419
     420    def test_success(self):
     421        self.setupStep(RunEWSBuildbotCheckConfig())
     422        self.expectRemoteCommands(
     423            ExpectShell(workdir='build/Tools/BuildSlaveSupport/ews-build',
     424                        timeout=120,
     425                        logEnviron=False,
     426                        command=['buildbot', 'checkconfig'],
     427                        )
     428            + 0,
     429        )
     430        self.expectOutcome(result=SUCCESS, state_string='Passed buildbot checkconfig')
     431        return self.runStep()
     432
     433    def test_failure(self):
     434        self.setupStep(RunEWSBuildbotCheckConfig())
     435        self.expectRemoteCommands(
     436            ExpectShell(workdir='build/Tools/BuildSlaveSupport/ews-build',
     437                        timeout=120,
     438                        logEnviron=False,
     439                        command=['buildbot', 'checkconfig'],
     440                        )
     441            + ExpectShell.log('stdio', stdout='Configuration Errors:  builder(s) iOS-12-Debug-Build-EWS have no schedulers to drive them')
     442            + 2,
     443        )
     444        self.expectOutcome(result=FAILURE, state_string='Failed buildbot checkconfig')
     445        return self.runStep()
     446
     447
     448class TestRunEWSUnitTests(BuildStepMixinAdditions, unittest.TestCase):
     449    def setUp(self):
     450        self.longMessage = True
     451        return self.setUpBuildStep()
     452
     453    def tearDown(self):
     454        return self.tearDownBuildStep()
     455
     456    def test_success(self):
     457        self.setupStep(RunEWSUnitTests())
     458        self.expectRemoteCommands(
     459            ExpectShell(workdir='wkdir',
     460                        timeout=120,
     461                        logEnviron=False,
     462                        command=['python', 'Tools/BuildSlaveSupport/ews-build/runUnittests.py'],
     463                        )
     464            + 0,
     465        )
     466        self.expectOutcome(result=SUCCESS, state_string='Passed EWS unit tests')
     467        return self.runStep()
     468
     469    def test_failure(self):
     470        self.setupStep(RunEWSUnitTests())
     471        self.expectRemoteCommands(
     472            ExpectShell(workdir='wkdir',
     473                        timeout=120,
     474                        logEnviron=False,
     475                        command=['python', 'Tools/BuildSlaveSupport/ews-build/runUnittests.py'],
     476                        )
     477            + ExpectShell.log('stdio', stdout='Unhandled Error. Traceback (most recent call last): Keys in cmd missing from expectation: [logfiles.json]')
     478            + 2,
     479        )
     480        self.expectOutcome(result=FAILURE, state_string='Failed EWS unit tests')
    409481        return self.runStep()
    410482
  • trunk/Tools/ChangeLog

    r247692 r247694  
     12019-07-22  Aakash Jain  <aakash_jain@apple.com>
     2
     3        [ews-build] Add an EWS to run services tests
     4        https://bugs.webkit.org/show_bug.cgi?id=199994
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        * BuildSlaveSupport/ews-build/config.json: Added Services-EWS configuration.
     9        * BuildSlaveSupport/ews-build/factories.py: Added ServicesFactory.
     10        * BuildSlaveSupport/ews-build/steps.py:
     11        (CheckPatchRelevance): Run this EWS only for patches with changes in relevant files.
     12        (RunEWSUnitTests): Build step to run EWS unit-tests.
     13        (RunEWSBuildbotCheckConfig): Build step to run buildbot checkconfig command.
     14        * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
     15        * BuildSlaveSupport/ews-app/ews/views/statusbubble.py: Added services status-bubble.
     16
    1172019-07-22  Youenn Fablet  <youenn@apple.com>
    218
Note: See TracChangeset for help on using the changeset viewer.