Path: blob/master/tools/testing/selftests/kselftest_install.sh
26285 views
#!/bin/bash1# SPDX-License-Identifier: GPL-2.02#3# Kselftest Install4# Install kselftest tests5# Author: Shuah Khan <[email protected]>6# Copyright (C) 2015 Samsung Electronics Co., Ltd.78main()9{10base_dir=`pwd`11install_dir="$base_dir"/kselftest_install1213# Make sure we're in the selftests top-level directory.14if [ $(basename "$base_dir") != "selftests" ]; then15echo "$0: Please run it in selftests directory ..."16exit 1;17fi1819# Only allow installation into an existing location.20if [ "$#" -eq 0 ]; then21echo "$0: Installing in default location - $install_dir ..."22elif [ ! -d "$1" ]; then23echo "$0: $1 doesn't exist!!"24exit 1;25else26install_dir="$1"27echo "$0: Installing in specified location - $install_dir ..."28fi2930# Build tests31KSFT_INSTALL_PATH="$install_dir" make install32}3334main "$@"353637