forked from OPCFoundation/UA-.NETStandard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testmonoclientserver.sh
executable file
·49 lines (40 loc) · 1019 Bytes
/
testmonoclientserver.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
#!/bin/bash
echo Test the Mono console server and console client
workdir=$(pwd)
testresult=0
cd SampleApplications/Samples/NetCoreConsoleServer
echo build server
rm -r obj
msbuild /p:configuration=Debug /t:restore,build MonoConsoleServer.csproj
echo start server
cd bin/Debug/net46
mono MonoConsoleServer.exe -t 60 -a &
serverpid="$!"
cd "$workdir"
cd SampleApplications/Samples/NetCoreConsoleClient
echo build client
rm -r obj
msbuild /p:configuration=Debug /t:restore,build MonoConsoleClient.csproj
echo start client
cd bin/Debug/net46
mono MonoConsoleClient.exe -t 20 -a &
clientpid="$!"
cd "$workdir"
echo wait for client
wait $clientpid
if [ $? -eq 0 ]; then
echo "SUCCESS - Client test passed"
else
testresult=$?
echo "FAILED - Client test failed with a status of $testresult"
fi
echo wait for server
wait $serverpid
serverresult=$?
if [ $? -eq 0 ]; then
echo "SUCCESS - Server test passed"
else
serverresult=$?
echo "FAILED - Server test failed with a status of $serverresult"
fi
exit $testresult