cue-unity / unity

unity - run experiments/regression tests on CUE modules
Apache License 2.0
41 stars 5 forks source link

cmd/unity: add support for a --run flag #38

Open myitcv opened 3 years ago

myitcv commented 3 years ago

go test has a -run flag that allows the caller to specify a regex that describes which tests/subtests should be run.

Imagine a scenario where you are making changes to CUE and you reach a point where the change has resulted in a "break" with respect to a test in project (in the unity corpus). You likely want to enter a develop-test cycle until you make that test pass again. Running the entire corpus, or even all tests in the project, might get boring/heavyweight. So having a way to precisely specify the test to run would be useful. e.g.

$ go run github.com/cue-sh/unity/cmd/unity test --verbose --corpus --overlay overlays --nopath --run projects/github.com/TangoGroup/cfn-cue/eval/refs/changes/41/8841/3 refs/changes/41/8841/3