-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test SqlServer test on Ubuntu in helix
- Loading branch information
Showing
2 changed files
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -191,12 +191,12 @@ stages: | |
value: $(_BuildConfig) | ||
- ${{ if eq(variables['System.TeamProject'], 'public') }}: | ||
- name: HelixTargetQueues | ||
value: Windows.10.Amd64.Open;Ubuntu.1804.Amd64.Open;OSX.1014.Amd64.Open | ||
value: Windows.10.Amd64.Open;Ubuntu.1804.Amd64.Open;OSX.1014.Amd64.Open;[email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-helix-sqlserver-amd64-20201109180804-3069967 | ||
- name: _HelixAccessToken | ||
value: '' # Needed for public queues | ||
- ${{ if ne(variables['System.TeamProject'], 'public') }}: | ||
- name: HelixTargetQueues | ||
value: Windows.10.Amd64;Ubuntu.1804.Amd64;OSX.1014.Amd64 | ||
value: Windows.10.Amd64;Ubuntu.1804.Amd64;OSX.1014.Amd64;[email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-helix-sqlserver-amd64-20201109180804-3069967 | ||
- name: _HelixAccessToken | ||
value: $(HelixApiAccessToken) # Needed for internal queues | ||
steps: | ||
|
@@ -221,6 +221,7 @@ stages: | |
env: | ||
HelixAccessToken: $(_HelixAccessToken) | ||
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops | ||
MSSQL_SA_PASSWORD: "Password12!" | ||
|
||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: | ||
- template: eng\common\templates\post-build\post-build.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,11 +14,12 @@ | |
<FailOnTestFailure>true</FailOnTestFailure> | ||
<EnableXUnitReporter>true</EnableXUnitReporter> | ||
<FailOnMissionControlTestFailure>true</FailOnMissionControlTestFailure> | ||
<SqlServerTests>$(RepoRoot)/test/EFCore.SqlServer.FunctionalTests/*.csproj;$(RepoRoot)/test/EFCore.CrossStore.FunctionalTests/*.csproj;$(RepoRoot)/test/EFCore.OData.FunctionalTests/*.csproj</SqlServerTests> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition = "'$(SYSTEM_ACCESSTOKEN)' == ''"> | ||
<!-- Local build outside of Azure Pipeline --> | ||
<HelixTargetQueues Condition = "'$(HelixTargetQueues)' == ''">Windows.10.Amd64.Open;Ubuntu.1804.Amd64.Open;OSX.1014.Amd64.Open</HelixTargetQueues> | ||
<HelixTargetQueues Condition = "'$(HelixTargetQueues)' == ''">Windows.10.Amd64.Open;Ubuntu.1804.Amd64.Open;OSX.1014.Amd64.Open;[email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-helix-sqlserver-amd64-20201109180804-3069967</HelixTargetQueues> | ||
<EnableAzurePipelinesReporter>false</EnableAzurePipelinesReporter> | ||
<FailOnMissionControlTestFailure>false</FailOnMissionControlTestFailure> | ||
<HelixSource>efcore/localbuild/</HelixSource> | ||
|
@@ -33,17 +34,24 @@ | |
|
||
<!-- Start LocalDb instance for test projects which uses SqlServer on windows --> | ||
<ItemGroup Condition = "'$(HelixTargetQueue.StartsWith(`Windows`))'"> | ||
<XUnitProject Update="$(RepoRoot)/test/EFCore.SqlServer.FunctionalTests/*.csproj"> | ||
<XUnitProject Update="$(SqlServerTests)"> | ||
<PreCommands>$(PreCommands); SqlLocalDB start</PreCommands> | ||
</XUnitProject> | ||
<XUnitProject Update="$(RepoRoot)/test/EFCore.CrossStore.FunctionalTests/*.csproj"> | ||
<PreCommands>$(PreCommands); SqlLocalDB start</PreCommands> | ||
</XUnitProject> | ||
<XUnitProject Update="$(RepoRoot)/test/EFCore.OData.FunctionalTests/*.csproj"> | ||
<PreCommands>$(PreCommands); SqlLocalDB start</PreCommands> | ||
</ItemGroup> | ||
|
||
<!-- Start SqlServer instance for test projects which uses SqlServer on docker. Also remove other projects as they will be run outside of docker. --> | ||
<ItemGroup Condition = "'$(HelixTargetQueue.Contains(`ubuntu-18.04-helix-sqlserver-amd64`))'"> | ||
<XUnitProject Remove="$(RepoRoot)/test/**/*.csproj"/> | ||
<XUnitProject Include="$(SqlServerTests)"> | ||
<PreCommands>$(PreCommands); export MSSQL_SA_PASSWORD=$(MSSQL_SA_PASSWORD); /opt/mssql/bin/sqlservr --accept_eula &; export Test__SqlServer__DefaultConnection="Data Source=localhost;;Database=master;;User=sa;;Password=$(MSSQL_SA_PASSWORD);;Connect Timeout=60;;ConnectRetryCount=0"; sleep 120</PreCommands> | ||
</XUnitProject> | ||
</ItemGroup> | ||
|
||
<!-- Remove test projects which requires SqlServer from Ubuntu/OSX. --> | ||
<ItemGroup Condition = "'$(HelixTargetQueue.StartsWith(`OSX`))' OR '$(HelixTargetQueue)' == 'Ubuntu.1804.Amd64.Open' OR '$(HelixTargetQueue)' == 'Ubuntu.1804.Amd64'"> | ||
<XUnitProject Remove="$(SqlServerTests)"/> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<XUnitPublishTargetFramework>net5.0</XUnitPublishTargetFramework> | ||
<XUnitRuntimeTargetFramework>netcoreapp2.0</XUnitRuntimeTargetFramework> | ||
|