From fa4b163feac008bf7147cdad4f2dd88ef778ad2c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 26 Feb 2016 17:14:01 -0800 Subject: windows C# distribtest --- test/distrib/csharp/DistribTest.sln | 6 ++++++ test/distrib/csharp/DistribTest/DistribTest.csproj | 20 ++++++++++++++++++++ test/distrib/csharp/run_distrib_test.bat | 21 +++++++++++++++++++++ test/distrib/csharp/run_distrib_test.sh | 4 +--- test/distrib/csharp/update_version.sh | 10 +++++++++- 5 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 test/distrib/csharp/run_distrib_test.bat (limited to 'test/distrib/csharp') diff --git a/test/distrib/csharp/DistribTest.sln b/test/distrib/csharp/DistribTest.sln index 0eca35c30f..78d5397ca9 100644 --- a/test/distrib/csharp/DistribTest.sln +++ b/test/distrib/csharp/DistribTest.sln @@ -8,13 +8,19 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {A3E61CC3-3710-49A3-A830-A0066EDBCE2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A3E61CC3-3710-49A3-A830-A0066EDBCE2F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3E61CC3-3710-49A3-A830-A0066EDBCE2F}.Debug|x64.ActiveCfg = Debug|x64 + {A3E61CC3-3710-49A3-A830-A0066EDBCE2F}.Debug|x64.Build.0 = Debug|x64 {A3E61CC3-3710-49A3-A830-A0066EDBCE2F}.Release|Any CPU.ActiveCfg = Release|Any CPU {A3E61CC3-3710-49A3-A830-A0066EDBCE2F}.Release|Any CPU.Build.0 = Release|Any CPU + {A3E61CC3-3710-49A3-A830-A0066EDBCE2F}.Release|x64.ActiveCfg = Release|x64 + {A3E61CC3-3710-49A3-A830-A0066EDBCE2F}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/test/distrib/csharp/DistribTest/DistribTest.csproj b/test/distrib/csharp/DistribTest/DistribTest.csproj index 124fc1bdf0..7605495f0f 100644 --- a/test/distrib/csharp/DistribTest/DistribTest.csproj +++ b/test/distrib/csharp/DistribTest/DistribTest.csproj @@ -32,6 +32,26 @@ prompt 4 + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + prompt + MinimumRecommendedRules.ruleset + true + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + prompt + MinimumRecommendedRules.ruleset + true + ..\packages\BouncyCastle.1.7.0\lib\Net40-Client\BouncyCastle.Crypto.dll diff --git a/test/distrib/csharp/run_distrib_test.bat b/test/distrib/csharp/run_distrib_test.bat new file mode 100644 index 0000000000..950894f668 --- /dev/null +++ b/test/distrib/csharp/run_distrib_test.bat @@ -0,0 +1,21 @@ + +@rem enter this directory +cd /d %~dp0 + +@rem extract input artifacts +powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::ExtractToDirectory('../../../input_artifacts/csharp_nugets.zip', 'TestNugetFeed');" + +update_version.sh auto + +set NUGET=C:\nuget\nuget.exe +%NUGET% restore || goto :error + +@call build_vs2015.bat DistribTest.sln %MSBUILD_EXTRA_ARGS% || goto :error + +%DISTRIBTEST_OUTPATH%\DistribTest.exe || goto :error + +goto :EOF + +:error +echo Failed! +exit /b %errorlevel% diff --git a/test/distrib/csharp/run_distrib_test.sh b/test/distrib/csharp/run_distrib_test.sh index 1de62041b3..934174a9a4 100755 --- a/test/distrib/csharp/run_distrib_test.sh +++ b/test/distrib/csharp/run_distrib_test.sh @@ -34,9 +34,7 @@ cd $(dirname $0) unzip -o "$EXTERNAL_GIT_ROOT/input_artifacts/csharp_nugets.zip" -d TestNugetFeed -# Extract the version number from Grpc nuget package name. -CSHARP_VERSION=$(ls TestNugetFeed | grep '^Grpc\.[0-9].*\.nupkg$' | sed s/^Grpc\.// | sed s/\.nupkg$//) -./update_version.sh $CSHARP_VERSION +./update_version.sh auto nuget restore diff --git a/test/distrib/csharp/update_version.sh b/test/distrib/csharp/update_version.sh index f2554e8998..b0d07721f6 100755 --- a/test/distrib/csharp/update_version.sh +++ b/test/distrib/csharp/update_version.sh @@ -32,5 +32,13 @@ set -e cd $(dirname $0) +CSHARP_VERSION="$1" +if [ "$CSHARP_VERSION" == "auto" ] +then + # autodetect C# version + CSHARP_VERSION=$(ls TestNugetFeed | grep '^Grpc\.[0-9].*\.nupkg$' | sed s/^Grpc\.// | sed s/\.nupkg$//) + echo "Autodetected nuget ${CSHARP_VERSION}" +fi + # Replaces version placeholder with value provided as first argument. -sed -ibak "s/__GRPC_NUGET_VERSION__/$1/g" DistribTest/packages.config DistribTest/DistribTest.csproj +sed -ibak "s/__GRPC_NUGET_VERSION__/${CSHARP_VERSION}/g" DistribTest/packages.config DistribTest/DistribTest.csproj -- cgit v1.2.3