Skip to content

Commit

Permalink
adding tests and test build targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Shekhovtsov committed Apr 10, 2015
1 parent 02b6fa4 commit feb360d
Show file tree
Hide file tree
Showing 104 changed files with 28,595 additions and 3 deletions.
63 changes: 63 additions & 0 deletions .gitattributes
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
160 changes: 160 additions & 0 deletions .gitignore
@@ -0,0 +1,160 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results
[Dd]ebug/
[Rr]elease/
[Bb]in/
[Oo]bj/
[Oo]bj//Core/Javascript/ai*.[tj]s*

# Telemetry output
*.onesipkg

# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml

# NuGet binaries downloaded automatically
packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf


#LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml

# =========================
# Windows detritus
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac desktop service store files
.DS_Store

# Build log files
*.err
*.prf
*.wrn
4 changes: 4 additions & 0 deletions Common.props
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'Global.props'))\Global.props" />
</Project>
Empty file added EnlistmentRoot.marker
Empty file.
143 changes: 143 additions & 0 deletions Global.props
@@ -0,0 +1,143 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- This file (Global.props) must be included into all projects in all solutions of this product. -->
<!-- It defines common build paths and infrastructure. -->
<!-- Other products / repositories using the same build pattern will have an own copy of copy this file -->

<!-- Project file location for the Import statement: -->
<!-- * You MUST include this file towards the bottom of each respective project file, * -->
<!-- * BELOW all local definitions, RIGHT ABOVE the targets import. * -->
<!-- * For example, right above this line: * -->
<!-- * <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> * -->

<!-- There are two easy ways to import this file. The shortest way is to write something like: -->
<!-- <Import Project="..\..\Global.props" /> -->
<!-- However, you will need to match the number of "..\" segments to the respective location of each project file in -->
<!-- your sourcce tree. A more robust approach is to include the following code. It can stay the same regardless of -->
<!-- your project file location: -->
<!--
<PropertyGroup Label="Include_Common_Build_Properties">
<CommonBuildPropsLocation>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'EnlistmentRoot.marker'))</CommonBuildPropsLocation>
</PropertyGroup>
<ImportGroup Label="Include_Common_Build_Properties">
<Import Project="$(CommonBuildPropsLocation)\Global.props" />
</ImportGroup>
-->

<PropertyGroup>
<!-- The common project structure looks like this: -->
<!-- d:\DDGit\ -->
<!-- ServiceFoo\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- .git\ -->
<!-- .nuget\ -->
<!-- Global.props -->
<!-- SomeProjectFolderA\ -->
<!-- NuGet.config -->
<!-- SomeProjectA.sln -->
<!-- ... -->
<!-- SomeProjectFolderB\ -->
<!-- ... -->
<!-- EnlistmentRoot.marker -->
<!-- ServiceBar\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- ... -->
<!-- -->
<!-- The Bin folder contains ALL build output. -->
<!-- The Obj folder contains all intermediate build files (like the obj folder). -->
<!-- The Packages folder contains ALL packages downloaded by NuGet. -->
<!-- The above folders contain NOTHING that is checked in (they are not checked in themselves). -->
<!-- The Src folder contains EVERHYTHNG that is checked in and ALL that is checked in. -->
<!-- No build output or temp files should end up in the Src folder! (barring a few *small* VS temporaries) -->
<!-- -->
<!-- Src MUST contain the EnlistmentRoot.marker file which marks the EnlistmentRoot. -->
<!-- Src also contains the NuGet.config file which ensures that NuGet uses the NuGet.Packages folder. -->

<EnlistmentRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'EnlistmentRoot.marker'))</EnlistmentRoot>

<BinRoot>$(EnlistmentRoot)\..\bin</BinRoot>
<BinRoot>$([System.IO.Path]::GetFullPath( $(BinRoot) ))</BinRoot>

<RelativeOutputPathBase>$(MSBuildProjectDirectory.Substring($(EnlistmentRoot.Length)))</RelativeOutputPathBase>

<BaseIntermediateOutputPath>$(EnlistmentRoot)\..\obj</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(BaseIntermediateOutputPath) ))</BaseIntermediateOutputPath>

<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

<OutputPath>$(BinRoot)\$(Configuration)\$(RelativeOutputPathBase)</OutputPath>
<OutputPath>$([System.IO.Path]::GetFullPath( $(OutputPath) ))\</OutputPath>

<!-- Collect all NuGet packages in the same folder for convenience during testing -->
<PackageOutputDir>$(BinRoot)\$(Configuration)\NuGet</PackageOutputDir>

<AppxPackageDir>$(OutputPath)</AppxPackageDir>

<IntermediateOutputPath>$(BaseIntermediateOutputPath)\$(Configuration)\$(RelativeOutputPathBase)</IntermediateOutputPath>
<IntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(IntermediateOutputPath) ))\</IntermediateOutputPath>

<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(EnlistmentRoot)\</SolutionDir>

<PackagesDir>$(EnlistmentRoot)\..\packages</PackagesDir>
<PackagesDir>$([System.IO.Path]::GetFullPath( $(PackagesDir) ))</PackagesDir>

</PropertyGroup>

<PropertyGroup>
<!-- Enable NuGet package restore during build -->
<RestorePackages>true</RestorePackages>
<RequireRestoreConsent>false</RequireRestoreConsent>

<!-- Set the root namespace for all assemblies in this project hierarchy -->
<RootNamespace>Microsoft.ApplicationInsights</RootNamespace>

<!-- Disable StyleCop by default to prevent StyleCop.MSBuild package from slowing down the debug build -->
<StyleCopEnabled>false</StyleCopEnabled>
</PropertyGroup>

<!-- Generate AssemblyFileVersion and AssemblyVersion attributes. -->
<PropertyGroup>
<!--
Semantic Version. See http://semver.org for full details.
Update for every public release.
-->
<SemanticVersionMajor>0</SemanticVersionMajor>
<SemanticVersionMinor>15</SemanticVersionMinor>
<SemanticVersionPatch>0</SemanticVersionPatch>

<!--
Date when Semantic Version was changed.
Update for every public release.
-->
<SemanticVersionDate>2015-3-17</SemanticVersionDate>

<!--
Pre-release version is used to distinguish internally built NuGet packages.
Pre-release version = Minutes since semantic version was set, divided by 5 (to make it fit in a UInt16).
-->
<PreReleaseVersion>$([MSBuild]::Divide($([System.DateTime]::Now.Subtract($([System.DateTime]::Parse($(SemanticVersionDate)))).TotalMinutes), 5).ToString('F0'))</PreReleaseVersion>

<!-- Turn on dynamic assembly attribute generation -->
<AssemblyAttributesPath>$(IntermediateOutputPath)\AssemblyInfo.g.cs</AssemblyAttributesPath>
<GenerateAdditionalSources>true</GenerateAdditionalSources>
</PropertyGroup>
<ItemGroup>
<!--
AssemblyVersion and AssemblyFileVersion attributes are generated automatically for every build.
NuGet package version is derived from AssemblyFileVersion.
-->
<AssemblyAttributes Include="AssemblyVersion">
<_Parameter1>$(SemanticVersionMajor).$(SemanticVersionMinor).$(SemanticVersionPatch).$(PreReleaseVersion)</_Parameter1>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyFileVersion">
<_Parameter1>$(SemanticVersionMajor).$(SemanticVersionMinor).$(SemanticVersionPatch).$(PreReleaseVersion)</_Parameter1>
</AssemblyAttributes>
</ItemGroup>
</Project>

0 comments on commit feb360d

Please sign in to comment.