-
Notifications
You must be signed in to change notification settings - Fork 83
/
run.sh
executable file
·48 lines (42 loc) · 882 Bytes
/
run.sh
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
#!/bin/sh
set -eu
if [ x"$1" = x--build ]; then
shift
mvn -P package
opt=-jar
param="target/selenese-runner.jar"
main=""
else
dir="$(dirname "$0")/tools"
opt="-cp"
param="$("$dir"/classpath.sh)"
main="jp.vmi.selenium.selenese.Main"
fi
rm -rf tmp/img tmp/xml tmp/html logs/run.log
mkdir -p tmp/img/all tmp/img/failed tmp/xml tmp/html logs
log_file=run-`date +'%Y%m%d_%H%M%S'`.log
( cd logs
touch $log_file
ln -s $log_file run.log )
do_script() {
local file="$1"; shift
set -x
case "$OSTYPE" in
linux*)
script -c "$*" "$file"
;;
cygwin*)
cmd=""
for a in "$@"; do
cmd="$cmd '$a'"
done
script -c "${cmd# }" "$file"
;;
darwin*|*bsd*)
script "$file" "$@"
;;
esac
}
do_script logs/$log_file java -Dsrj.log.level=DEBUG \
"$opt" "$param" $main \
--config tools/run.config "$@"