blob: f72f2e29c10c6bcd84390b81a49860df8b87f4ec [file] [log] [blame]
# Copyright 2018 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.
# This is determined by the branch on kokoro.
# TODO(davidriley): This is somewhat misused and can also represent "mesa"
# which would be shared across multiple milestones. This is intended to
# just be temporary while GPU is alpha/beta.
CROS_MILESTONE="$(echo "${KOKORO_JOB_NAME}" | cut -d'/' -f 3 -)"
require_kokoro_artifacts() {
if [ -z "${KOKORO_ARTIFACTS_DIR}" ]; then
echo "This script must be run in kokoro"
exit 1
require_cros_milestone() {
if [ -z "${CROS_MILESTONE}" ]; then
echo "CROS_MILESTONE must be set"
exit 1
# Disable automatic apt activities. As this runs after the timers are activated,
# we must also wait for the services to finish if they already started.
stop_apt_daily() {
sudo tee /etc/apt/apt.conf.d/99no-periodic > /dev/null << EOF
APT::Periodic::Enable "0";
sudo flock -w 3600 /var/lib/apt/daily_lock echo "Acquired apt daily_lock"