forked from OSchip/llvm-project
[Sanitizers Coverage] Make sancov.py work with wildcards from Windows CMD shell
Reviewed at http://reviews.llvm.org/D8724 llvm-svn: 233809
This commit is contained in:
parent
468b8688ce
commit
882bc56ff1
|
|
@ -4,10 +4,11 @@
|
||||||
# We need to merge these integers into a set and then
|
# We need to merge these integers into a set and then
|
||||||
# either print them (as hex) or dump them into another file.
|
# either print them (as hex) or dump them into another file.
|
||||||
import array
|
import array
|
||||||
|
import bisect
|
||||||
|
import glob
|
||||||
|
import os.path
|
||||||
import struct
|
import struct
|
||||||
import sys
|
import sys
|
||||||
import bisect
|
|
||||||
import os.path
|
|
||||||
|
|
||||||
prog_name = ""
|
prog_name = ""
|
||||||
|
|
||||||
|
|
@ -181,13 +182,19 @@ if __name__ == '__main__':
|
||||||
if len(sys.argv) <= 2:
|
if len(sys.argv) <= 2:
|
||||||
Usage();
|
Usage();
|
||||||
|
|
||||||
|
file_list = []
|
||||||
|
for f in sys.argv[2:]:
|
||||||
|
file_list += glob.glob(f)
|
||||||
|
if not file_list:
|
||||||
|
Usage()
|
||||||
|
|
||||||
if sys.argv[1] == "print":
|
if sys.argv[1] == "print":
|
||||||
PrintFiles(sys.argv[2:])
|
PrintFiles(file_list)
|
||||||
elif sys.argv[1] == "merge":
|
elif sys.argv[1] == "merge":
|
||||||
MergeAndPrint(sys.argv[2:])
|
MergeAndPrint(file_list)
|
||||||
elif sys.argv[1] == "unpack":
|
elif sys.argv[1] == "unpack":
|
||||||
Unpack(sys.argv[2:])
|
Unpack(file_list)
|
||||||
elif sys.argv[1] == "rawunpack":
|
elif sys.argv[1] == "rawunpack":
|
||||||
RawUnpack(sys.argv[2:])
|
RawUnpack(file_list)
|
||||||
else:
|
else:
|
||||||
Usage()
|
Usage()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue