Andrew Lamb | f087346 | 2020-04-01 13:01:42 -0600 | [diff] [blame] | 1 | #!/bin/bash -e |
| 2 | # |
| 3 | # Copyright 2020 The Chromium OS Authors. All rights reserved. |
| 4 | # Use of this source code is governed by a BSD-style license that can be |
| 5 | # found in the LICENSE file. |
| 6 | |
| 7 | # Move to this script's directory. |
| 8 | script_dir="$(realpath "$(dirname "$0")")" |
| 9 | cd "${script_dir}" |
| 10 | |
| 11 | # Get go from CIPD. |
| 12 | echo "Getting go from CIPD..." |
| 13 | cipd_root="${script_dir}/.cipd_bin" |
| 14 | cipd ensure \ |
| 15 | -log-level warning \ |
| 16 | -root "${cipd_root}" \ |
| 17 | -ensure-file - \ |
| 18 | <<ENSURE_FILE |
| 19 | infra/3pp/tools/go/\${platform} latest |
| 20 | ENSURE_FILE |
| 21 | |
| 22 | PATH="${cipd_root}/bin:${PATH}" |
| 23 | |
| 24 | echo "Running unittests..." |
| 25 | cd go |
Allen Li | 2294cfa | 2020-10-27 15:34:34 -0700 | [diff] [blame] | 26 | GOROOT="${cipd_root}" go test -mod=readonly ./... |