• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash -e
2#
3# Copyright 2020 The ChromiumOS Authors
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} Tf3SZrWyvwG41VbGwWrdVUkS7Vqxa_Mh8vApnidVgUkC
20ENSURE_FILE
21# TODO(b/295057050): See if we can use the common Chromium Golang version
22# as found in go/env.py.
23
24PATH="${cipd_root}/bin:${PATH}"
25
26echo "Running unittests..."
27cd go/src/go.chromium.org/chromiumos/config/go
28GOROOT="${cipd_root}" go test -mod=readonly ./...
29