summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/htmlize/finish.sh
diff options
context:
space:
mode:
authorSerena Feng <feng.xiaowei@zte.com.cn>2017-01-05 05:54:34 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-01-05 05:54:34 +0000
commit212e6f19f2a8a6c0da35454edada9f71e627ea78 (patch)
tree494cbdf0d6989ebb882b18746baab88fc50d0d09 /utils/test/testapi/htmlize/finish.sh
parentc12d2acd95269363db527bae50b16cd77fb00351 (diff)
parent0d87caa1b785588ffb9a92f37420bc688ebed01d (diff)
Merge "Create Jenkins Job for testapi automation"
Diffstat (limited to 'utils/test/testapi/htmlize/finish.sh')
-rw-r--r--utils/test/testapi/htmlize/finish.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/utils/test/testapi/htmlize/finish.sh b/utils/test/testapi/htmlize/finish.sh
new file mode 100644
index 000000000..dc3aa868b
--- /dev/null
+++ b/utils/test/testapi/htmlize/finish.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Stop opnfv-testapi server
+proc_number=`ps -ef | grep opnfv-testapi | grep -v grep | wc -l`
+
+if [ $proc_number -gt 0 ]; then
+ procs=`ps -ef | grep opnfv-testapi | grep -v grep`
+ echo "Kill opnfv-testapi server $procs"
+ ps -ef | grep opnfv-testapi | grep -v grep | awk '{print $2}' | xargs kill -kill &>/dev/null
+fi