Adding a basic sanity testing tool to run during 'build'.

The tool just runs 'go vet' for now; could do more later (like actually
run the examples and compare to some expected output)
This commit is contained in:
Eli Bendersky 2019-05-30 06:05:58 -07:00
parent b63be6c91d
commit 8930aa53f3
2 changed files with 11 additions and 0 deletions

View File

@ -2,6 +2,7 @@
set -e set -e
tools/test
tools/format tools/format
tools/measure tools/measure
tools/generate tools/generate

10
tools/test Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# Sanity testing of the examples.
set -eo pipefail
# go vet will attempt to build each example, making sure it compiles. It will
# also report known issues with the code. Disabling the -unreachable check
# because it will fire false positives for some examples demonstrating panics.
go vet -unreachable=false ./examples/...