blob: f17140d2eb4e2945eeab0501f9348a59c5be001b [file] [log] [blame]
Andrew Lambf0873462020-04-01 13:01:42 -06001#!/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.
8script_dir="$(realpath "$(dirname "$0")")"
9cd "${script_dir}"
10
11# Get go from CIPD.
12echo "Getting go from CIPD..."
13cipd_root="${script_dir}/.cipd_bin"
14cipd ensure \
15 -log-level warning \
16 -root "${cipd_root}" \
17 -ensure-file - \
18 <<ENSURE_FILE
19infra/3pp/tools/go/\${platform} latest
20ENSURE_FILE
21
22PATH="${cipd_root}/bin:${PATH}"
23
24echo "Running unittests..."
25cd go
Allen Li2294cfa2020-10-27 15:34:34 -070026GOROOT="${cipd_root}" go test -mod=readonly ./...