[ews-build] Do not print worker environment variables in each build step [part 2]
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Jul 2019 19:51:50 +0000 (19:51 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Jul 2019 19:51:50 +0000 (19:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=199405

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(CheckOutSpecificRevision.__init__): Disabled logging of environment variables.
(CleanWorkingDirectory.__init__): Ditto.
(RunBindingsTests.__init__): Ditto.
(RunWebKitPerlTests.__init__): Ditto.
(RunWebKitPyTests.__init__): Ditto.
(CompileWebKit.__init__): Ditto.
(ArchiveTestResults.__init__): Ditto.
* BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247069 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/ews-build/steps.py
Tools/BuildSlaveSupport/ews-build/steps_unittest.py
Tools/ChangeLog

index 422a12b..804d875 100644 (file)
@@ -114,6 +114,9 @@ class CheckOutSpecificRevision(shell.ShellCommand):
     flunkOnFailure = False
     haltOnFailure = False
 
+    def __init__(self, **kwargs):
+        super(CheckOutSpecificRevision, self).__init__(logEnviron=False, **kwargs)
+
     def doStepIf(self, step):
         return self.getProperty('ews_revision', False)
 
@@ -133,6 +136,9 @@ class CleanWorkingDirectory(shell.ShellCommand):
     haltOnFailure = True
     command = ['Tools/Scripts/clean-webkit']
 
+    def __init__(self, **kwargs):
+        super(CleanWorkingDirectory, self).__init__(logEnviron=False, **kwargs)
+
 
 class ApplyPatch(shell.ShellCommand, CompositeStepMixin):
     name = 'apply-patch'
@@ -494,7 +500,7 @@ class RunBindingsTests(shell.ShellCommand):
     command = ['Tools/Scripts/run-bindings-tests', '--json-output={0}'.format(jsonFileName)]
 
     def __init__(self, **kwargs):
-        super(RunBindingsTests, self).__init__(timeout=5 * 60, **kwargs)
+        super(RunBindingsTests, self).__init__(timeout=5 * 60, logEnviron=False, **kwargs)
 
     def start(self):
         self.log_observer = logobserver.BufferLogObserver()
@@ -541,7 +547,7 @@ class RunWebKitPerlTests(shell.ShellCommand):
     command = ['Tools/Scripts/test-webkitperl']
 
     def __init__(self, **kwargs):
-        super(RunWebKitPerlTests, self).__init__(timeout=2 * 60, **kwargs)
+        super(RunWebKitPerlTests, self).__init__(timeout=2 * 60, logEnviron=False, **kwargs)
 
 
 class RunWebKitPyTests(shell.ShellCommand):
@@ -554,7 +560,7 @@ class RunWebKitPyTests(shell.ShellCommand):
     command = ['Tools/Scripts/test-webkitpy', '--json-output={0}'.format(jsonFileName)]
 
     def __init__(self, **kwargs):
-        super(RunWebKitPyTests, self).__init__(timeout=2 * 60, **kwargs)
+        super(RunWebKitPyTests, self).__init__(timeout=2 * 60, logEnviron=False, **kwargs)
 
     def start(self):
         self.log_observer = logobserver.BufferLogObserver()
@@ -613,6 +619,9 @@ class CompileWebKit(shell.Compile):
     haltOnFailure = False
     command = ['perl', 'Tools/Scripts/build-webkit', WithProperties('--%(configuration)s')]
 
+    def __init__(self, **kwargs):
+        super(CompileWebKit, self).__init__(logEnviron=False, **kwargs)
+
     def start(self):
         platform = self.getProperty('platform')
         buildOnly = self.getProperty('buildOnly')
@@ -1119,6 +1128,9 @@ class ArchiveTestResults(shell.ShellCommand):
     descriptionDone = ['Archived test results']
     haltOnFailure = True
 
+    def __init__(self, **kwargs):
+        super(ArchiveTestResults, self).__init__(logEnviron=False, **kwargs)
+
 
 class UploadTestResults(transfer.FileUpload):
     name = 'upload-test-results'
index 9370db5..142e2b2 100644 (file)
@@ -302,6 +302,7 @@ class TestRunBindingsTests(BuildStepMixinAdditions, unittest.TestCase):
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
                         timeout=300,
+                        logEnviron=False,
                         command=['Tools/Scripts/run-bindings-tests', '--json-output={0}'.format(self.jsonFileName)],
                         logfiles={'json': self.jsonFileName},
                         )
@@ -315,6 +316,7 @@ class TestRunBindingsTests(BuildStepMixinAdditions, unittest.TestCase):
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
                         timeout=300,
+                        logEnviron=False,
                         command=['Tools/Scripts/run-bindings-tests', '--json-output={0}'.format(self.jsonFileName)],
                         logfiles={'json': self.jsonFileName},
                         )
@@ -337,6 +339,7 @@ class TestRunWebKitPerlTests(BuildStepMixinAdditions, unittest.TestCase):
         self.setupStep(RunWebKitPerlTests())
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['Tools/Scripts/test-webkitperl'],
                         timeout=120,
                         )
@@ -349,6 +352,7 @@ class TestRunWebKitPerlTests(BuildStepMixinAdditions, unittest.TestCase):
         self.setupStep(RunWebKitPerlTests())
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['Tools/Scripts/test-webkitperl'],
                         timeout=120,
                         )
@@ -375,6 +379,7 @@ class TestWebKitPyTests(BuildStepMixinAdditions, unittest.TestCase):
         self.setupStep(RunWebKitPyTests())
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['Tools/Scripts/test-webkitpy', '--json-output={0}'.format(self.jsonFileName)],
                         logfiles={'json': self.jsonFileName},
                         timeout=120,
@@ -388,6 +393,7 @@ class TestWebKitPyTests(BuildStepMixinAdditions, unittest.TestCase):
         self.setupStep(RunWebKitPyTests())
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['Tools/Scripts/test-webkitpy', '--json-output={0}'.format(self.jsonFileName)],
                         logfiles={'json': self.jsonFileName},
                         timeout=120,
@@ -486,6 +492,7 @@ class TestCompileWebKit(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('configuration', 'release')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['perl', 'Tools/Scripts/build-webkit', '--release'],
                         )
             + 0,
@@ -499,6 +506,7 @@ class TestCompileWebKit(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('configuration', 'debug')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['perl', 'Tools/Scripts/build-webkit', '--debug'],
                         )
             + ExpectShell.log('stdio', stdout='1 error generated.')
@@ -523,6 +531,7 @@ class TestCompileWebKitToT(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('patchFailedToBuild', True)
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['perl', 'Tools/Scripts/build-webkit', '--release'],
                         )
             + 0,
@@ -537,6 +546,7 @@ class TestCompileWebKitToT(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('patchFailedTests', True)
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['perl', 'Tools/Scripts/build-webkit', '--debug'],
                         )
             + ExpectShell.log('stdio', stdout='1 error generated.')
@@ -595,6 +605,7 @@ class TestCompileJSCOnly(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('configuration', 'release')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['perl', 'Tools/Scripts/build-jsc', '--release'],
                         )
             + 0,
@@ -608,6 +619,7 @@ class TestCompileJSCOnly(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('configuration', 'debug')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['perl', 'Tools/Scripts/build-jsc', '--debug'],
                         )
             + ExpectShell.log('stdio', stdout='1 error generated.')
@@ -632,6 +644,7 @@ class TestCompileJSCOnlyToT(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('patchFailedToBuild', 'True')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['perl', 'Tools/Scripts/build-jsc', '--release'],
                         )
             + 0,
@@ -646,6 +659,7 @@ class TestCompileJSCOnlyToT(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('patchFailedToBuild', 'True')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['perl', 'Tools/Scripts/build-jsc', '--debug'],
                         )
             + ExpectShell.log('stdio', stdout='1 error generated.')
@@ -887,6 +901,7 @@ class TestCheckOutSpecificRevision(BuildStepMixinAdditions, unittest.TestCase):
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
                         timeout=1200,
+                        logEnviron=False,
                         command=['git', 'checkout', '1a3425cb92dbcbca12a10aa9514f1b77c76dc26'],
                         )
             + 0,
@@ -901,6 +916,7 @@ class TestCheckOutSpecificRevision(BuildStepMixinAdditions, unittest.TestCase):
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
                         timeout=1200,
+                        logEnviron=False,
                         command=['git', 'checkout', '1a3425cb92dbcbca12a10aa9514f1b77c76dc26'],
                         )
             + ExpectShell.log('stdio', stdout='Unexpected failure')
@@ -928,6 +944,7 @@ class TestCleanWorkingDirectory(BuildStepMixinAdditions, unittest.TestCase):
         self.setupStep(CleanWorkingDirectory())
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['Tools/Scripts/clean-webkit'],
                         )
             + 0,
@@ -939,6 +956,7 @@ class TestCleanWorkingDirectory(BuildStepMixinAdditions, unittest.TestCase):
         self.setupStep(CleanWorkingDirectory())
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['Tools/Scripts/clean-webkit'],
                         )
             + ExpectShell.log('stdio', stdout='Unexpected failure.')
@@ -962,6 +980,7 @@ class TestUnApplyPatchIfRequired(BuildStepMixinAdditions, unittest.TestCase):
         self.expectHidden(False)
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['Tools/Scripts/clean-webkit'],
                         )
             + 0,
@@ -975,6 +994,7 @@ class TestUnApplyPatchIfRequired(BuildStepMixinAdditions, unittest.TestCase):
         self.expectHidden(False)
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['Tools/Scripts/clean-webkit'],
                         )
             + ExpectShell.log('stdio', stdout='Unexpected failure.')
@@ -1430,6 +1450,7 @@ class TestArchiveTestResults(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('configuration', 'release')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['python', 'Tools/BuildSlaveSupport/test-result-archive', '--platform=ios-simulator',  '--release', 'archive'],
                         )
             + 0,
@@ -1444,6 +1465,7 @@ class TestArchiveTestResults(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('configuration', 'debug')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['python', 'Tools/BuildSlaveSupport/test-result-archive', '--platform=mac',  '--debug', 'archive'],
                         )
             + ExpectShell.log('stdio', stdout='Unexpected failure.')
index 3df9ec9..347704b 100644 (file)
@@ -1,3 +1,20 @@
+2019-07-02  Aakash Jain  <aakash_jain@apple.com>
+
+        [ews-build] Do not print worker environment variables in each build step [part 2]
+        https://bugs.webkit.org/show_bug.cgi?id=199405
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-build/steps.py:
+        (CheckOutSpecificRevision.__init__): Disabled logging of environment variables.
+        (CleanWorkingDirectory.__init__): Ditto.
+        (RunBindingsTests.__init__): Ditto.
+        (RunWebKitPerlTests.__init__): Ditto.
+        (RunWebKitPyTests.__init__): Ditto.
+        (CompileWebKit.__init__): Ditto.
+        (ArchiveTestResults.__init__): Ditto.
+        * BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
+
 2019-07-02  Jer Noble  <jer.noble@apple.com>
 
         Pipe suport for 'cenc' init data type into CDMFairPlayStreaming