Changeset 279953 in webkit


Ignore:
Timestamp:
Jul 15, 2021, 10:17:23 AM (4 years ago)
Author:
aakash_jain@apple.com
Message:

Add unit-tests for InstallBuiltProduct step
https://bugs.webkit.org/show_bug.cgi?id=227990

Reviewed by Philippe Normand.

  • CISupport/build-webkit-org/steps_unittest.py:
  • CISupport/ews-build/steps_unittest.py:
Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/CISupport/build-webkit-org/steps_unittest.py

    r279665 r279953  
    12841284        self.expectOutcome(result=FAILURE, state_string='Failed to print configuration')
    12851285        return self.runStep()
     1286
     1287
     1288class TestInstallBuiltProduct(BuildStepMixinAdditions, unittest.TestCase):
     1289    def setUp(self):
     1290        self.longMessage = True
     1291        return self.setUpBuildStep()
     1292
     1293    def tearDown(self):
     1294        return self.tearDownBuildStep()
     1295
     1296    def test_success(self):
     1297        self.setupStep(InstallBuiltProduct())
     1298        self.setProperty('fullPlatform', 'ios-14')
     1299        self.setProperty('configuration', 'release')
     1300        self.expectRemoteCommands(
     1301            ExpectShell(workdir='wkdir',
     1302                        command=['python3', 'Tools/Scripts/install-built-product', '--platform=ios-14', '--release'],
     1303                        logEnviron=True,
     1304                        timeout=1200,
     1305                        )
     1306            + 0,
     1307        )
     1308        self.expectOutcome(result=SUCCESS, state_string='Installed Built Product')
     1309        return self.runStep()
     1310
     1311    def test_failure(self):
     1312        self.setupStep(InstallBuiltProduct())
     1313        self.setProperty('fullPlatform', 'ios-14')
     1314        self.setProperty('configuration', 'debug')
     1315        self.expectRemoteCommands(
     1316            ExpectShell(workdir='wkdir',
     1317                        command=['python3', 'Tools/Scripts/install-built-product', '--platform=ios-14', '--debug'],
     1318                        logEnviron=True,
     1319                        timeout=1200,
     1320                        )
     1321            + ExpectShell.log('stdio', stdout='Unexpected error.')
     1322            + 2,
     1323        )
     1324        self.expectOutcome(result=FAILURE, state_string='Installed Built Product (failure)')
     1325        return self.runStep()
  • trunk/Tools/CISupport/ews-build/steps_unittest.py

    r279849 r279953  
    4747                   CompileWebKit, CompileWebKitWithoutPatch, ConfigureBuild, CreateLocalGITCommit,
    4848                   DownloadBuiltProduct, DownloadBuiltProductFromMaster, EWS_BUILD_HOSTNAME, ExtractBuiltProduct, ExtractTestResults,
    49                    FetchBranches, FindModifiedChangeLogs, FindModifiedLayoutTests, GitResetHard, InstallGtkDependencies, InstallWpeDependencies,
     49                   FetchBranches, FindModifiedChangeLogs, FindModifiedLayoutTests, GitResetHard,
     50                   InstallBuiltProduct, InstallGtkDependencies, InstallWpeDependencies,
    5051                   KillOldProcesses, PrintConfiguration, PushCommitToWebKitRepo, ReRunAPITests, ReRunJavaScriptCoreTests, ReRunWebKitPerlTests,
    5152                   ReRunWebKitTests, RunAPITests, RunAPITestsWithoutPatch, RunBindingsTests, RunBuildWebKitOrgUnitTests,
     
    44074408
    44084409
     4410class TestInstallBuiltProduct(BuildStepMixinAdditions, unittest.TestCase):
     4411    def setUp(self):
     4412        self.longMessage = True
     4413        return self.setUpBuildStep()
     4414
     4415    def tearDown(self):
     4416        return self.tearDownBuildStep()
     4417
     4418    def test_success(self):
     4419        self.setupStep(InstallBuiltProduct())
     4420        self.setProperty('fullPlatform', 'ios-14')
     4421        self.setProperty('configuration', 'release')
     4422        self.expectRemoteCommands(
     4423            ExpectShell(workdir='wkdir',
     4424                        command=['python3', 'Tools/Scripts/install-built-product', '--platform=ios-14', '--release'],
     4425                        logEnviron=True,
     4426                        timeout=1200,
     4427                        )
     4428            + 0,
     4429        )
     4430        self.expectOutcome(result=SUCCESS, state_string='Installed Built Product')
     4431        return self.runStep()
     4432
     4433    def test_failure(self):
     4434        self.setupStep(InstallBuiltProduct())
     4435        self.setProperty('fullPlatform', 'ios-14')
     4436        self.setProperty('configuration', 'debug')
     4437        self.expectRemoteCommands(
     4438            ExpectShell(workdir='wkdir',
     4439                        command=['python3', 'Tools/Scripts/install-built-product', '--platform=ios-14', '--debug'],
     4440                        logEnviron=True,
     4441                        timeout=1200,
     4442                        )
     4443            + ExpectShell.log('stdio', stdout='Unexpected error.')
     4444            + 2,
     4445        )
     4446        self.expectOutcome(result=FAILURE, state_string='Installed Built Product (failure)')
     4447        return self.runStep()
     4448
     4449
    44094450if __name__ == '__main__':
    44104451    unittest.main()
  • trunk/Tools/ChangeLog

    r279945 r279953  
     12021-07-15  Aakash Jain  <aakash_jain@apple.com>
     2
     3        Add unit-tests for InstallBuiltProduct step
     4        https://bugs.webkit.org/show_bug.cgi?id=227990
     5
     6        Reviewed by Philippe Normand.
     7
     8        * CISupport/build-webkit-org/steps_unittest.py:
     9        * CISupport/ews-build/steps_unittest.py:
     10
    1112021-07-15  Aakash Jain  <aakash_jain@apple.com>
    212
Note: See TracChangeset for help on using the changeset viewer.