Files
UA-.NETStandard/testmonoclientserver.sh
T
Martin Regen 5063ac0907 Console client improvements (#343)
* use config file for console sample
* filter unsupported security policies
* add reconnect handler
2018-02-06 14:15:16 +01:00

50 lines
1015 B
Bash
Executable File

#!/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