Skip to content

Commit 0414478

Browse files
committed
Make sure StyleCopTester is up-to-date before churn testing
1 parent b58b0a3 commit 0414478

2 files changed

Lines changed: 24 additions & 3 deletions

File tree

StyleCop.Analyzers/ChurnTesting/RunChurnTest.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
$NuGet = '..\..\.nuget\NuGet.exe'
2+
3+
# Make sure the project binaries are up-to-date
4+
&$NuGet restore ..\..\StyleCopAnalyzers.sln
5+
Push-Location
6+
cd ..\..\build
7+
.\build.ps1 -Incremental
8+
Pop-Location
9+
210
&$NuGet install Microsoft.CodeAnalysis -Version 1.1.0 -OutputDirectory ..\..\packages -Verbosity quiet
311
&$NuGet install Microsoft.CodeAnalysis -Version 1.1.1 -OutputDirectory ..\..\packages -Verbosity quiet
412

@@ -41,9 +49,10 @@ Copy-Item ..\..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.1.1.1\lib
4149

4250
# Clone the project
4351
git clone https://github.com/DartVS/DartVS.git bin\DartVS
52+
Push-Location
4453
cd bin\DartVS
4554
git checkout 6f54d1d2bf6a16aaac5a6add7e073716e35e21ba
46-
cd ..\..
55+
Pop-Location
4756

4857
&$NuGet restore bin\DartVS\DanTup.DartVS.sln
4958

build/build.ps1

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ param (
33
[string]$VisualStudioVersion = '14.0',
44
[switch]$SkipKeyCheck,
55
[string]$Verbosity = 'minimal',
6-
[string]$Logger
6+
[string]$Logger,
7+
[switch]$Incremental
78
)
89

910
# build the solution
@@ -63,12 +64,23 @@ If ($Logger) {
6364
$LoggerArgument = "/logger:$Logger"
6465
}
6566

66-
&$msbuild '/nologo' '/m' '/nr:false' '/t:rebuild' $LoggerArgument "/verbosity:$Verbosity" "/p:Configuration=$BuildConfig" "/p:VisualStudioVersion=$VisualStudioVersion" "/p:KeyConfiguration=$KeyConfiguration" $SolutionPath
67+
If ($Incremental) {
68+
$Target = 'build'
69+
} Else {
70+
$Target = 'rebuild'
71+
}
72+
73+
&$msbuild '/nologo' '/m' '/nr:false' "/t:$Target" $LoggerArgument "/verbosity:$Verbosity" "/p:Configuration=$BuildConfig" "/p:VisualStudioVersion=$VisualStudioVersion" "/p:KeyConfiguration=$KeyConfiguration" $SolutionPath
6774
If (-not $?) {
6875
$host.ui.WriteErrorLine('Build failed, aborting!')
6976
exit $LASTEXITCODE
7077
}
7178

79+
if (-not $Incremental) {
80+
# Skip NuGet validation and copying packages to the output directory
81+
exit 0
82+
}
83+
7284
# By default, do not create a NuGet package unless the expected strong name key files were used
7385
if (-not $SkipKeyCheck) {
7486
. .\keys.ps1

0 commit comments

Comments
 (0)