diff options
author | Santosh Shukla <santosh.shukla@linaro.org> | 2014-08-19 21:52:58 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2014-08-20 14:20:58 +0530 |
commit | 6d3738a5da2db66f17df850010a49ecc82f8741d (patch) | |
tree | 98bbc836738e8cb62d02cc318d5e076a98eb5e5e | |
parent | e20acd7cbfb4d939a51e7e4bc012acd7f1dfe73b (diff) |
is-cpu-isolated.sh: show script version information
add -v (version) switch into getopt to show version information.
Change-Id: I92f8bb240e4b1658f52334e1c0b1d248a16c7a82
Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Not-Tested-by: Viresh Kumar <viresh.kumar@linaro.org>
-rwxr-xr-x | common/scripts/is-cpu-isolated.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/common/scripts/is-cpu-isolated.sh b/common/scripts/is-cpu-isolated.sh index 3c8d0b9..99ae303 100755 --- a/common/scripts/is-cpu-isolated.sh +++ b/common/scripts/is-cpu-isolated.sh @@ -24,6 +24,7 @@ NON_ISOL_CPUS="0" # CPU not to isolate, zero will always be there as we can't st DEBUG_SCRIPT=1 # Print debug messages, set 0 if not required TASK="stress" # Single threaded task to Run on Isolated CPUs FUNC="all" # Perform complete isolation test by default +SCRIPT_VERSION=1.0 # To track release version RESULT="PASS" # Variables to keep an eye on total interrupt counts @@ -428,7 +429,7 @@ clear_cpusets() { # Execution starts from HERE -USAGE="Usage: $0 [-h] [-ctfsd args] [-c <Comma separated isol cpulist (default cpu1)>] [-t <Task name for isolation (default stress)>] [-f <Function type options - isolate, duration, clear, nonisol_list, all (default all)>] [-s <Number of samples to take (default 1)>] [-d <Min Isolation duration expected in seconds (default 10)>]" +USAGE="Usage: $0 [-hv] [-ctfsd args] [-c <Comma separated isol cpulist (default cpu1)>] [-t <Task name for isolation (default stress)>] [-f <Function type options - isolate, duration, clear, nonisol_list, all (default all)>] [-s <Number of samples to take (default 1)>] [-d <Min Isolation duration expected in seconds (default 10)>]" # Run isolation test for $FUNC run_func() @@ -468,7 +469,7 @@ run_func() # Parse isol arguments parse_arguments() { - while getopts hc:t:f:s:d: arguments 2>/dev/null + while getopts hvc:t:f:s:d: arguments 2>/dev/null do case $arguments in h) # --help @@ -476,6 +477,11 @@ parse_arguments() exit 0 ;; + v) # --script version + isdebug echo "$0 Version $SCRIPT_VERSION" + exit 0 + ;; + c) # --cpu (comma separated isol cpulist, default cpu1) ISOL_CPUS=$OPTARG ;; |