diff --git a/CI/build.cmd b/CI/build.cmd index 236d080d06..a8975205d5 100644 --- a/CI/build.cmd +++ b/CI/build.cmd @@ -11,6 +11,17 @@ :: Extract version from HEAD call SetVersion.bat +:: Build the main solution and run tests +msbuild FlashDevelop.sln /p:Configuration=Debug+Tests /p:Platform="x64" /t:Rebuild %MSBuildLogger% + +:: Check for build errors +if %errorlevel% neq 0 goto :error + +if "%AppVeyorCI%" neq "" powershell.exe -file ci\tests.ps1 + +:: Check for build errors +if %errorlevel% neq 0 goto :error + :: Build the main solution and run tests msbuild FlashDevelop.sln /p:Configuration=Release+Tests /p:Platform="x86" /t:Rebuild %MSBuildLogger% diff --git a/CI/tests.ps1 b/CI/tests.ps1 index e86ad832ec..047c27f0db 100644 --- a/CI/tests.ps1 +++ b/CI/tests.ps1 @@ -16,6 +16,11 @@ If ($env:HAXEPATH -eq $null) { cinst.exe haxe --version 4.1.4 -y --no-progress $env:HAXEPATH = [System.IO.Directory]::GetDirectories("C:\ProgramData\chocolatey\lib\haxe", "haxe_*")[0]; + If ($env:HAXEPATH -eq $null) + { + Write-Output "HAXEPATH is invalid" + exit 1 + } } If ((Get-Command "nunit3-console.exe" -ErrorAction SilentlyContinue) -ne $null) @@ -30,8 +35,8 @@ If ((Get-Command "nunit3-console.exe" -ErrorAction SilentlyContinue) -ne $null) cd $path #nunit3-console.exe $testFiles --result=myresults.xml;format=AppVeyor - nunit3-console.exe $testFiles --x86 - #nunit3-console.exe $testFiles + #nunit3-console.exe $testFiles --x86 + nunit3-console.exe $testFiles #It turns out it's not needed to upload the file #if ((Test-Path env:\APPVEYOR_JOB_ID) -And (Test-Path TestResult.xml)) diff --git a/FlashDevelop.sln b/FlashDevelop.sln index 514be00bd6..28e1d369d6 100644 --- a/FlashDevelop.sln +++ b/FlashDevelop.sln @@ -922,8 +922,8 @@ Global {F44D3125-12E8-4143-B250-84C5D89D253C}.Debug+Tests|Any CPU.Build.0 = Debug|Any CPU {F44D3125-12E8-4143-B250-84C5D89D253C}.Debug+Tests|x64.ActiveCfg = Debug|x64 {F44D3125-12E8-4143-B250-84C5D89D253C}.Debug+Tests|x64.Build.0 = Debug|x64 - {F44D3125-12E8-4143-B250-84C5D89D253C}.Debug+Tests|x86.ActiveCfg = Debug|Any CPU - {F44D3125-12E8-4143-B250-84C5D89D253C}.Debug+Tests|x86.Build.0 = Debug|Any CPU + {F44D3125-12E8-4143-B250-84C5D89D253C}.Debug+Tests|x86.ActiveCfg = Debug|x86 + {F44D3125-12E8-4143-B250-84C5D89D253C}.Debug+Tests|x86.Build.0 = Debug|x86 {F44D3125-12E8-4143-B250-84C5D89D253C}.Release|Any CPU.ActiveCfg = Release|Any CPU {F44D3125-12E8-4143-B250-84C5D89D253C}.Release|x64.ActiveCfg = Release|Any CPU {F44D3125-12E8-4143-B250-84C5D89D253C}.Release|x86.ActiveCfg = Release|Any CPU @@ -931,8 +931,8 @@ Global {F44D3125-12E8-4143-B250-84C5D89D253C}.Release+Tests|Any CPU.Build.0 = Release|Any CPU {F44D3125-12E8-4143-B250-84C5D89D253C}.Release+Tests|x64.ActiveCfg = Release|x64 {F44D3125-12E8-4143-B250-84C5D89D253C}.Release+Tests|x64.Build.0 = Release|x64 - {F44D3125-12E8-4143-B250-84C5D89D253C}.Release+Tests|x86.ActiveCfg = Release|Any CPU - {F44D3125-12E8-4143-B250-84C5D89D253C}.Release+Tests|x86.Build.0 = Release|Any CPU + {F44D3125-12E8-4143-B250-84C5D89D253C}.Release+Tests|x86.ActiveCfg = Release|x86 + {F44D3125-12E8-4143-B250-84C5D89D253C}.Release+Tests|x86.Build.0 = Release|x86 {8B5A1C53-AF20-4379-A8D1-31822ACC6AD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B5A1C53-AF20-4379-A8D1-31822ACC6AD8}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B5A1C53-AF20-4379-A8D1-31822ACC6AD8}.Debug|x64.ActiveCfg = Debug|Any CPU diff --git a/Tests/External/Plugins/ASCompletion.Tests/Completion/ASGeneratorTests.cs b/Tests/External/Plugins/ASCompletion.Tests/Completion/ASGeneratorTests.cs index 3a45c5d1cc..763d13a351 100644 --- a/Tests/External/Plugins/ASCompletion.Tests/Completion/ASGeneratorTests.cs +++ b/Tests/External/Plugins/ASCompletion.Tests/Completion/ASGeneratorTests.cs @@ -1325,11 +1325,12 @@ static IEnumerable ParseFunctionParametersTestCases public List ParseFunctionParameters(string fileName) { SetSrc(sci, ReadAllText(fileName)); + var ctx = ASContext.GetLanguageContext(sci.ConfigurationLanguage); var list = new MemberList(); - list.Merge(ASContext.GetLanguageContext(sci.ConfigurationLanguage).GetVisibleExternalElements()); - list.Merge(ASContext.Context.CurrentModel.Imports); + list.Merge(ctx.GetVisibleExternalElements()); + list.Merge(ctx.CurrentModel.Imports); ASContext.Context.GetVisibleExternalElements().Returns(list); - var result = ASGenerator.ParseFunctionParameters(sci, sci.CurrentPos) .Select(it => it.result.Type ?? it.result.Member).ToList(); + var result = ASGenerator.ParseFunctionParameters(sci, sci.CurrentPos).Select(it => it.result.Type ?? it.result.Member).ToList(); return result; } diff --git a/Tests/PluginCore/PluginCore.Tests/PluginCore.Tests.csproj b/Tests/PluginCore/PluginCore.Tests/PluginCore.Tests.csproj index 4cf6e47de0..cf1e710ad9 100644 --- a/Tests/PluginCore/PluginCore.Tests/PluginCore.Tests.csproj +++ b/Tests/PluginCore/PluginCore.Tests/PluginCore.Tests.csproj @@ -32,6 +32,24 @@ 4 9 + + true + ..\..\..\FlashDevelop\Bin\Debug\ + DEBUG;TRACE + full + x86 + 9 + prompt + + + ..\..\..\FlashDevelop\Bin\Debug\ + TRACE + true + pdbonly + x86 + 9 + prompt + true ..\..\..\FlashDevelop\Bin\Debug\