[compiler-rt] r233809 - [Sanitizers Coverage] Make sancov.py work with wildcards from Windows CMD shell
Timur Iskhodzhanov
timurrrr at google.com
Wed Apr 1 07:46:10 PDT 2015
Author: timurrrr
Date: Wed Apr 1 09:46:10 2015
New Revision: 233809
URL: http://llvm.org/viewvc/llvm-project?rev=233809&view=rev
Log:
[Sanitizers Coverage] Make sancov.py work with wildcards from Windows CMD shell
Reviewed at http://reviews.llvm.org/D8724
Modified:
compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py
Modified: compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py?rev=233809&r1=233808&r2=233809&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py (original)
+++ compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py Wed Apr 1 09:46:10 2015
@@ -4,10 +4,11 @@
# We need to merge these integers into a set and then
# either print them (as hex) or dump them into another file.
import array
-import struct
-import sys
import bisect
+import glob
import os.path
+import struct
+import sys
prog_name = ""
@@ -181,13 +182,19 @@ if __name__ == '__main__':
if len(sys.argv) <= 2:
Usage();
+ file_list = []
+ for f in sys.argv[2:]:
+ file_list += glob.glob(f)
+ if not file_list:
+ Usage()
+
if sys.argv[1] == "print":
- PrintFiles(sys.argv[2:])
+ PrintFiles(file_list)
elif sys.argv[1] == "merge":
- MergeAndPrint(sys.argv[2:])
+ MergeAndPrint(file_list)
elif sys.argv[1] == "unpack":
- Unpack(sys.argv[2:])
+ Unpack(file_list)
elif sys.argv[1] == "rawunpack":
- RawUnpack(sys.argv[2:])
+ RawUnpack(file_list)
else:
Usage()
More information about the llvm-commits
mailing list