1#!/bin/bash 2# Copyright 2018 The Chromium OS Authors. All rights reserved. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6set -ex 7 8main() { 9 if [ -z "${KOKORO_ARTIFACTS_DIR}" ]; then 10 echo "This script must be run in kokoro" 11 exit 1 12 fi 13 14 local src_root="${KOKORO_ARTIFACTS_DIR}"/git/crosvm 15 local base_image_tarball="${KOKORO_GFILE_DIR}"/crosvm-base.tar.xz 16 local base_image="crosvm-base" 17 18 if [[ "$(docker images -q ${base_image} 2> /dev/null)" == "" ]]; then 19 docker load -i "${base_image_tarball}" 20 fi 21 "${src_root}"/docker/wrapped_smoke_test.sh 22 23 return 0 24} 25 26main "$@" 27