summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/sol2/Catch/scripts/approve.py
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2017-02-05 16:01:50 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2017-02-05 16:06:06 +0100
commitac096aa2a0921efde96b76252dffb119dcf27efc (patch)
tree2ad9a28a7f6babce8cfcbf5995e3e055ff13ff60 /3rdparty/sol2/Catch/scripts/approve.py
parent29df715138452ee18ba19ec4b07e18c4b3185de7 (diff)
Update sol2 (nw)
Diffstat (limited to '3rdparty/sol2/Catch/scripts/approve.py')
-rw-r--r--3rdparty/sol2/Catch/scripts/approve.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/3rdparty/sol2/Catch/scripts/approve.py b/3rdparty/sol2/Catch/scripts/approve.py
deleted file mode 100644
index f4b66aa4a90..00000000000
--- a/3rdparty/sol2/Catch/scripts/approve.py
+++ /dev/null
@@ -1,31 +0,0 @@
-from __future__ import print_function
-
-import os
-import sys
-import shutil
-import glob
-from scriptCommon import catchPath
-
-rootPath = os.path.join( catchPath, 'projects/SelfTest/Baselines' )
-
-if len(sys.argv) > 1:
- files = [os.path.join( rootPath, f ) for f in sys.argv[1:]]
-else:
- files = glob.glob( os.path.join( rootPath, "*.unapproved.txt" ) )
-
-
-def approveFile( approvedFile, unapprovedFile ):
- justFilename = unapprovedFile[len(rootPath)+1:]
- if os.path.exists( unapprovedFile ):
- if os.path.exists( approvedFile ):
- os.remove( approvedFile )
- os.rename( unapprovedFile, approvedFile )
- print( "approved " + justFilename )
- else:
- print( "approval file " + justFilename + " does not exist" )
-
-if len(files) > 0:
- for unapprovedFile in files:
- approveFile( unapprovedFile.replace( "unapproved.txt", "approved.txt" ), unapprovedFile )
-else:
- print( "no files to approve" )