diff options
author | sharath <sharathkumarboyanapally@gmail.com> | 2018-10-09 15:16:18 +0530 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2018-10-24 18:21:26 +0000 |
commit | da8fb7d7ab386fdefb728d71bfce9bb73624977c (patch) | |
tree | 52458408726e8f032ee373e727df7de2a9efebf5 /tests/dmm/dmm_scripts/kill_given_proc.sh | |
parent | f3e74e6b21a5d5568f4bd1357222e8a014d8397c (diff) |
Migration of DMM-CSIT scripts to DMM repo
Change-Id: Ibaa7652b24385805b5cdd1540ed98b09e68c69bc
Signed-off-by: sharath <sharathkumarboyanapally@gmail.com>
Diffstat (limited to 'tests/dmm/dmm_scripts/kill_given_proc.sh')
-rwxr-xr-x | tests/dmm/dmm_scripts/kill_given_proc.sh | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/dmm/dmm_scripts/kill_given_proc.sh b/tests/dmm/dmm_scripts/kill_given_proc.sh deleted file mode 100755 index 772643a316..0000000000 --- a/tests/dmm/dmm_scripts/kill_given_proc.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -proc_name=$1 -sudo pgrep $proc_name -if [ $? -eq "0" ]; then - success=false - sudo pkill $proc_name - echo "RC = $?" - for attempt in {1..5}; do - echo "Checking if '$proc_name' is still alive, attempt nr ${attempt}" - sudo pgrep $proc_name - if [ $? -eq "1" ]; then - echo "'$proc_name' is dead" - success=true - break - fi - echo "'$proc_name' is still alive, waiting 1 second" - sleep 1 - done - if [ "$success" = false ]; then - echo "The command sudo pkill '$proc_name' failed" - sudo pkill -9 $proc_name - echo "RC = $?" - exit 1 - fi -else - echo "'$proc_name' is not running" -fi - -sleep 2 -exit 0
\ No newline at end of file |