summaryrefslogtreecommitdiff
path: root/testxml/testxml.py
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-05 20:38:58 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-05 20:38:58 +0300
commit6483537c7b9de943104de46bba8ce357f3d26251 (patch)
tree3a9f74863fc09f4496e364efa1f16209d4030f9c /testxml/testxml.py
parentc92470ae02277d64359792e30293753b33159d66 (diff)
downloadtools-6483537c7b9de943104de46bba8ce357f3d26251.tar.gz
tools-6483537c7b9de943104de46bba8ce357f3d26251.tar.bz2
tools-6483537c7b9de943104de46bba8ce357f3d26251.tar.xz
tools-6483537c7b9de943104de46bba8ce357f3d26251.zip
testxml: disable some paranoid checks by default.
to enable need run testxml with parameter all. ./testxml.py all
Diffstat (limited to 'testxml/testxml.py')
-rwxr-xr-xtestxml/testxml.py26
1 files changed, 17 insertions, 9 deletions
diff --git a/testxml/testxml.py b/testxml/testxml.py
index 705ab15..23b3ad5 100755
--- a/testxml/testxml.py
+++ b/testxml/testxml.py
@@ -14,6 +14,7 @@ import xml
import csv
import ogg.vorbis
import StringIO
+import sys
from xml.dom import minidom
from PIL import Image
import zlib
@@ -45,6 +46,7 @@ errDict = set()
safeDye = False
borderSize = 20
colorsList = set()
+showAll = False
testBadCollisions = False
# number of tiles difference. after this amount tiles can be counted as incorrect
@@ -506,10 +508,11 @@ def testSpriteFile(id, fullPath, file, fileLoc, dnum, variant, checkAction, iser
else:
txt = ""
- showMsgSprite(fileLoc, "image width should be power of two. If not image will be resized on the fly."\
- "\nCurrent image width " + str(sizes[0]) + \
- ". used in sprite width " + str(tmp) +
- "\nallowed width " + txt + str(sizesOGL[0]) + " (" + image + ")", False)
+ if showAll is True:
+ showMsgSprite(fileLoc, "image width should be power of two. If not image will be resized on the fly."\
+ "\nCurrent image width " + str(sizes[0]) + \
+ ". used in sprite width " + str(tmp) +
+ "\nallowed width " + txt + str(sizesOGL[0]) + " (" + image + ")", False)
s2 = int(sizes[1] / int(height)) * int(height)
@@ -528,10 +531,11 @@ def testSpriteFile(id, fullPath, file, fileLoc, dnum, variant, checkAction, iser
else:
txt = ""
- showMsgSprite(fileLoc, "image height should be power of two. If not image will be resized on the fly."\
- "\nCurrent image height " + str(sizes[1]) + \
- ". used in sprite height " + str(tmp) +
- "\nallowed height " + txt + str(sizesOGL[1]) + " (" + image + ")", False)
+ if showAll is True:
+ showMsgSprite(fileLoc, "image height should be power of two. If not image will be resized on the fly."\
+ "\nCurrent image height " + str(sizes[1]) + \
+ ". used in sprite height " + str(tmp) +
+ "\nallowed height " + txt + str(sizesOGL[1]) + " (" + image + ")", False)
num = (s1 / int(width)) * (s2 / int(height))
@@ -655,7 +659,7 @@ def testSpriteAction(file, name, action, numframes, iserr):
except:
delay = 0
- if delay % 10 != 0:
+ if delay % 10 != 0 and showAll is True:
showMsgSprite(file, "delay " + str(delay) + " must be multiple of 10 in action: " + name + \
", direction: " + direction, False)
@@ -2041,6 +2045,10 @@ def detectClientData(dirs):
exit(1)
+if len(sys.argv) == 2:
+ if sys.argv[1] == "all":
+ showAll = True
+
showHeader()
print "Detecting clientdata dir"
detectClientData([".", "..", parentDir])