blob: 20c33641020c9a8a83ac600de4968efd4f65f5b1 [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 ./...