blob: f17140d2eb4e2945eeab0501f9348a59c5be001b [file] [log] [blame]
#!/bin/bash -e
#
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Move to this script's directory.
script_dir="$(realpath "$(dirname "$0")")"
cd "${script_dir}"
# Get go from CIPD.
echo "Getting go from CIPD..."
cipd_root="${script_dir}/.cipd_bin"
cipd ensure \
-log-level warning \
-root "${cipd_root}" \
-ensure-file - \
<<ENSURE_FILE
infra/3pp/tools/go/\${platform} latest
ENSURE_FILE
PATH="${cipd_root}/bin:${PATH}"
echo "Running unittests..."
cd go
GOROOT="${cipd_root}" go test -mod=readonly ./...