miller/go/build
John Kerl b06c449384
Make regression tests invokable from 'go test' (#491)
* incorporate reg-test into "go test" framework
* reg-test -> regtest everywhere
* update .github/workflows/go.yml
2021-04-12 23:00:53 -04:00

47 lines
1 KiB
Bash
Executable file

#!/bin/bash
verbose=""
do_wips="false"
if [ "$1" = "-v" ]; then
shift
set -x
verbose="-v"
fi
if [ "$1" = "-x" ]; then
shift
do_wips="true"
fi
if [ "$do_wips" = "false" ]; then
set -euo pipefail
fi
echo ================================================================
echo BUILD
go build mlr.go
echo Compile OK
echo
# During the C-to-Go port I like to have ../c/mlr and ./mlrgo and have symlinks
# to them from my ~/lbin. Hence the duplicate name here.
cp mlr mlrgo
echo ================================================================
echo UNIT TESTS
go test -v miller/src/...
# 'go test' (with no arguments) is the same as 'mlr regtest'
echo
echo ================================================================
echo REGRESSION TESTS v2 MAIN
echo
mlr regtest $verbose regtest/cases regtest/cases-pending-windows
if [ "$do_wips" = "true" ]; then
echo
echo ================================================================
echo REGRESSION TESTS v2 PENDING GO PORT
echo
mlr regtest $verbose regtest/cases-pending-go-port
fi
echo