diff options
author | George Karpenkov <ekarpenkov@apple.com> | 2017-10-11 18:42:39 +0000 |
---|---|---|
committer | George Karpenkov <ekarpenkov@apple.com> | 2017-10-11 18:42:39 +0000 |
commit | 9197bbb6e94914279846bfda5347736ec2f4cd64 (patch) | |
tree | 97a7d4463741f1267470932da6e0dc7456f2ce04 /utils | |
parent | 67126951b56adebf9e71c0ebe9c085e1b77f4f5f (diff) |
[Analyzer] Remove dead code from testing scripts
Differential Revision: https://reviews.llvm.org/D38488
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315489 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/analyzer/SATestBuild.py | 55 |
1 files changed, 2 insertions, 53 deletions
diff --git a/utils/analyzer/SATestBuild.py b/utils/analyzer/SATestBuild.py index f2d2df6a67..c13109593b 100755 --- a/utils/analyzer/SATestBuild.py +++ b/utils/analyzer/SATestBuild.py @@ -653,40 +653,6 @@ def cleanupReferenceResults(SBOutputDir): removeLogFile(SBOutputDir) -def updateSVN(Mode, PMapFile): - """ - svn delete or svn add (depending on `Mode`) all folders defined in the file - handler `PMapFile`. - Commit the result to SVN. - """ - try: - for I in iterateOverProjects(PMapFile): - ProjName = I[0] - Path = os.path.join(ProjName, getSBOutputDirName(True)) - - if Mode == "delete": - Command = "svn delete '%s'" % (Path,) - else: - Command = "svn add '%s'" % (Path,) - - if Verbose == 1: - print " Executing: %s" % (Command,) - check_call(Command, shell=True) - - if Mode == "delete": - CommitCommand = "svn commit -m \"[analyzer tests] Remove " \ - "reference results.\"" - else: - CommitCommand = "svn commit -m \"[analyzer tests] Add new " \ - "reference results.\"" - if Verbose == 1: - print " Executing: %s" % (CommitCommand,) - check_call(CommitCommand, shell=True) - except: - print "Error: SVN update failed." - sys.exit(-1) - - def testProject(ID, ProjectBuildMode, IsReferenceBuild=False, Strictness=0): """ Test a given project. @@ -757,26 +723,16 @@ def validateProjectFile(PMapFile): raise Exception() -def testAll(IsReferenceBuild=False, UpdateSVN=False, Strictness=0): +def testAll(IsReferenceBuild=False, Strictness=0): TestsPassed = True with projectFileHandler() as PMapFile: validateProjectFile(PMapFile) - # When we are regenerating the reference results, we might need to - # update svn. Remove reference results from SVN. - if UpdateSVN: - assert(IsReferenceBuild) - updateSVN("delete", PMapFile) - # Test the projects. for (ProjName, ProjBuildMode) in iterateOverProjects(PMapFile): TestsPassed &= testProject( ProjName, int(ProjBuildMode), IsReferenceBuild, Strictness) - # Re-add reference results to SVN. - if UpdateSVN: - updateSVN("add", PMapFile) - if __name__ == '__main__': # Parse command line arguments. @@ -789,20 +745,13 @@ if __name__ == '__main__': reference. Default is 0.') Parser.add_argument('-r', dest='regenerate', action='store_true', default=False, help='Regenerate reference output.') - Parser.add_argument('-rs', dest='update_reference', action='store_true', - default=False, - help='Regenerate reference output and update svn.') Args = Parser.parse_args() IsReference = False - UpdateSVN = False Strictness = Args.strictness if Args.regenerate: IsReference = True - elif Args.update_reference: - IsReference = True - UpdateSVN = True - TestsPassed = testAll(IsReference, UpdateSVN, Strictness) + TestsPassed = testAll(IsReference, Strictness) if not TestsPassed: sys.exit(-1) |