Fixed files picking code to preserve the order in summary.py script.

pull/13383/head
Andrey Kamaev 13 years ago
parent 9b350e5e0d
commit e9901306c2
  1. 13
      modules/ts/misc/summary.py

@ -47,15 +47,16 @@ if __name__ == "__main__":
# expand wildcards and filter duplicates
files = []
files1 = []
seen = set()
for arg in args:
if ("*" in arg) or ("?" in arg):
files1.extend([os.path.abspath(f) for f in glob.glob(arg)])
flist = [os.path.abspath(f) for f in glob.glob(arg)]
flist = sorted(flist, key= lambda text: str(text).replace("M", "_"))
files.extend([ x for x in flist if x not in seen and not seen.add(x)])
else:
files.append(os.path.abspath(arg))
seen = set()
files = [ x for x in files if x not in seen and not seen.add(x)]
files.extend((set(files1) - set(files)))
fname = os.path.abspath(arg)
if x not in seen and not seen.add(x):
files.append(fname)
# read all passed files
test_sets = []

Loading…
Cancel
Save