Modified: trunk/Tools/CISupport/ews-build/steps.py (292601 => 292602)
--- trunk/Tools/CISupport/ews-build/steps.py 2022-04-08 12:41:25 UTC (rev 292601)
+++ trunk/Tools/CISupport/ews-build/steps.py 2022-04-08 14:11:29 UTC (rev 292602)
@@ -4524,6 +4524,7 @@
self.setProperty('retry_count', retry_count + 1)
if self.getProperty('github.number', ''):
self.build.addStepsAfterCurrentStep([
+ ResetGitSvn(),
CleanGitRepo(),
CheckOutSource(),
GitSvnFetch(),
@@ -5158,3 +5159,20 @@
if self.results == FAILURE:
return {'step': 'Recent SVN commits did not match GitHub record'}
return super(GitSvnFetch, self).getResultSummary()
+
+
+class ResetGitSvn(shell.ShellCommand):
+ name = 'reset-git-svn'
+ haltOnFailure = False
+ flunkOnFailure = False
+ command = ['rm', '-rf', '.git/svn']
+
+ def __init__(self, **kwargs):
+ super(ResetGitSvn, self).__init__(logEnviron=False, timeout=300, **kwargs)
+
+ def getResultSummary(self):
+ if self.results == SUCCESS:
+ return {'step': 'Removed git-svn references'}
+ if self.results == FAILURE:
+ return {'step': 'Failed to remove git-svn references'}
+ return super(GitSvnFetch, self).getResultSummary()
Modified: trunk/Tools/CISupport/ews-build/steps_unittest.py (292601 => 292602)
--- trunk/Tools/CISupport/ews-build/steps_unittest.py 2022-04-08 12:41:25 UTC (rev 292601)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py 2022-04-08 14:11:29 UTC (rev 292602)
@@ -51,7 +51,7 @@
FetchBranches, FindModifiedChangeLogs, FindModifiedLayoutTests, GitHub, GitResetHard, GitSvnFetch,
InstallBuiltProduct, InstallGtkDependencies, InstallWpeDependencies,
KillOldProcesses, PrintConfiguration, PushCommitToWebKitRepo, PushPullRequestBranch, ReRunAPITests, ReRunWebKitPerlTests,
- ReRunWebKitTests, RevertPullRequestChanges, RunAPITests, RunAPITestsWithoutChange, RunBindingsTests, RunBuildWebKitOrgUnitTests,
+ ReRunWebKitTests, ResetGitSvn, RevertPullRequestChanges, RunAPITests, RunAPITestsWithoutChange, RunBindingsTests, RunBuildWebKitOrgUnitTests,
RunBuildbotCheckConfigForBuildWebKit, RunBuildbotCheckConfigForEWS, RunEWSUnitTests, RunResultsdbpyTests,
RunJavaScriptCoreTests, RunJSCTestsWithoutChange, RunWebKit1Tests, RunWebKitPerlTests, RunWebKitPyPython2Tests,
RunWebKitPyPython3Tests, RunWebKitTests, RunWebKitTestsInStressMode, RunWebKitTestsInStressGuardmallocMode,
@@ -6542,5 +6542,40 @@
return self.runStep()
+class TestResetGitSvn(BuildStepMixinAdditions, unittest.TestCase):
+ def setUp(self):
+ self.longMessage = True
+ return self.setUpBuildStep()
+
+ def tearDown(self):
+ return self.tearDownBuildStep()
+
+ def test_success(self):
+ self.setupStep(ResetGitSvn())
+ self.expectRemoteCommands(
+ ExpectShell(workdir='wkdir',
+ logEnviron=False,
+ timeout=300,
+ command=['rm', '-rf', '.git/svn'])
+ + 0
+ + ExpectShell.log('stdio', stdout=''),
+ )
+ self.expectOutcome(result=SUCCESS, state_string='Removed git-svn references')
+ return self.runStep()
+
+ def test_failure(self):
+ self.setupStep(ResetGitSvn())
+ self.expectRemoteCommands(
+ ExpectShell(workdir='wkdir',
+ logEnviron=False,
+ timeout=300,
+ command=['rm', '-rf', '.git/svn'])
+ + 1
+ + ExpectShell.log('stdio', stdout=''),
+ )
+ self.expectOutcome(result=FAILURE, state_string='Failed to remove git-svn references')
+ return self.runStep()
+
+
if __name__ == '__main__':
unittest.main()