3 # Test an Aquarium installation by issuing messages to various exchanges
5 # WARNING: DO NOT RUN ON PRODUCTION SYSTEMS. THIS WILL AFFECT DATABASE
8 # Copyright 2012 GRNET S.A. All rights reserved.
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted provided that the following conditions
14 # 1. Redistributions of source code must retain the above copyright
15 # notice, this list of conditions and the following disclaimer.
17 # 2. Redistributions in binary form must reproduce the above copyright
18 # notice, this list of conditions and the following disclaimer in the
19 # documentation and/or other materials provided with the distribution.
21 # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 # The views and conclusions contained in the software and documentation are
34 # those of the authors and should not be interpreted as representing official
35 # policies, either expressed or implied, of GRNET S.A.
37 # resolve links - $0 may be a softlink
40 while [ -h "$PRG" ]; do
42 link=`expr "$ls" : '.*-> \(.*\)$'`
43 if expr "$link" : '/.*' > /dev/null; then
46 PRG=`dirname "$PRG"`/"$link"
50 # Get standard environment variables
51 PRGDIR=`dirname "$PRG"`
53 # Only set supported environment variables if not already set
54 [ -z "$AQUARIUM_HOME" ] && AQUARIUM_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
56 CONF=$AQUARIUM_HOME/conf
57 CLASSPATH=$CONF:`find $LIB -type f|grep jar$|tr '\n' ':'|sed -e 's/\:$//'`
59 TESTMAIN=gr.grnet.aquarium.util.RandomEventGen
60 echo CLASSPATH=$CLASSPATH
62 java -cp $CONF:$CLASSPATH $TESTMAIN "$@"