代码拉取完成,页面将自动刷新
同步操作将从 OpenSharperSync/UA-.NETStandard 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
echo Test the .Net Core server and complex client
workdir=$(pwd)
testresult=0
testresulthttps=0
serverresult=0
cd SampleApplications/Samples/NetCoreConsoleServer
echo build server
rm -r obj
dotnet build NetCoreConsoleServer.csproj
cd ../NetCoreConsoleClient
echo build client
rm -r obj
dotnet build NetCoreConsoleClient.csproj
cd "$workdir"
cd ../NetCoreComplexClient
echo build client
rm -r obj
dotnet build NetCoreComplexClient.csproj
cd "$workdir"
cd SampleApplications/Samples/NetCoreConsoleServer
echo start server
touch ./server.log
dotnet run --no-restore --no-build --project NetCoreConsoleServer.csproj -t 60 -a >./server.log &
serverpid="$!"
echo wait for server started
grep -m 1 "start" <(tail -f ./server.log --pid=$serverpid)
tail -f ./server.log --pid=$serverpid &
cd "$workdir"
cd SampleApplications/Samples/NetCoreComplexClient
echo start client for tcp connection
dotnet run --no-restore --no-build --project NetCoreComplexClient.csproj -t 10 -a -v &
clientpid="$!"
cd "$workdir"
cd SampleApplications/Samples/NetCoreConsoleClient
echo start client for https connection
dotnet run --no-restore --no-build --project NetCoreConsoleClient.csproj -t 20 -a https://localhost:51212 &
httpsclientpid="$!"
cd "$workdir"
echo wait for opc.tcp 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
cd SampleApplications/Samples/NetCoreConsoleClient
cd "$workdir"
echo wait for https client
wait $httpsclientpid
if [ $? -eq 0 ]; then
echo "SUCCESS - Client test passed"
else
testresulthttps=$?
echo "FAILED - Client test failed with a status of $testresulthttps"
echo "FAILED - Client may require to use trusted TLS server cert to pass this test"
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
testresulthttps=0
echo "IGNORED - test requires trusted TLS cert on OSX"
fi
fi
echo send Ctrl-C to server
kill -s SIGINT $serverpid
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
echo "Test results: Client:$testresult Server:$serverresult ClientHttps:$testresulthttps"
exit $((testresult + serverresult + testresulthttps))
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。