scripts: Private repo VUID workaround
authorMike Schuchardt <mikes@lunarg.com>
Thu, 20 Jul 2017 17:16:48 +0000 (11:16 -0600)
committerMike Schuchardt <mikes@lunarg.com>
Fri, 9 Mar 2018 20:54:31 +0000 (13:54 -0700)
Workarounds for private codegen and tests so they can run without having
to update the VUID mapping or database

Change-Id: Idf71df859f55888103f93f863fc73a0c7a01de2c

scripts/vuid_mapping.py

index 031cbe2..e3dbfdf 100644 (file)
@@ -1111,6 +1111,7 @@ def convertVUID(vuid_string):
         return -1
     vuid_parts = vuid_string.split('-')
     if vuid_parts[1] not in func_struct_id_map:
+        return -1
         print ("ERROR: Missing func/struct map value for '%s'!" % (vuid_parts[1]))
         print (" TODO: Need to add mapping for this to end of func_struct_id_map")
         print ("   replace '### ADD New func/struct mappings above this line' line with \"'%s' : %d,\"" % (vuid_parts[1], len(func_struct_id_map)))
@@ -1124,6 +1125,7 @@ def convertVUID(vuid_string):
         uniqueid = uniqueid + (explicit_id << EXPLICIT_ID_SHIFT) + explicit_bit0
     else: # implicit case
         if vuid_parts[-1] not in implicit_type_map:
+            return -1
             print("ERROR: Missing mapping for implicit type '%s'!\nTODO: Please add new mapping." % (vuid_parts[-1]))
             sys.exit(1)
         else:
@@ -1132,6 +1134,7 @@ def convertVUID(vuid_string):
                 if vuid_parts[-2] in implicit_param_map:
                     param_id = implicit_param_map[vuid_parts[-2]]
                 else:
+                    return -1
                     print ("ERROR: Missing param '%s' from implicit_param_map\n TODO: Please add new mapping." % (vuid_parts[-2]))
                     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)