blob: 077aaf25f1214160c78e5b97699098fdf2499522 [file] [log] [blame]
Geoffrey Martin-Noble7eadb262020-10-08 16:43:37 -07001#!/bin/bash
2
Geoffrey Martin-Noble552d3f82021-05-25 17:56:09 -07003# Copyright 2020 The IREE Authors
Geoffrey Martin-Noble7eadb262020-10-08 16:43:37 -07004#
Geoffrey Martin-Noble552d3f82021-05-25 17:56:09 -07005# Licensed under the Apache License v2.0 with LLVM Exceptions.
6# See https://llvm.org/LICENSE.txt for license information.
7# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Geoffrey Martin-Noble7eadb262020-10-08 16:43:37 -07008
9# For use within a IREE bazel-swiftshader docker image on a Kokoro VM.
10# Log some information about the environment, initialize the submodules and then
11# run the bazel integrations tests.
12
Geoffrey Martin-Noble7eadb262020-10-08 16:43:37 -070013set -x
14
15# Print Vulkan related information: SDK version and GPU ICD version
16vulkaninfo 2> /tmp/vulkaninfo.stderr 1> /tmp/vulkaninfo.stdout
17VULKAN_INSTANCE="$(grep "Vulkan Instance" /tmp/vulkaninfo.stdout)"
18VK_PHYSICAL_DEVICE_PROPERTIES="$(grep -A7 "VkPhysicalDeviceProperties" /tmp/vulkaninfo.stdout)"
19
20if [[ -z "${VULKAN_INSTANCE?}" ]] || [[ -z "${VK_PHYSICAL_DEVICE_PROPERTIES?}" ]]; then
21 echo "Vulkan not found!"
22 cat /tmp/vulkaninfo.stdout
23 cat /tmp/vulkaninfo.stderr
24 exit 1
25fi
26
27echo "${VULKAN_INSTANCE?}"
28echo "${VK_PHYSICAL_DEVICE_PROPERTIES?}"