aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorShuah Khan <shuahkh@osg.samsung.com>2015-03-18 17:19:50 -0400
committerShuah Khan <shuahkh@osg.samsung.com>2015-03-24 10:43:05 -0400
commit219794052f753fae54def9ba6758b31447b0244d (patch)
treeba734a0b257715661d63ff7151b9c74cf608b980 /tools/testing
parent84f887bfb930e7fbc01c060edd68c7cc6e2b824b (diff)
selftests: Add kselftest install tool
kselftest_install.sh tool installs selftests in default location which is tools/testing/selftests/kselftest or an user specified location. This tool invokes back-end selftests install target with the install location. Usage: cd tools/testing/selftests ./kselftest_install.sh [ install_dir ] Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing')
-rwxr-xr-xtools/testing/selftests/kselftest_install.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/testing/selftests/kselftest_install.sh b/tools/testing/selftests/kselftest_install.sh
new file mode 100755
index 000000000000..1555fbdb08da
--- /dev/null
+++ b/tools/testing/selftests/kselftest_install.sh
@@ -0,0 +1,37 @@
1#!/bin/bash
2#
3# Kselftest Install
4# Install kselftest tests
5# Author: Shuah Khan <shuahkh@osg.samsung.com>
6# Copyright (C) 2015 Samsung Electronics Co., Ltd.
7
8# This software may be freely redistributed under the terms of the GNU
9# General Public License (GPLv2).
10
11install_loc=`pwd`
12
13main()
14{
15 if [ $(basename $install_loc) != "selftests" ]; then
16 echo "$0: Please run it in selftests directory ..."
17 exit 1;
18 fi
19 if [ "$#" -eq 0 ]; then
20 echo "$0: Installing in default location - $install_loc ..."
21 elif [ ! -d "$1" ]; then
22 echo "$0: $1 doesn't exist!!"
23 exit 1;
24 else
25 install_loc=$1
26 echo "$0: Installing in specified location - $install_loc ..."
27 fi
28
29 install_dir=$install_loc/kselftest
30
31# Create install directory
32 mkdir -p $install_dir
33# Build tests
34 INSTALL_PATH=$install_dir make install
35}
36
37main "$@"