mirror of
https://github.com/Z3Prover/z3
synced 2026-07-22 15:05:51 +00:00
Add local pre-commit hook running z3test regressions
Adds a versioned .githooks/pre-commit that builds z3 and runs the z3test regression suite (scripts/test_benchmarks.py over regressions/smt2) as a precondition for every commit. Enable with 'git config core.hooksPath .githooks'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
6a62a53181
commit
d704b289ef
2 changed files with 85 additions and 0 deletions
27
.githooks/README.md
Normal file
27
.githooks/README.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# Git hooks
|
||||
|
||||
Versioned git hooks for this repository.
|
||||
|
||||
## pre-commit
|
||||
|
||||
Builds the `z3` binary and runs the [z3test](https://github.com/Z3Prover/z3test)
|
||||
regression suite (`scripts/test_benchmarks.py` over `regressions/smt2`) locally.
|
||||
The commit is aborted if the build or any regression fails.
|
||||
|
||||
### Enable
|
||||
|
||||
```bash
|
||||
git config core.hooksPath .githooks
|
||||
```
|
||||
|
||||
### Configuration (environment variables)
|
||||
|
||||
- `Z3_BUILD_DIR` — build directory to use/create (default: `build/release`).
|
||||
- `Z3TEST_DIR` — existing `z3test` checkout. If unset, `z3test` is cloned into
|
||||
`../z3test-precommit` next to the repository.
|
||||
|
||||
### Skip for a single commit
|
||||
|
||||
```bash
|
||||
git commit --no-verify
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue