You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ma...@apache.org on 2016/06/09 14:29:34 UTC

[2/3] activemq-artemis git commit: validate script

validate script


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

Branch: refs/heads/master
Commit: af8fd87eaf6fc0cb7bda34f0ec3cb0a8d4f31572
Parents: 2490563
Author: Clebert Suconic <cl...@apache.org>
Authored: Wed Jun 8 21:22:55 2016 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu Jun 9 10:12:28 2016 -0400

----------------------------------------------------------------------
 .../src/test/scripts/validate-spaces.sh         | 85 ++++++++++++++++++++
 1 file changed, 85 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/af8fd87e/artemis-distribution/src/test/scripts/validate-spaces.sh
----------------------------------------------------------------------
diff --git a/artemis-distribution/src/test/scripts/validate-spaces.sh b/artemis-distribution/src/test/scripts/validate-spaces.sh
new file mode 100755
index 0000000..8381230
--- /dev/null
+++ b/artemis-distribution/src/test/scripts/validate-spaces.sh
@@ -0,0 +1,85 @@
+#!/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.
+
+# This script will validate the distribution works with folders with spaces on Linux machines
+
+rm -rf target/with\ space
+mkdir target
+mkdir target/with\ space
+
+
+# Setting the script to fail if anything goes wrong
+set -e
+
+export CURRENT_DIR=`pwd`
+
+if [ $# -eq 0 ]; then
+    export LOCAL_USED=`ls ../../../target/apache-artemis-*bin.zip`
+    echo Unziping $LOCAL_USED
+    unzip $LOCAL_USED -d "./target/with space"
+    cd "./target/with space"
+    export ARTEMIS_HOME="`pwd`/`ls`"
+    echo home is $ARTEMIS_HOME
+else
+    if [ -z "$1" ] ; then
+       echo "Couldn't find folder $1"
+       exit -1
+    fi
+    export ARTEMIS_HOME="$CURRENT_DIR/target/with space/artemis_home"
+    cp -r "$1" "$ARTEMIS_HOME"
+fi
+
+cd $CURRENT_DIR
+
+export ARTEMIS_INSTANCE="$CURRENT_DIR/target/with space/artemis_instance"
+echo home used is $ARTEMIS_HOME
+echo artemis instance is $ARTEMIS_HOME
+
+
+cd "$ARTEMIS_HOME/bin"
+./artemis create --silent --force "$ARTEMIS_INSTANCE"
+
+cd "$ARTEMIS_INSTANCE/bin"
+pwd
+
+./artemis run &
+
+sleep 5
+
+./artemis producer
+./artemis consumer
+
+./artemis stop
+
+sleep 5
+./artemis data print
+./artemis data compact
+./artemis data exp
+
+
+./artemis-service start
+
+sleep 5
+
+./artemis producer
+./artemis consumer
+
+./artemis-service stop
+
+cd $CURRENT_DIR
+rm -rf target