#!/bin/sh
# script/test: run the test suite as the `test` phase of the Dockerfile,
# with --no-cache so the tests actually re-run. The build is tagged so no
# dangling image is left behind. The 90s per-package timeout matches the
# org-wide backstop in REPO_POLICIES.md.
set -eu

ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"

main() {
	cd "$ROOT"
	docker build --no-cache --target test \
		-t "$(script/projectname)-test" .
}

main "$@"
