internal/cuetest: drive long tests via an env var
Using a build tag like "go test -tags=long" works,
but has two noticeable disadvantages:
1. Flipping a build tag in a dependency package means rebuilding it
along all downstream packages. Rebuilding a big portion of the
packages in the CUE module feels unnecessary to just flip a boolean.
2. Using build tags to skip tests is generally discouraged, as it is
possible to break their compilation and not notice given that the
Go files aren't built at all. We shouldn't set the precedent.
The long tests are now run via a non-empty env var:
CUE_LONG=true go test ./...
Finally, update the CI setup to use the new mechanism.
Change-Id: I589e7c5163d9d763df3584aa16f7eef3d5e32c81
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/536306
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Paul Jolly <paul@myitcv.io>