summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-25 19:43:29 (GMT)
committerTobias Markmann <tm@ayena.de>2016-04-25 19:43:29 (GMT)
commit857791adda753a0f94da8317bbc019378b1f09bd (patch)
tree96aa2e4d863d50888a16527f9fbb38712e97d8ee /BuildTools/CheckTests.py
parentb58ad7f4b01623a8807b8c268208bd9c8496f4e2 (diff)
downloadswift-857791adda753a0f94da8317bbc019378b1f09bd.zip
swift-857791adda753a0f94da8317bbc019378b1f09bd.tar.bz2
Convert hard tabs to four spaces in all our SConscript/*.py files
Test-Information: Test that it still builds and unit test pass on OS X 10.11.4. Change-Id: I2eb4a0b707991aee553db36a8cd1ae28b813acab
Diffstat (limited to 'BuildTools/CheckTests.py')
-rwxr-xr-xBuildTools/CheckTests.py48
1 files changed, 24 insertions, 24 deletions
diff --git a/BuildTools/CheckTests.py b/BuildTools/CheckTests.py
index 0ea56bd..7f160e7 100755
--- a/BuildTools/CheckTests.py
+++ b/BuildTools/CheckTests.py
@@ -5,29 +5,29 @@ import os, sys, re
foundUnregisteredTests = False
for (path, dirs, files) in os.walk(".") :
- if not "3rdParty" in path :
- for filename in [os.path.join(path, file) for file in files if file.endswith("Test.cpp") and file != "IdleQuerierTest.cpp" and file != "NotifierTest.cpp" and file != "ClientTest.cpp" and file != "ConnectivityTest.cpp" and file != "ReconnectTest.cpp"] :
- file = open(filename, "r")
- isRegistered = False
- registeredTests = set()
- declaredTests = set()
- for line in file.readlines() :
- m = re.match("\s*CPPUNIT_TEST_SUITE_REGISTRATION\((.*)\)", line)
- if m :
- isRegistered = True
- m = re.match("\s*CPPUNIT_TEST\((.*)\)", line)
- if m :
- registeredTests.add(m.group(1))
- continue
- m = re.match("\s*void (test.*)\(\)", line)
- if m :
- declaredTests.add(m.group(1))
- if not isRegistered :
- print filename + ": Registration missing"
- foundUnregisteredTests = True
- if registeredTests - declaredTests != set([]) :
- print filename + ": " + str(registeredTests - declaredTests)
- foundUnregisteredTests = True
- file.close()
+ if not "3rdParty" in path :
+ for filename in [os.path.join(path, file) for file in files if file.endswith("Test.cpp") and file != "IdleQuerierTest.cpp" and file != "NotifierTest.cpp" and file != "ClientTest.cpp" and file != "ConnectivityTest.cpp" and file != "ReconnectTest.cpp"] :
+ file = open(filename, "r")
+ isRegistered = False
+ registeredTests = set()
+ declaredTests = set()
+ for line in file.readlines() :
+ m = re.match("\s*CPPUNIT_TEST_SUITE_REGISTRATION\((.*)\)", line)
+ if m :
+ isRegistered = True
+ m = re.match("\s*CPPUNIT_TEST\((.*)\)", line)
+ if m :
+ registeredTests.add(m.group(1))
+ continue
+ m = re.match("\s*void (test.*)\(\)", line)
+ if m :
+ declaredTests.add(m.group(1))
+ if not isRegistered :
+ print filename + ": Registration missing"
+ foundUnregisteredTests = True
+ if registeredTests - declaredTests != set([]) :
+ print filename + ": " + str(registeredTests - declaredTests)
+ foundUnregisteredTests = True
+ file.close()
sys.exit(foundUnregisteredTests)