diff options
| author | Jean-François Roy <jfroy@google.com> | 2018-01-22 15:05:11 -0800 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2018-01-23 09:50:02 -0700 |
| commit | 544d78901d5ad8f0ecb116d1bb686052e176b51c (patch) | |
| tree | ace6d90e8376b9f8dc884d78e374c447313eb973 /scripts | |
| parent | c0400d47c79737bbf5b57fb25d5c9723fd027bec (diff) | |
| download | usermoji-544d78901d5ad8f0ecb116d1bb686052e176b51c.tar.xz | |
scripts: Exit from vuid_mapping.py with status 1 on errors
This patch modifies scripts/vuid_mapping.py to exit with status 1 on
errors. This allows the build system to fail code generation rules that
depend on this script.
Change-Id: I5659ae80e1989ea7530c9257e7619a9b35cc7294
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/vuid_mapping.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/vuid_mapping.py b/scripts/vuid_mapping.py index 89741846..06d15cd0 100644 --- a/scripts/vuid_mapping.py +++ b/scripts/vuid_mapping.py @@ -1115,7 +1115,7 @@ def convertVUID(vuid_string): print (" replace '### ADD New func/struct mappings above this line' line with \"'%s' : %d,\"" % (vuid_parts[1], len(func_struct_id_map))) func_struct_id_map[vuid_parts[1]] = len(func_struct_id_map) #func_struct_update = True - sys.exit() + sys.exit(1) uniqueid = func_struct_id_map[vuid_parts[1]] << FUNC_STRUCT_SHIFT if vuid_parts[-1].isdigit(): # explit VUID has int on the end explicit_id = int(vuid_parts[-1]) @@ -1124,7 +1124,7 @@ def convertVUID(vuid_string): else: # implicit case if vuid_parts[-1] not in implicit_type_map: print("ERROR: Missing mapping for implicit type '%s'!\nTODO: Please add new mapping." % (vuid_parts[-1])) - sys.exit() + sys.exit(1) else: param_id = 0 # Default when no param is available if vuid_parts[-2] != vuid_parts[1]: # we have a parameter @@ -1135,7 +1135,7 @@ def convertVUID(vuid_string): print (" replace '### ADD New implicit param mappings above this line' line with \"'%s' : %d,\"" % (vuid_parts[-2], len(implicit_param_map))) implicit_param_map[vuid_parts[-2]] = len(implicit_param_map) #imp_param_update = True - sys.exit() + sys.exit(1) uniqueid = uniqueid + (param_id << IMPLICIT_PARAM_SHIFT) + (implicit_type_map[vuid_parts[-1]] << IMPLICIT_TYPE_SHIFT) + implicit_bit0 else: # No parameter so that field is 0 uniqueid = uniqueid + (implicit_type_map[vuid_parts[-1]] << IMPLICIT_TYPE_SHIFT) + implicit_bit0 |
