blob: ec304463883c0b36b6e50b4c3eae474411c9f453 [file] [log] [blame]
Shuah Khan21979402015-03-18 15:19:50 -06001#!/bin/bash
Shuah Khan4b461dc2018-01-09 18:36:55 -07002# SPDX-License-Identifier: GPL-2.0
Shuah Khan21979402015-03-18 15:19:50 -06003#
4# Kselftest Install
5# Install kselftest tests
6# Author: Shuah Khan <shuahkh@osg.samsung.com>
7# Copyright (C) 2015 Samsung Electronics Co., Ltd.
8
Shuah Khan21979402015-03-18 15:19:50 -06009install_loc=`pwd`
10
11main()
12{
13 if [ $(basename $install_loc) != "selftests" ]; then
14 echo "$0: Please run it in selftests directory ..."
15 exit 1;
16 fi
17 if [ "$#" -eq 0 ]; then
18 echo "$0: Installing in default location - $install_loc ..."
19 elif [ ! -d "$1" ]; then
20 echo "$0: $1 doesn't exist!!"
21 exit 1;
22 else
23 install_loc=$1
24 echo "$0: Installing in specified location - $install_loc ..."
25 fi
26
27 install_dir=$install_loc/kselftest
28
29# Create install directory
30 mkdir -p $install_dir
31# Build tests
32 INSTALL_PATH=$install_dir make install
33}
34
35main "$@"