Fix tests.py paths and use pre-commit to guard against lost tests (#689)

- In pre-commit-config, add a run of `--update_list`. I'm doing this because I noticed (on running tests.py) that we'd lost track of a few tests.
- In tests.py, the paths affect bison output where the path to the file is mentioned. This shift should make `--update_goldens` more reliable.
This commit is contained in:
Jon Meow
2021-07-30 17:04:49 -07:00
committed by GitHub
parent 6ac3adfa53
commit f2db4e2e9f
3 changed files with 38 additions and 9 deletions
+8
View File
@@ -86,6 +86,14 @@ repos:
exclude: '^website/jekyll/Gemfile.lock$'
- repo: local
hooks:
- id: executable-semantics-tests
name: Update list of executable_semantics tests
description: Updates executable_semantics/test_list.bzl
entry: executable_semantics/tests.py
language: python
files: ^executable_semantics/(test_list.bzl|testdata/.*\.carbon)$
pass_filenames: false
args: ['--update_list', '--use_git_ls_files']
- id: proposal-list
name: Update list of proposals
description: Updates the list of proposals in proposals/README.md