1#!/usr/bin/env bash 2# SPDX-License-Identifier: BSD-3-Clause 3# Copyright (C) 2016 Intel Corporation 4# All rights reserved. 5# 6 7set -e 8 9rootdir=$(readlink -f $(dirname $0)) 10 11default_conf=~/autorun-spdk.conf 12conf=${1:-${default_conf}} 13 14# If the configuration of tests is not provided, no tests will be carried out. 15if [[ ! -f $conf ]]; then 16 echo "ERROR: $conf doesn't exist" 17 exit 1 18fi 19source "$rootdir/test/common/autotest_common.sh" 20source "$conf" 21 22trap 'timing_finish || exit 1' EXIT 23 24# Runs agent scripts 25$rootdir/autobuild.sh "$conf" 26if ((SPDK_TEST_UNITTEST == 1 || SPDK_RUN_FUNCTIONAL_TEST == 1)); then 27 sudo -E $rootdir/autotest.sh "$conf" 28fi 29