Add new test mode.

This commit is contained in:
Hermann Kraus 2012-08-21 21:23:05 +02:00
parent abc59d2202
commit 020e79f53b

View file

@ -86,14 +86,23 @@ if __name__ == "__main__":
else: else:
quiet = False quiet = False
if len(sys.argv) == 2: print len(sys.argv)
files = [{"name": sys.argv[1], "sizes": sizes_few_square}] if len(sys.argv) <= 1:
active = files
elif len(sys.argv) == 2:
active = [{"name": sys.argv[1], "sizes": sizes_few_square}]
elif len(sys.argv) > 2: elif len(sys.argv) > 2:
files = [] active = []
for name in sys.argv[1:]: if sys.argv[1] == "-s":
files.append({"name": name}) name = sys.argv[2]
for f in files:
if f['name'] == name:
active.append(f)
else:
for name in sys.argv[1:]:
active.append({"name": name})
for f in files: for f in active:
config = dict(defaults) config = dict(defaults)
config.update(f) config.update(f)
for size in config['sizes']: for size in config['sizes']: