-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_pitmp.sh
executable file
·83 lines (73 loc) · 1.87 KB
/
run_pitmp.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/sh
################################################################################
printUsage()
{
echo "Usage: $ScriptName [-f <outputFormat> | -t <targetModules> |-s <skippedModules> }"
}
################################################################################
usage()
{
printUsage
exit 1
}
################################################################################
outputFormat="-DoutputFormats=HTML"
targetModules=""
skippedModules=""
while test ! "X$1" = "X"
do
if test "$1" = "-t"
then
if test "X$2" = "X"
then
usage
else
targetModules="-DtargetModules=$2"
shift
fi
elif test "$1" = "-s"
then
if test "X$2" = "X"
then
usage
else
skippedModules="-DskippedModules=$2"
shift
fi
elif test "$1" = "-f"
then
if test "X$2" = "X"
then
usage
else
outputFormat="-DoutputFormats=$2"
shift
fi
else
usage
fi
shift
done
pomFile="pom.xml"
fileExtension="pitmp"
sourcePomFile="pom.xml.$fileExtension"
dirList=". dnooLogs dnooStorage dnooHello dnooMain dnooIntegration dnooNoTest"
# debugOption=
# debugOption="-e -X"
debugOption="-e"
shouldDisplayOption=
# shouldDisplayOption="-DshouldDisplayOnly=true"
mvn clean 2>&1 >/dev/null
# use the correct pom files
for theDir in $dirList
do
if test -f "$theDir/$sourcePomFile"
then
cp $theDir/$sourcePomFile $theDir/$pomFile
fi
done
mvn install 2>&1 >/dev/null
echo "######## `date +%T`" 2>&1 | tee $fileExtension.traces
echo "mvn $debugOption $shouldDisplayOption $targetModules $skippedModules $outputFormat pitmp:run" | tee -a $fileExtension.traces
mvn $debugOption $shouldDisplayOption $targetModules $skippedModules $outputFormat pitmp:run 2>&1 | tee -a $fileExtension.traces
echo "######## `date +%T`" 2>&1 | tee -a $fileExtension.traces