Skip to content

Commit 3b2134c

Browse files
committed
Fix test run script
1 parent ce9c143 commit 3b2134c

3 files changed

Lines changed: 45 additions & 37 deletions

File tree

appveyor.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,24 @@ build_script:
3535
3636
cd ./src
3737
38-
dotnet build GridDomain.sln /p:Version=$APP_VERSION /p:FileVersion=$FILE_VERSION /p:InformationVersion="$INFORMATIONAL_VERSION" -c Release -v Minimal /l:"/opt/appveyor/build-agent/AppVeyor.MSBuildLogger.dll"
39-
dotnet pack GridDomain.sln /p:Version=$APP_VERSION /p:FileVersion=$FILE_VERSION /p:InformationVersion="$INFORMATIONAL_VERSION" -c Release -v Minimal --include-symbols --include-source --no-build /l:"/opt/appveyor/build-agent/AppVeyor.MSBuildLogger.dll"
38+
dotnet build GridDomain.sln /p:Version=$APP_VERSION /p:FileVersion=$FILE_VERSION /p:InformationVersion="$INFORMATIONAL_VERSION" -c Release -v Quiet /l:"/opt/appveyor/build-agent/AppVeyor.MSBuildLogger.dll"
39+
dotnet pack GridDomain.sln /p:Version=$APP_VERSION /p:FileVersion=$FILE_VERSION /p:InformationVersion="$INFORMATIONAL_VERSION" -c Release -v Quiet --include-symbols --include-source --no-build /l:"/opt/appveyor/build-agent/AppVeyor.MSBuildLogger.dll"
4040
test_script:
4141
- sh: |
4242
43-
43+
4444
#curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -
4545
46-
. ./build/test.sh
47-
48-
runTests UnitTests GridDomain.Node.Tests Release
49-
runTests AcceptanceTests GridDomain.Aggregates.Tests Release
50-
runTests ScenarioTests GridDomain.Scenarios.Tests Release
51-
runTests ClusterUnitTests GridDomain.Cluster.Tests Release
46+
./test/test.sh
5247
5348
artifacts:
5449
- path: '**\GridDomain.*.nupkg'
5550
name: Packages
56-
- path: '**\*.zip'
51+
- path: '**\*logs.zip'
5752
name: TestResults
5853
deploy:
5954
- provider: Environment
60-
name: MyGet development feed
55+
name: MyGet development feed
56+
on_finish:
57+
- sh: |
58+
find "$APPVEYOR_BUILD_FOLDER" -type f -name '*.trx' -print0 | xargs -0 -I '{}' curl -F 'file=@{}' "https://ci.appveyor.com/api/testresults/mstest/$APPVEYOR_JOB_ID"

build/test.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

test/test.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
runTests()
3+
{
4+
testsName=$1
5+
testsFolder=$2
6+
configuration=$3
7+
8+
cd $testsFolder
9+
echo Running tests in $testsFolder
10+
testOutputFile="$testsName"Output.txt
11+
dotnet test --no-build --configuration $configuration --no-restore --logger trx > $testOutputFile
12+
TestResult=$?
13+
14+
# echo Looking for a tests results
15+
# cd ./bin/$configuration/netcoreapp2.0/Logs
16+
# find . -name '*.trx' -exec cp {} .
17+
zip -r ./"$testsName"_logs.zip ./TestResults/*.trx
18+
19+
#cd -
20+
cd ..
21+
22+
if [ $TestResult -ne 0 ];then
23+
echo should exit...
24+
#exit #$TestResult
25+
fi
26+
echo continue
27+
28+
}
29+
30+
31+
cd ../src
32+
33+
runTests UnitTests GridDomain.Node.Tests Release
34+
runTests AcceptanceTests GridDomain.Aggregates.Tests Release
35+
runTests ScenarioTests GridDomain.Scenarios.Tests Release
36+
runTests ClusterUnitTests GridDomain.Cluster.Tests Release

0 commit comments

Comments
 (0)