Skip to content

Commit

Permalink
Added support for xunit testing on windows phone
Browse files Browse the repository at this point in the history
  • Loading branch information
remogloor committed Jan 24, 2012
1 parent a3efa5d commit a604993
Show file tree
Hide file tree
Showing 36 changed files with 544 additions and 119 deletions.
82 changes: 79 additions & 3 deletions default.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,6 @@ Task compile-Solution-Phone {
$solutionFolder = (split-path (get-item $solutionFilePhone))

exec { . $msbuild $solutionFilePhone /t:Rebuild /p:Configuration=$build_configuration /p:Platform=x86 $verbosity /nologo /p:CompileTimeSolutionDir="$solutionFolder" } 'msbuild failed $solutionFilePhone'

Copy-Item ".\src\StatLight.Client.Harness.Phone\Bin\$build_configuration\StatLight.Client.Harness.Phone.xap" "$build_dir\StatLight.Client.For.MSTestMay2010Phone.xap"
}

Task compile-StatLight-UnitDrivenHost {
Expand Down Expand Up @@ -747,9 +745,84 @@ Task compile-StatLight-XUnitContribHost {
}

Task compile-StatLight-XUnitContribHost-Phone {
throw "Not implemented"
$references = (ls .\src\StatLight.Client.Harness.XUnitPhone\Bin\$build_configuration\*.dll)
$png = (ls .\src\StatLight.Client.Harness.Phone\*.png)
$jpg = (ls .\src\StatLight.Client.Harness.Phone\*.jpg)
$manifest = (ls .\src\StatLight.Client.Harness.Phone\WMAppManifest.xml)
$referencedNames = ($references | foreach { $_.Name.TrimEnd(".dll") })

$zippedName = "$build_dir\$statlight_xap_for_prefix.XUnitContrib2011AprilPhone.zip"

$appManifestContent = [string] '<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" EntryPointAssembly="StatLight.Client.Harness.Phone" EntryPointType="StatLight.Client.Harness.Phone.App" RuntimeVersion="3.0.40624.0">
<Deployment.Parts>'

$referencedNames | foreach {
$ass = $_
$extraStuff = "
<AssemblyPart x:Name=""$ass"" Source=""$ass.dll"" />"
$appManifestContent += $extraStuff
}

$appManifestContent += ' </Deployment.Parts>
</Deployment>'

$newAppManifestFile = "$(($pwd).Path)\src\build\AppManifest.xaml"
Remove-If-Exists $newAppManifestFile
([xml]$appManifestContent).Save($newAppManifestFile);

$zipFiles = $references
$zipFiles += $png
$zipFiles += $jpg
$zipFiles += $manifest
$zipFiles += @(
Get-Item $newAppManifestFile
)

Remove-If-Exists $zippedName
#throw 'a'
$zipFiles | Zip-Files-From-Pipeline $zippedName | Out-Null
#Create-Xap $zippedName $zipFiles
}

Task compile-StatLight-MSTest-Phone {
$references = (ls .\src\StatLight.Client.Harness.MSTestPhone\Bin\$build_configuration\*.dll)
$png = (ls .\src\StatLight.Client.Harness.Phone\*.png)
$jpg = (ls .\src\StatLight.Client.Harness.Phone\*.jpg)
$manifest = (ls .\src\StatLight.Client.Harness.Phone\WMAppManifest.xml)
$referencedNames = ($references | foreach { $_.Name.TrimEnd(".dll") })

$zippedName = "$build_dir\$statlight_xap_for_prefix.MSTest2010MayPhone.zip"

$appManifestContent = [string] '<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" EntryPointAssembly="StatLight.Client.Harness.Phone" EntryPointType="StatLight.Client.Harness.Phone.App" RuntimeVersion="3.0.40624.0">
<Deployment.Parts>'

$referencedNames | foreach {
$ass = $_
$extraStuff = "
<AssemblyPart x:Name=""$ass"" Source=""$ass.dll"" />"
$appManifestContent += $extraStuff
}

$appManifestContent += ' </Deployment.Parts>
</Deployment>'

$newAppManifestFile = "$(($pwd).Path)\src\build\AppManifest.xaml"
Remove-If-Exists $newAppManifestFile
([xml]$appManifestContent).Save($newAppManifestFile);

$zipFiles = $references
$zipFiles += $png
$zipFiles += $jpg
$zipFiles += $manifest
$zipFiles += @(
Get-Item $newAppManifestFile
)

Remove-If-Exists $zippedName
#throw 'a'
$zipFiles | Zip-Files-From-Pipeline $zippedName | Out-Null
#Create-Xap $zippedName $zipFiles
}
#########################################
#
# Unit/Integration tests
Expand Down Expand Up @@ -1072,6 +1145,7 @@ Task package-release -depends clean-release {
$expectedFilesToInclude += @(
'StatLight.Client.For.MSTest2010MayPhone.xap'
'StatLight.WindowsPhoneEmulator.dll'
'StatLight.Client.For.XUnitContrib2011AprilPhone.xap'
)
}
"****"
Expand Down Expand Up @@ -1230,6 +1304,8 @@ Task build-all-phone -depends `
initialize, `
create-AssemblyInfo, `
compile-Solution-Phone, `
compile-StatLight-MSTest-Phone, `
compile-StatLight-XUnitContribHost-Phone, `
compile-StatLight-MSTestHostVersions, `
compile-StatLight-UnitDrivenHost, `
compile-StatLight-XUnitContribHost, `
Expand Down
29 changes: 29 additions & 0 deletions lib/Silverlight/xUnit/Silverlight5/EULA.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.

1. Definitions

The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.

A "contribution" is the original software, or any additions or changes to the software.

A "contributor" is any person that distributes its contribution under this license.

"Licensed patents" are a contributor's patent claims that read directly on its contribution.

2. Grant of Rights

(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.

(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

3. Conditions and Limitations

(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.

(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.

(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.

(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.

(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added lib/Silverlight/xUnit/WP7/Microsoft.Phone.dll
Binary file not shown.
Binary file modified lib/Silverlight/xUnit/WP7/xunit-silverlight.dll
Binary file not shown.
Binary file modified lib/Silverlight/xUnit/WP7/xunit-silverlight.pdb
Binary file not shown.
Binary file modified lib/Silverlight/xUnit/WP7/xunit.extensions-silverlight.dll
Binary file not shown.
Binary file modified lib/Silverlight/xUnit/WP7/xunit.extensions-silverlight.pdb
Binary file not shown.
Binary file modified lib/Silverlight/xUnit/WP7/xunit.runner.silverlight.dll
Binary file not shown.
Binary file modified lib/Silverlight/xUnit/WP7/xunit.runner.silverlight.pdb
Binary file not shown.
29 changes: 29 additions & 0 deletions lib/Silverlight/xUnit/WP71/EULA.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.

1. Definitions

The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.

A "contribution" is the original software, or any additions or changes to the software.

A "contributor" is any person that distributes its contribution under this license.

"Licensed patents" are a contributor's patent claims that read directly on its contribution.

2. Grant of Rights

(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.

(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

3. Conditions and Limitations

(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.

(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.

(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.

(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.

(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
Binary file not shown.
Binary file added lib/Silverlight/xUnit/WP71/Microsoft.Phone.dll
Binary file not shown.
Binary file not shown.
Binary file added lib/Silverlight/xUnit/WP71/xunit-silverlight.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions src/CustomDictionary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<Word>Fav</Word>
<Word>Contrib</Word>
<Word>Xunit</Word>
<Word>ioc</Word>
<Word>std</Word>
<Word>api</Word>
<Word>dir</Word>
</Recognized>
</Words>
</Dictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Resources;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("StatLight.Client.Harness.MSTestPhone")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("StatLight.Client.Harness.MSTestPhone")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("b5786b2e-a7bb-46f6-a156-c54357396ae1")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
Loading

0 comments on commit a604993

Please sign in to comment.