Skip to content

Commit

Permalink
enable amqp methods build in jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmineymlo committed Mar 28, 2017
1 parent 64e1603 commit 49b0c24
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DefineConstants>TRACE;DEBUG;$(DefineConstants2)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Microsoft.Azure.Devices.Client.xml</DocumentationFile>
Expand All @@ -30,7 +30,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;$(DefineConstants2)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand All @@ -48,7 +48,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_Delay_Sign|AnyCPU'">
<OutputPath>bin\Release_Delay_Sign\</OutputPath>
<DefineConstants>TRACE;RELEASE_DELAY_SIGN</DefineConstants>
<DefineConstants>TRACE;RELEASE_DELAY_SIGN;$(DefineConstants2)</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>bin\Release\Microsoft.Azure.Devices.Client.xml</DocumentationFile>
<Optimize>true</Optimize>
Expand Down
12 changes: 11 additions & 1 deletion device/build/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ rem // default build options
set build-clean=0
set build-config=Release
set build-platform="Any CPU"
set wip-use-c2d-amqp-methods=0

:args-loop
if "%1" equ "" goto args-done
if "%1" equ "-c" goto arg-build-clean
if "%1" equ "--clean" goto arg-build-clean
if "%1" equ "--config" goto arg-build-config
if "%1" equ "--platform" goto arg-build-platform
if "%1" equ "--wip-use-c2d-amqp-methods" goto arg-wip-use-c2d-amqp-methods
call :usage && exit /b 1

:arg-build-clean
Expand All @@ -60,6 +62,10 @@ if "%1" equ "" call :usage && exit /b 1
set build-platform=%1
goto args-continue

:arg-wip-use-c2d-amqp-methods
set wip-use-c2d-amqp-methods=1
goto args-continue

:args-continue
shift
goto args-loop
Expand Down Expand Up @@ -119,6 +125,10 @@ if "%~1" neq "Build" set "build-target=/t:%~1"
if "%~3" neq "" set build-config=%~3
if "%~4" neq "" set build-platform=%~4

msbuild /m %build-target% "/p:Configuration=%build-config%;Platform=%build-platform%" %2
if %wip-use-c2d-amqp-methods%==1 (
set extra-defines="WIP_C2D_METHODS_AMQP"
)

msbuild /m /t:Rebuild %build-target% "/p:Configuration=%build-config%;Platform=%build-platform%" /p:DefineConstants2=%extra-defines% %2
if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL!
goto :eof
4 changes: 0 additions & 4 deletions e2e/Microsoft.Azure.Devices.E2ETests/MethodE2ETests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ await SendMethodAndRespondRecovery(Client.TransportType.Amqp_WebSocket_Only,
TestUtil.DefaultDelayInSec);
}

[Ignore]
[TestMethod]
[TestCategory("Method-E2E")]
[TestCategory("Recovery")]
Expand All @@ -187,7 +186,6 @@ await SendMethodAndRespondRecovery(Client.TransportType.Amqp_Tcp_Only,
TestUtil.DefaultDelayInSec);
}

[Ignore]
[TestMethod]
[TestCategory("Method-E2E")]
[TestCategory("Recovery")]
Expand All @@ -199,7 +197,6 @@ await SendMethodAndRespondRecovery(Client.TransportType.Amqp_WebSocket_Only,
TestUtil.DefaultDelayInSec);
}

[Ignore]
[TestMethod]
[TestCategory("Method-E2E")]
[TestCategory("Recovery")]
Expand All @@ -211,7 +208,6 @@ await SendMethodAndRespondRecovery(Client.TransportType.Amqp_Tcp_Only,
TestUtil.DefaultDelayInSec);
}

[Ignore]
[TestMethod]
[TestCategory("Method-E2E")]
[TestCategory("Recovery")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE;$(DefineConstants2)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;$(DefineConstants2)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
Expand Down
12 changes: 11 additions & 1 deletion e2e/build/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ rem // default build options
set build-clean=0
set build-config=Release
set build-platform="Any CPU"
set wip-use-c2d-amqp-methods=0

:args-loop
if "%1" equ "" goto args-done
if "%1" equ "-c" goto arg-build-clean
if "%1" equ "--clean" goto arg-build-clean
if "%1" equ "--config" goto arg-build-config
if "%1" equ "--platform" goto arg-build-platform
if "%1" equ "--wip-use-c2d-amqp-methods" goto arg-wip-use-c2d-amqp-methods
call :usage && exit /b 1

:arg-build-clean
Expand All @@ -60,6 +62,10 @@ if "%1" equ "" call :usage && exit /b 1
set build-platform=%1
goto args-continue

:arg-wip-use-c2d-amqp-methods
set wip-use-c2d-amqp-methods=1
goto args-continue

:args-continue
shift
goto args-loop
Expand Down Expand Up @@ -119,6 +125,10 @@ if "%~1" neq "Build" set "build-target=/t:%~1"
if "%~3" neq "" set build-config=%~3
if "%~4" neq "" set build-platform=%~4

msbuild /m %build-target% "/p:Configuration=%build-config%;Platform=%build-platform%" %2
if %wip-use-c2d-amqp-methods%==1 (
set extra-defines="WIP_C2D_METHODS_AMQP"
)

msbuild /m /t:Rebuild %build-target% "/p:Configuration=%build-config%;Platform=%build-platform%" /p:DefineConstants2=%extra-defines% %2
if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL!
goto :eof
55 changes: 55 additions & 0 deletions jenkins/windows_csharp_wip_amqp_methods.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
@REM Copyright (c) Microsoft. All rights reserved.
@REM Licensed under the MIT license. See LICENSE file in the project root for full license information.

setlocal

set build-root=%~dp0..
rem // resolve to fully qualified path
for %%i in ("%build-root%") do set build-root=%%~fi

REM -- C# Shared Assembly --
cd %build-root%\shared\build
call build.cmd
if errorlevel 1 goto :eof
cd %build-root%

REM -- C# Device SDK --
cd %build-root%\device\build
call build.cmd --wip-use-c2d-amqp-methods
if errorlevel 1 goto :eof
cd %build-root%

REM -- C# Service SDK --
cd %build-root%\service\build
call build.cmd
if errorlevel 1 goto :eof
cd %build-root%

REM -- C# E2E Tests --
cd %build-root%\e2e\build
call build.cmd --wip-use-c2d-amqp-methods
if errorlevel 1 goto :eof
cd %build-root%

REM -- Device Explorer --
cd %build-root%\tools\DeviceExplorer\build
call build.cmd
if errorlevel 1 goto :eof
cd %build-root%

REM -- Run C# device SDK unit Tests --
cd %build-root%\device\tests\Microsoft.Azure.Devices.Client.Test\bin\Release
mstest /TestContainer:Microsoft.Azure.Devices.Client.Test.dll
if errorlevel 1 goto :eof
cd %build-root%

REM -- Run C# E2E Tests --
cd %build-root%\e2e\Microsoft.Azure.Devices.E2ETests\bin\Release
mstest /TestContainer:Microsoft.Azure.Devices.E2ETests.dll
if errorlevel 1 goto :eof
cd %build-root%

echo.
echo C# build completed successfully
echo.

0 comments on commit 49b0c24

Please sign in to comment.