diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-05-12 08:42:09 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-05-16 08:28:48 -0600 |
| commit | d294ac6b07954f893e048d95b561d7173cbd689b (patch) | |
| tree | 35ac95c1fb35c0e04ae45c4309d85d7c002bfd67 | |
| parent | fd3d0e41c14de04a09c67e6cfa3e6fe6267b97f9 (diff) | |
| download | usermoji-d294ac6b07954f893e048d95b561d7173cbd689b.tar.xz | |
tests: Update doc validation
Print a single warning line identifying the number of missing tests.
| -rwxr-xr-x | vk_layer_documentation_generate.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/vk_layer_documentation_generate.py b/vk_layer_documentation_generate.py index 7feeff69..2dd05ac9 100755 --- a/vk_layer_documentation_generate.py +++ b/vk_layer_documentation_generate.py @@ -345,12 +345,15 @@ class LayerDoc: part_found = True break if not part_found: - print(self.txt_color.yellow() + 'Validation check %s has missing or invalid test : %s' % (chk, test)) - warnings_found += 1 + print(self.txt_color.red() + 'Validation check %s has missing or invalid test : %s' % (chk, test)) + errors_found += 1 break - elif test not in tests_set and not chk.endswith('_NONE') and test != 'TODO': - print(self.txt_color.red() + 'Validation check %s has missing or invalid test : %s' % (chk, test)) - errors_found += 1 + elif test not in tests_set and not chk.endswith('_NONE'): + if test == 'TODO': + warnings_found += 1 + else: + print(self.txt_color.red() + 'Validation check %s has missing or invalid test : %s' % (chk, test)) + errors_found += 1 # Now go through all of the actual checks in the layers and make sure they're covered in the doc for ln in layer_dict: for chk in layer_dict[ln]['CHECKS']: @@ -390,7 +393,7 @@ def main(argv=None): if (0 == num_warnings): print(txt_color.green() + 'No warning cases found between %s and implementation' % (os.path.basename(opts.layer_doc)) + txt_color.endc()) else: - print(txt_color.yellow() + 'Found %s warnings. See above for details' % num_warnings) + print(txt_color.yellow() + 'Found %s warnings due to missing tests. Missing tests are labeled as "TODO" in "%s."' % (num_warnings, opts.layer_doc)) if (0 == num_errors): print(txt_color.green() + 'No mismatches found between %s and implementation' % (os.path.basename(opts.layer_doc)) + txt_color.endc()) else: |
