diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/gen-lockedsig-cache | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache index 26e9b63a30..de8a20c787 100755 --- a/scripts/gen-lockedsig-cache +++ b/scripts/gen-lockedsig-cache | |||
| @@ -15,15 +15,27 @@ def mkdir(d): | |||
| 15 | 15 | ||
| 16 | if len(sys.argv) < 5: | 16 | if len(sys.argv) < 5: |
| 17 | print("Incorrect number of arguments specified") | 17 | print("Incorrect number of arguments specified") |
| 18 | print("syntax: gen-lockedsig-cache <locked-sigs.inc> <input-cachedir> <output-cachedir> <nativelsbstring>") | 18 | print("syntax: gen-lockedsig-cache <locked-sigs.inc> <input-cachedir> <output-cachedir> <nativelsbstring> [filterfile]") |
| 19 | sys.exit(1) | 19 | sys.exit(1) |
| 20 | 20 | ||
| 21 | filterlist = [] | ||
| 22 | if len(sys.argv) > 5: | ||
| 23 | print('Reading filter file %s' % sys.argv[5]) | ||
| 24 | with open(sys.argv[5]) as f: | ||
| 25 | for l in f.readlines(): | ||
| 26 | if ":" in l: | ||
| 27 | filterlist.append(l.rstrip()) | ||
| 28 | |||
| 21 | print('Reading %s' % sys.argv[1]) | 29 | print('Reading %s' % sys.argv[1]) |
| 22 | sigs = [] | 30 | sigs = [] |
| 23 | with open(sys.argv[1]) as f: | 31 | with open(sys.argv[1]) as f: |
| 24 | for l in f.readlines(): | 32 | for l in f.readlines(): |
| 25 | if ":" in l: | 33 | if ":" in l: |
| 26 | sigs.append(l.split(":")[2].split()[0]) | 34 | task, sig = l.split()[0].rsplit(':', 1) |
| 35 | if filterlist and not task in filterlist: | ||
| 36 | print('Filtering out %s' % task) | ||
| 37 | else: | ||
| 38 | sigs.append(sig) | ||
| 27 | 39 | ||
| 28 | print('Gathering file list') | 40 | print('Gathering file list') |
| 29 | files = set() | 41 | files = set() |
