-
Notifications
You must be signed in to change notification settings - Fork 2
/
launch_testsuite
executable file
·160 lines (138 loc) · 4.86 KB
/
launch_testsuite
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/bin/bash
###############################################################################
# POP-Java test suite script
# Date : 06/23/2010
# Author : Clement Valentin
# Updates (please write any modifications to this file in the following lines)
# Date Author Description
#
###############################################################################
#POP-Java test suite launch script
echo "########################################"
echo "# POP-Java 1.0 Test Suite started #"
echo "########################################"
#check if POP-C++ installed
#if [ -a $POPC_LOCATION/sbin/SXXpopc ]
#then
# echo "POP-C++ detected under $POPC_LOCATION"
#else
# if [ -a /usr/local/popc/sbin/SXXpopc ]
# then
# echo "POP-C++ detected under /user/local/popc"
# else
# echo "POP-C++ not detected. Test aborted !"
# exit
# fi
#fi
#check if POP-C++ runtime is running
#JOBMGR_COUNT=$(ps -ef | grep -v grep | grep -cw JobMgr)
#if [ $JOBMGR_COUNT -eq 0 ]
#then
# echo "POP-C++ was not running. Starting POP-C++ runtime global services ..."
# SXXpopc start
# JOBMGR_STARTED=1
# echo "POP-C++ started"
#fi
DEFAULT_LOCATION=/usr/local/popj
LOCATION=""
if [ $POPJAVA_LOCATION ]
then
LOCATION=$POPJAVA_LOCATION
else
if [ -d $DEFAULT_LOCATION ]
then
LOCATION=$DEFAULT_LOCATION
else
echo "POP-Java installation directory was not found. Test aborted !"
exit
fi
fi
CP=$LOCATION/JarFile/popjava.jar:$LOCATION/JarFile/testsuite.jar
POP=$LOCATION/JarFile/popjava.jar
# Check if a Job Manager is running
JM=`ps aux | grep -e 'jobmgr' -e 'PopjServices' | wc -l`
if [ "$JM" -eq "1" ]
then
echo "No Job Manager is running."
echo "Starting the POP-Java one."
java -javaagent:$POP -cp $POP popjava.scripts.PopjServices $LOCATION/etc/jobmgr.conf &
sleep 15
fi
N_TEST=6
echo "##############################"
echo "# POP-Java standard test #"
echo "##############################"
echo "Starting POP-Java test suite"
echo "########################################"
echo "Launching passing arguments test (test 1/$N_TEST)... "
echo "########################################"
echo "java -cp $CP testsuite.arg.MainArgTest"
java -javaagent:$POP -cp $CP testsuite.arg.MainArgTest
echo "Passing arguments test is finished ... "
echo "########################################"
echo "Launching multi parallel object test (test 2/$N_TEST)... "
echo "########################################"
java -javaagent:$POP -cp $CP testsuite.multiobj.Mutliobj
echo "Multi parallel object test is finished... "
echo "########################################"
echo "Launching callback test (test 3/$N_TEST)... "
echo "########################################"
java -javaagent:$POP -cp $CP testsuite.callback.CallBackMain
echo "Callback test is finished... "
echo "########################################"
echo "Launching barrier test (test 4/$N_TEST)... "
echo "########################################"
java -javaagent:$POP -cp $CP testsuite.barrier.MainBarrier
echo "Barrier test is finished... "
echo "########################################"
echo "Launching integer test (test 5/$N_TEST)... "
echo "########################################"
java -javaagent:$POP -cp $CP testsuite.integer.TestInteger
echo "Integer test is finished... "
echo "########################################"
echo "Launching Demo POP-Java test (test 6/$N_TEST)... "
echo "########################################"
java -javaagent:$POP -cp $CP testsuite.demo.DemoMain 4 127.0.0.1
echo "Demo POP-Java test is finished... "
echo ""
N_TEST=2
echo "####################################"
echo "# POP-C++ interoperability test #"
echo "####################################"
echo "check if $LOCATION/testsuite/popc-obj/integer/integer.obj exists"
if [ -a $LOCATION/testsuite/popc-obj/integer/integer.obj ]
then
:
else
cd $LOCATION/testsuite/popc-obj/integer
make
cd $OLDPWD
fi
echo "########################################"
echo "Launching POP-C++ integer with POP-Java application test (test 1/$N_TEST)"
echo "########################################"
echo "java -javaagent:$POP -cp $CP testsuite.popc_integer.TestPopcInteger"
java -javaagent:$POP -cp $CP testsuite.popc_integer.TestPopcInteger
echo "POP-C++ integer with POP-Java application test is finishied ..."
if [ -a $LOCATION/testsuite/popc-obj/jinteger/integer.obj ]
then
:
else
cd $LOCATION/testsuite/popc-obj/jinteger
make
cd $OLDPWD
fi
echo "########################################"
echo "Launching Integer mix (POP-C++ and POP-Java) with POP-Java application test(test 2/$N_TEST)"
echo "########################################"
java -javaagent:$POP -cp $CP testsuite.jinteger.TestRef
echo "Integer mix (POP-C++ and POP-Java) with POP-Java application test is finishied ..."
echo "########################################"
echo "# POP-Java 1.0 Test Suite finished #"
echo "########################################"
#if [ $JOBMGR_STARTED ]
#then
# SXXpopc stop
#fi
#
#$POPJAVA_LOCATION/bin/popjrun --killall