summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/validateinterfaces.py52
1 files changed, 36 insertions, 16 deletions
diff --git a/tools/validateinterfaces.py b/tools/validateinterfaces.py
index a26e30ad2..c9a86979c 100755
--- a/tools/validateinterfaces.py
+++ b/tools/validateinterfaces.py
@@ -186,33 +186,53 @@ def processLostDir(tracker, srcDir):
elif file1[-2:] == ".c":
checkLostFile(tracker, cPath)
-tracker = Tracker()
-tracker.arr = dict()
-tracker.methods = Set()
-tracker.fullmethods = Set()
-tracker.interfaces = Set()
-tracker.retCode = 0
-
-if len(sys.argv) > 1 and sys.argv[1] == "silent":
+def runIf():
processIfDir(tracker, "../src/char");
processIfDir(tracker, "../src/map");
processIfDir(tracker, "../src/login");
processIfDir(tracker, "../src/common");
-else:
- print "Checking initerfaces initialisation"
- processIfDir(tracker, "../src/char");
- processIfDir(tracker, "../src/map");
- processIfDir(tracker, "../src/login");
- processIfDir(tracker, "../src/common");
- print "Checking not added functions to initerfaces"
+
+def runLost():
processLostDir(tracker, "../src/char");
processLostDir(tracker, "../src/map");
processLostDir(tracker, "../src/login");
processLostDir(tracker, "../src/common");
- print "Checking interfaces usage"
+
+def runLong():
processDir(tracker, "../src/char");
processDir(tracker, "../src/map");
processDir(tracker, "../src/login");
processDir(tracker, "../src/common");
reportMethods(tracker)
+
+tracker = Tracker()
+tracker.arr = dict()
+tracker.methods = Set()
+tracker.fullmethods = Set()
+tracker.interfaces = Set()
+tracker.retCode = 0
+
+if len(sys.argv) > 1:
+ cmd = sys.argv[1]
+else:
+ cmd = "default"
+
+if cmd == "silent":
+ runIf()
+elif cmd == "init":
+ print "Checking interfaces initialisation"
+ runIf()
+elif cmd == "lost":
+ print "Checking not added functions to interfaces"
+ runLost();
+elif cmd == "long":
+ print "Checking interfaces usage"
+ runLong();
+else:
+ print "Checking interfaces initialisation"
+ runIf()
+ print "Checking not added functions to interfaces"
+ runLost();
+ print "Checking interfaces usage"
+ runLong();
exit(tracker.retCode)