v / cmd / v2 / test_all.sh
13 lines · 10 sloc · 352 bytes · a0302bd07fa7ec4502ebe2c1951f5fdf3770c7d1
Raw
1#!/usr/bin/env bash
2set -euo pipefail
3
4script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
5repo_root="$(CDPATH= cd -- "${script_dir}/../.." && pwd)"
6
7v1_compiler="${V:-${repo_root}/v}"
8if [ ! -x "${v1_compiler}" ]; then
9 echo "FAIL: v1 compiler not found: ${v1_compiler}"
10 exit 1
11fi
12
13exec "${v1_compiler}" run "${script_dir}/test_all.vsh" "$@"
14