Merge pull request #1618 from dnltz/WIP/dnltz/hostcheck

Add kokoro hostcheck
This commit is contained in:
litghost 2021-03-12 08:47:26 -08:00 committed by GitHub
commit d3e19a375d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 0 deletions

View File

@ -11,6 +11,7 @@ set -e
cd github/$KOKORO_DIR/
source ./.github/kokoro/steps/hostcheck.sh
source ./.github/kokoro/steps/hostsetup.sh
source ./.github/kokoro/steps/hostinfo.sh
source ./.github/kokoro/steps/git.sh

View File

@ -11,6 +11,7 @@ set -e
cd github/$KOKORO_DIR/
source ./.github/kokoro/steps/hostcheck.sh
source ./.github/kokoro/steps/hostsetup.sh
source ./.github/kokoro/steps/hostinfo.sh
source ./.github/kokoro/steps/git.sh

31
.github/kokoro/steps/hostcheck.sh vendored Executable file
View File

@ -0,0 +1,31 @@
#!/bin/bash
# Copyright (C) 2017-2021 The Project X-Ray Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
set -e
echo
echo "========================================"
echo "Check storage"
echo "----------------------------------------"
set -x +e
mount | grep /tmpfs
MOUNT_RET=$?
set +x -e
if [[ $MOUNT_RET != 0 ]] ; then
echo "----------------------------------------"
echo "Error: No storage is mounted on /tmpfs."
echo "----------------------------------------"
echo "========================================"
echo "Dmesg dump"
echo "----------------------------------------"
dmesg
exit $MOUNT_RET
fi