forked from qos-ch/logback
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathallInOneSafeMode.sh
More file actions
51 lines (36 loc) · 1.06 KB
/
allInOneSafeMode.sh
File metadata and controls
51 lines (36 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Use this script both generate and check the results. It only works
# if there is only one instance of this script
if [ $# -lt 3 ]
then
echo "Usage: allInOneSafeMode.sh filename runLen stamp0 ... stampN"
exit 1;
fi
echo "File name $1"
echo "run length $2"
#On windows
#CLASSPATH="${CLASSPATH}\;./target/classes/"
#CLASSPATH="${CLASSPATH}\;./target/test-classes/"
#CLASSPATH="${CLASSPATH}\;../logback-core/target/classes"
#LASSPATH="${CLASSPATH}\;../logback-examples/lib/slf4j-api-1.5.10.jar"
echo $CLASSPATH
# On Unix
#CLASSPATH="${CLASSPATH}:./target/classes/"
#CLASSPATH="${CLASSPATH}:./target/test-classes/"
#CLASSPATH="${CLASSPATH}:../logback-core/target/classes"
#CLASSPATH="${CLASSPATH}:../logback-examples/lib/slf4j-api-1.5.10.jar"
if [ -f $1 ]
then
echo Removing $1 before tests
rm $1;
fi
FILENAME=$1
LEN=$2
shift 2
for stamp in $@
do
echo running safe mode with $stamp
java ch.qos.logback.classic.multiJVM.SafeModeFileAppender $stamp $LEN $FILENAME &
done
wait
echo Checking results...
java ch.qos.logback.classic.multiJVM.Checker $LEN $FILENAME $*