airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [04/11] airavata git commit: modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.json
Date Fri, 27 Jan 2017 20:41:20 GMT
modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.json

Integration test config and server stop script


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/b46aa6e4
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/b46aa6e4
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/b46aa6e4

Branch: refs/heads/develop
Commit: b46aa6e483d4e5e93e3d521b40ffa9ca103c35a9
Parents: ce359dc
Author: Ajinkya Dhamnaskar <adhamnas@umail.iu.edu>
Authored: Sun Dec 18 13:46:52 2016 -0500
Committer: Ajinkya Dhamnaskar <adhamnas@umail.iu.edu>
Committed: Sun Dec 18 13:46:52 2016 -0500

----------------------------------------------------------------------
 .../src/main/resources/airavata-server-stop.sh  | 71 ++++++++++++++++++++
 1 file changed, 71 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/b46aa6e4/modules/test-suite/multi-tenanted-airavata/src/main/resources/airavata-server-stop.sh
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/resources/airavata-server-stop.sh
b/modules/test-suite/multi-tenanted-airavata/src/main/resources/airavata-server-stop.sh
new file mode 100755
index 0000000..7f83f48
--- /dev/null
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/resources/airavata-server-stop.sh
@@ -0,0 +1,71 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+. `dirname $0`/setenv.sh
+cd ${AIRAVATA_HOME}/bin
+
+JAVA_OPTS=""
+AIRAVATA_COMMAND=""
+FORCE=false
+
+for var in "$@"
+do
+    case ${var} in
+    	-f | --force)
+	        FORCE=true
+            shift
+        ;;
+        -h)
+            echo "Usage: airavata-server-stop.sh [command-options]"
+            echo "command options:"
+	        echo "  -f , --force       Force stop all airavata servers."
+	        echo "  --<key>[=<value>]  Server setting(s) to override or introduce
(overrides values in airavata-server.properties)"
+            echo "  -h                 Display this help and exit"
+            shift
+            exit 0
+        ;;
+	*)
+            shift
+    esac
+done
+
+if ${FORCE} ; then
+	for f in `find . -name "server_start_*"`; do
+	    # split file name using "_" underscore
+		f_split=(${f//_/ });
+		echo "Found process file : $f"
+		echo -n "    Sending kill signals to process ${f_split[2]}..."
+		out=`kill -9 ${f_split[2]} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+		echo -n "    Removing process file..."
+		out=`rm ${f} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+	done
+else
+    java ${JAVA_OPTS} -classpath "${AIRAVATA_CLASSPATH}" \
+    org.apache.airavata.server.ServerMain stop ${AIRAVATA_COMMAND} $*
+fi


Mime
View raw message