scripts:Fix doc validation for 8-col DB
authorTobin Ehlis <tobine@google.com>
Thu, 25 May 2017 20:55:42 +0000 (14:55 -0600)
committerTobin Ehlis <tobine@google.com>
Thu, 25 May 2017 22:24:38 +0000 (16:24 -0600)
Update doc validation to read in the new VUID string and core|ext
columns of the vk_validation_error_database.txt.

layers/vk_validation_stats.py

index befbc33..a586f67 100755 (executable)
@@ -100,19 +100,23 @@ class ValidationDatabase:
                 if line.startswith('#') or '' == line:
                     continue
                 db_line = line.split(self.delimiter)
-                if len(db_line) != 6:
-                    print("ERROR: Bad database line doesn't have 6 elements: %s" % (line))
+                if len(db_line) != 8:
+                    print("ERROR: Bad database line doesn't have 8 elements: %s" % (line))
                 error_enum = db_line[0]
                 implemented = db_line[1]
                 testname = db_line[2]
                 api = db_line[3]
-                error_str = db_line[4]
-                note = db_line[5]
+                vuid_string = db_line[4]
+                core_ext = db_line[5]
+                error_str = db_line[6]
+                note = db_line[7]
                 # Read complete database contents into our class var for later use
                 self.db_dict[error_enum] = {}
                 self.db_dict[error_enum]['check_implemented'] = implemented
                 self.db_dict[error_enum]['testname'] = testname
                 self.db_dict[error_enum]['api'] = api
+                self.db_dict[error_enum]['vuid_string'] = vuid_string
+                self.db_dict[error_enum]['core_ext'] = core_ext
                 self.db_dict[error_enum]['error_string'] = error_str
                 self.db_dict[error_enum]['note'] = note
                 # Now build custom data structs