Changeset 275624 in webkit
- Timestamp:
- Apr 7, 2021 2:00:24 PM (3 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/CISupport/ews-build/steps.py
r275613 r275624 167 167 def start(self): 168 168 self.setCommand(['git', 'checkout', self.getProperty('ews_revision')]) 169 return shell.ShellCommand.start(self) 170 171 172 class GitResetHard(shell.ShellCommand): 173 name = 'git-reset-hard' 174 descriptionDone = ['Performed git reset --hard'] 175 176 def __init__(self, **kwargs): 177 super(GitResetHard, self).__init__(logEnviron=False, **kwargs) 178 179 def start(self): 180 self.setCommand(['git', 'reset', 'HEAD~10', '--hard']) 169 181 return shell.ShellCommand.start(self) 170 182 … … 3272 3284 if retry_count < self.MAX_RETRY: 3273 3285 self.setProperty('retry_count', retry_count + 1) 3274 self.build.addStepsAfterCurrentStep([ CheckOutSource(), ShowIdentifier(), UpdateWorkingDirectory(), ApplyPatch(), CreateLocalGITCommit(), PushCommitToWebKitRepo()])3286 self.build.addStepsAfterCurrentStep([GitResetHard(), CheckOutSource(), ShowIdentifier(), UpdateWorkingDirectory(), ApplyPatch(), CreateLocalGITCommit(), PushCommitToWebKitRepo()]) 3275 3287 return rc 3276 3288 -
trunk/Tools/CISupport/ews-build/steps_unittest.py
r275613 r275624 47 47 CompileWebKitWithoutPatch, ConfigureBuild, CreateLocalGITCommit, 48 48 DownloadBuiltProduct, DownloadBuiltProductFromMaster, EWS_BUILD_HOSTNAME, ExtractBuiltProduct, ExtractTestResults, 49 FetchBranches, FindModifiedChangeLogs, FindModifiedLayoutTests, InstallGtkDependencies, InstallWpeDependencies,49 FetchBranches, FindModifiedChangeLogs, FindModifiedLayoutTests, GitResetHard, InstallGtkDependencies, InstallWpeDependencies, 50 50 KillOldProcesses, PrintConfiguration, PushCommitToWebKitRepo, ReRunAPITests, ReRunJavaScriptCoreTests, ReRunWebKitPerlTests, 51 51 ReRunWebKitTests, RunAPITests, RunAPITestsWithoutPatch, RunBindingsTests, RunBuildWebKitOrgUnitTests, … … 837 837 ) 838 838 self.expectOutcome(result=FAILURE, state_string='Failed to kill old processes') 839 return self.runStep() 840 841 842 class TestGitResetHard(BuildStepMixinAdditions, unittest.TestCase): 843 def setUp(self): 844 self.longMessage = True 845 return self.setUpBuildStep() 846 847 def tearDown(self): 848 return self.tearDownBuildStep() 849 850 def test_success(self): 851 self.setupStep(GitResetHard()) 852 self.expectRemoteCommands( 853 ExpectShell(workdir='wkdir', 854 command=['git', 'reset', 'HEAD~10', '--hard'], 855 logEnviron=False, 856 ) 857 + 0, 858 ) 859 self.expectOutcome(result=SUCCESS, state_string='Performed git reset --hard') 860 return self.runStep() 861 862 def test_failure(self): 863 self.setupStep(GitResetHard()) 864 self.expectRemoteCommands( 865 ExpectShell(workdir='wkdir', 866 command=['git', 'reset', 'HEAD~10', '--hard'], 867 logEnviron=False, 868 ) 869 + ExpectShell.log('stdio', stdout='Unexpected error.') 870 + 2, 871 ) 872 self.expectOutcome(result=FAILURE, state_string='Performed git reset --hard (failure)') 839 873 return self.runStep() 840 874 -
trunk/Tools/ChangeLog
r275613 r275624 1 2021-04-07 Aakash Jain <aakash_jain@apple.com> 2 3 commit-queue should perform git reset --hard between retry attempts 4 https://bugs.webkit.org/show_bug.cgi?id=224300 5 6 Reviewed by Jonathan Bedard. 7 8 * CISupport/ews-build/steps.py: 9 (GitResetHard): Build step to perform git reset --hard. 10 (GitResetHard.start): 11 (PushCommitToWebKitRepo.evaluateCommand): 12 * CISupport/ews-build/steps_unittest.py: Added unit-test. 13 1 14 2021-04-07 Jonathan Bedard <jbedard@apple.com> 2 15
Note: See TracChangeset
for help on using the changeset viewer.