Skip to content

Commit

Permalink
Merge pull request Azure#30 from huangpf/crp2
Browse files Browse the repository at this point in the history
Crp2
  • Loading branch information
AzureRT committed Apr 2, 2015
2 parents 6ea3898 + d489dde commit 9eeef7a
Show file tree
Hide file tree
Showing 236 changed files with 952 additions and 1,228 deletions.
62 changes: 42 additions & 20 deletions AzurePowershell.Test.targets
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@
<AzureRTAllPreviewFilter>"Functional|AzureRTScenario|Preview"</AzureRTAllPreviewFilter>
<AzureRTUploadSeqFilter>"AzureRTUpload|Sequential"</AzureRTUploadSeqFilter>
<AzureRTSeqAllFilter>"AzureRTUpload|Sequential|Network"</AzureRTSeqAllFilter>
<TestTimeout Condition=" '$(TestTimeout)' == '' ">100000000</TestTimeout>
</PropertyGroup>

<ItemGroup>
<XUnitTests Include=".\src\Common\Commands.Common.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Common.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll"/>
<XUnitTests Include=".\src\ServiceManagement\Services\Commands.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Test.dll"/>
<XUnitTests Include=".\src\ServiceManagement\StorSimple\Commands.StorSimple.Test\bin\Debug\Microsoft.WindowsAzure.Commands.StorSimple.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Resources\Commands.Resources.Test\bin\Debug\Microsoft.Azure.Commands.Resources.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Compute\Commands.Compute.Test\bin\Debug\Microsoft.Azure.Commands.Compute.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\DataFactories\Commands.DataFactories.Test\bin\Debug\Microsoft.Azure.Commands.DataFactories.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\StreamAnalytics\Commands.StreamAnalytics.Test\bin\Debug\Microsoft.Azure.Commands.StreamAnalytics.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Batch\Commands.Batch.Test\bin\Debug\Microsoft.Azure.Commands.Batch.Test.dll"/>
Expand All @@ -49,11 +52,10 @@
<XUnitTests Include=".\src\ServiceManagement\RemoteApp\Commands.RemoteApp.Test\bin\Debug\Microsoft.Azure.Commands.RemoteApp.Tests.dll"/>
<XUnitTests Include=".\src\Common\Commands.ScenarioTest\bin\Debug\Microsoft.WindowsAzure.Commands.ScenarioTest.dll"/>
<XUnitTests Include=".\src\ServiceManagement\RecoveryServices\Commands.RecoveryServices.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServices.Test.dll"/>
<XUnitTests Include=".\src\ServiceManagement\StorSimple\Commands.StorSimple.Test\bin\Debug\Microsoft.WindowsAzure.Commands.StorSimple.Test.dll"/>
</ItemGroup>

<Target Name="InvokeMSTest">
<!--Remove existing test result; otherwsie mstest will error-->
<!--Remove existing test result; otherwise mstest will error-->
<Delete Files="$(_testResult)"/>
<Exec
Command="MSTest.exe /testcontainer:$(_testAssembly) /testsettings:$(_testSettings) /category:$(_testFilter) /resultsfile:$(_testResult)"
Expand All @@ -63,8 +65,23 @@
<Target Name="InvokeXUnit">
<Message Importance="high" Text="Running XUnit tests" />
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
<Xunit.Runner.MSBuild.xunit Assemblies="@(XUnitTests)" Html="$(TestOutputDirectory)\xunit.tests.dll.html" Verbose="true"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false"/>
<Exec
Command="$(MSBuildProjectDirectory)\packages\xunit.runner.console.2.0.0\tools\xunit.console.x86.exe &quot;%(XUnitTests.Identity)&quot; -trait &quot;AcceptanceType=CheckIn&quot; -html &quot;$(TestOutputDirectory)\%(XUnitTests.Filename).html&quot;"
Timeout="$(TestTimeout)" ContinueOnError="false"/>
<OnError ExecuteTargets="TimeoutErrorHandler"/>
</Target>

<Target Name="InvokeXUnitAll">
<Message Importance="high" Text="Running XUnit tests" />
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
<Exec
Command="$(MSBuildProjectDirectory)\packages\xunit.runner.console.2.0.0\tools\xunit.console.x86.exe &quot;%(XUnitTests.Identity)&quot; -notrait &quot;RunType=LiveOnly&quot; -html &quot;$(TestOutputDirectory)\%(XUnitTests.Filename).html&quot;"
Timeout="$(TestTimeout)" ContinueOnError="false"/>
<OnError ExecuteTargets="TimeoutErrorHandler"/>
</Target>

<Target Name="TimeoutErrorHandler">
<Error Text="XUnit tests in assembly &quot;%(XUnitTests.Filename).dll&quot; failed or timed out. Ensure that all tests in a project pass and collectively take less than 1 minute to run."/>
</Target>

<Target Name="BeforeRunTests">
Expand All @@ -74,46 +91,51 @@

<Target Name="TestManagement">
<Xunit.Runner.MSBuild.xunit Assemblies="$(ManagementTestDebug)" Html="$(TestOutputDirectory)\ManagementDebug.xunit.dll.html" Verbose="false"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>

<Target Name="TestManagedCache">
<PropertyGroup>
<_ManagedCacheTestAssembly>.\src\ServiceManagement\ManagedCache\Commands.ManagedCache.Test\bin\Debug\Microsoft.Azure.Commands.ManagedCache.Test.dll</_ManagedCacheTestAssembly>
</PropertyGroup>
<Xunit.Runner.MSBuild.xunit Assemblies="$(_ManagedCacheTestAssembly)" Html="$(TestOutputDirectory)\ManagedCache.xunit.dll.html" Verbose="false"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>

<Target Name="TestResourceManager">
<Xunit.Runner.MSBuild.xunit Assemblies="$(ResourceManagerTestDebug)" Html="$(TestOutputDirectory)\ResourceManagerTestDebug.xunit.dll.html" Verbose="false"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>


<Target Name="TestCompute">
<Xunit.Runner.MSBuild.xunit Assemblies="$(ComputeTestDebug)" Html="$(TestOutputDirectory)\ComputeTestDebug.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>

<Target Name="TestBatch">
<Xunit.Runner.MSBuild.xunit Assemblies="$(BatchTestDebug)" Html="$(TestOutputDirectory)\BatchTestDebug.xunit.dll.html" Verbose="false"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>


<Target Name="TestRemoteApp">
<Xunit.Runner.MSBuild.xunit Assemblies="$(RemoteAppTestDebug)" Html="$(TestOutputDirectory)\RemoteAppTestDebug.xunit.dll.html" Verbose="false"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>

<Target Name="TestWebsites">
<Xunit.Runner.MSBuild.xunit Assemblies="$(WebsitesTestDebug)" Html="$(TestOutputDirectory)\WebsitesTestDebug.xunit.dll.html" Verbose="false"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>

<Target Name="TestDataFactoryManager">
<Xunit.Runner.MSBuild.xunit Assemblies="$(DataFactoryManagerTestDebug)" Html="$(TestOutputDirectory)\DataFactoryManagerTestDebug.xunit.dll.html" Verbose="false"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>

<Target Name="TestStreamAnalyticsManager">
<Xunit.Runner.MSBuild.xunit Assemblies="$(StreamAnalyticsManagerTestDebug)" Html="$(TestOutputDirectory)\StreamAnalyticsManagerTestDebug.xunit.dll.html" Verbose="false"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>

<Target Name="TestServiceManagement">
Expand Down Expand Up @@ -151,15 +173,15 @@
<_RecoveryServicesTestAssembly>.\src\ServiceManagement\RecoveryServices\Commands.RecoveryServices.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServices.Test.dll</_RecoveryServicesTestAssembly>
</PropertyGroup>
<Xunit.Runner.MSBuild.xunit Assemblies="$(_RecoveryServicesTestAssembly)" Html="$(TestOutputDirectory)\RecoveryServices.xunit.dll.html" Verbose="false"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>

<Target Name="TestStorSimple">
<PropertyGroup>
<_StorSimpleTestAssembly>.\src\ServiceManagement\StorSimple\Commands.StorSimple.Test\bin\Debug\Microsoft.WindowsAzure.Commands.StorSimple.Test.dll</_StorSimpleTestAssembly>
</PropertyGroup>
<Xunit.Runner.MSBuild.xunit Assemblies="$(_StorSimpleTestAssembly)" Html="$(TestOutputDirectory)\StorSimple.xunit.dll.html" Verbose="false"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>

<!-- Run the scenario tests -->
Expand All @@ -177,35 +199,35 @@
<Target Name="CommonTests">
<Message Importance="high" Text="Running Common tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(CommonTestDebug)" Html="$(TestOutputDirectory)\CommonTests.xunit.dll.html" Verbose="false"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false"/>
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false"/>
</Target>

<!-- Run the Compute tests -->
<Target Name="ComputeTests">
<Message Importance="high" Text="Running Compute tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(ComputeTestDebug)" Html="$(TestOutputDirectory)\ComputeTests.xunit.dll.html" Verbose="false"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
ExcludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>

<!-- Run the sql tests -->
<Target Name="SqlTests">
<Message Importance="high" Text="Running Sql tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(SqlTestDebug)" Html="$(TestOutputDirectory)\SqlTests.xunit.dll.html" Verbose="false"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>

<!-- Run the KeyVault tests -->
<Target Name="KeyVaultTests">
<Message Importance="high" Text="Running KeyVault tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(KeyVaultTestDebug)" Html="$(TestOutputDirectory)\KeyVaultTests.xunit.dll.html" Verbose="true"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false"/>
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false"/>
</Target>

<!-- Run the scenario tests with Mocks -->
<Target Name="MockedScenarioTests">
<Message Importance="high" Text="Running scenario tests with Mocks" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(ScenarioTestDebug)" Html="$(TestOutputDirectory)\MockedScenarioTests.xunit.dll.html" Verbose="true"
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>

<Target Name="RunOneSDKCIT" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
Expand Down
31 changes: 31 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
2015.03.31 version 0.8.16
* Azure Data Factory:
* Fixes for clean install and subscription registration issues
* Azure HDInsight:
* Support for creating, deleting, listing, and submitting jobs to HDInsight clusters with Linux Operating System.
* Azure Compute
* Fix pipeline issues with Get-AzureVM (#3047)
* Fixed DateTime Overflow issue
* Azure Batch
* Added cmdlets
* Add/Remove Batch Pools
* Get-BatchTaskFileContent
* Get-BatchTaskFile
* Azure Insights
* Added cmdlets
* Add-AutoscaleSetting
* Get-AutoscaleHistory
* Get-AutoscaleSetting
* New-AutoscaleProfile
* New-AutoscaleRule
* Remove-AutoscaleSetting
* Get-Metrics
* Get-MetricDefinitions
* Format-MetricsAsTable
* Azure Websites
* Added cmdlet Get-AzureWebhostingPlanMetrics
* Added Premium support
* Renamed WebSites to WebApp
* AzureProfile
* Made AzureProfile serializable to support workflow scenarios

2015.03.11 version 0.8.15.1
* Fixes for clean install and subscription registration issues

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ This repository contains a set of PowerShell cmdlets for developers and administ
* Log streaming
* Save log
* Cloud Services
* Create scaffolding for cloud service and role. Role support includes Node.js, PHP, Django and Cache.
* Create scaffolding for cloud service and role. Role support includes Node.js and PHP.
* Manage cloud service and role, such as CRUD, start and stop.
* Manage extension
* Manage extension.
* Start/Stop Azure emulator.
* Manage certificate.
* Manage cloud service extensions
Expand Down Expand Up @@ -294,4 +294,4 @@ If you encounter any bugs with the library please file an issue in the [Issues](

# Learn More

* [Microsoft Azure Script Center](http://www.azure.microsoft.com/en-us/documentation/scripts/)
* [Microsoft Azure Script Center](http://www.azure.microsoft.com/en-us/documentation/scripts/)
8 changes: 4 additions & 4 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</ItemGroup>

<UsingTask
AssemblyFile="$(MSBuildProjectDirectory)\packages\xunit.runners.2.0.0-beta4-build2738\tools\xunit.runner.msbuild.dll"
AssemblyFile="$(MSBuildProjectDirectory)\packages\xunit.runner.console.2.0.0\tools\xunit.runner.msbuild.dll"
TaskName="Xunit.Runner.MSBuild.xunit" />

<!-- Clean the build in all configurations -->
Expand Down Expand Up @@ -154,7 +154,7 @@
<!-- Do everything possible -->
<Target
Name="Full"
DependsOnTargets="ForceRestorePackages;Clean;BuildDebug;BuildRelease;Test;BuildSetupDebug;BuildSetupRelease" />
DependsOnTargets="ForceRestorePackages;Clean;BuildDebug;Test;BuildSetupDebug" />

<!-- Build the Cmdlets in Release configuration -->
<Target Name="BuildRelease" DependsOnTargets="ForceRestorePackages">
Expand All @@ -180,15 +180,15 @@

<PropertyGroup>
<RunTestLive Condition="'$(RunTestLive)' == ''">false</RunTestLive>
<XUnitExcludedTrait Condition="!$(RunTestLive)">RunType=LiveOnly</XUnitExcludedTrait>
<XUnitIncludedTrait Condition="!$(RunTestLive)">AcceptanceType=CheckIn</XUnitIncludedTrait>
</PropertyGroup>
<!-- Note: all testing related target should go to 'AzurePowershell.test.targets' file except the one used by CI run -->
<Import Project="$(MSBuildThisFileDirectory)AzurePowershell.test.targets"/>

<!-- Run checkin tests for each pull request -->
<Target Name="Test" DependsOnTargets="BuildDebug;BeforeRunTests">
<Message Importance="high" Text="Running check in tests..." />
<CallTarget Targets="InvokeXUnit; TestHDInsight; TestServiceManagement; TestServiceManagementExtensions; TestSqlDatabase; TestStorage; TestDSCExtension_x64; ComputeTests"/>
<CallTarget Targets="InvokeXUnit"/>
</Target>

<!-- Run Full switch with scenario tests -->
Expand Down
2 changes: 1 addition & 1 deletion packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="xunit.runners" version="2.0.0-beta4-build2738" />
<package id="xunit.runner.console" version="2.0.0" />
<package id="xunit.runners" version="1.9.2" />
</packages>
Loading

0 comments on commit 9eeef7a

Please sign in to comment.