Fix tests on linux-musl-x64
This commit is contained in:
parent
d3ceb777ef
commit
10dff2410f
|
|
@ -530,19 +530,34 @@
|
||||||
|
|
||||||
<Target Name="BuildSharedFx" DependsOnTargets="GeneratePropsFiles;ResolveSharedFxFiles;CrossGenAssemblies;CrossGenSymbols;PackSharedFx;TestSharedFx"/>
|
<Target Name="BuildSharedFx" DependsOnTargets="GeneratePropsFiles;ResolveSharedFxFiles;CrossGenAssemblies;CrossGenSymbols;PackSharedFx;TestSharedFx"/>
|
||||||
|
|
||||||
<Target Name="TestSharedFx" DependsOnTargets="DefineSharedFxPrerequisites;ResolveCommitHash">
|
<PropertyGroup>
|
||||||
|
<UnitTestFxProject>$(RepositoryRoot)\test\SharedFx.UnitTests\SharedFx.UnitTests.csproj</UnitTestFxProject>
|
||||||
|
<UnitTestFxTrxLogFile>$(LogOutputDir)SharedFx-UnitTests.trx</UnitTestFxTrxLogFile>
|
||||||
|
<UnitTestFxTrxPhysicalFilePath>$(UnitTestFxTrxLogFile)</UnitTestFxTrxPhysicalFilePath>
|
||||||
|
<UnitTestFxTrxPhysicalFilePath Condition="'$(HostMachineRepositoryRoot)' != ''">$(HostMachineRepositoryRoot)/artifacts/logs/SharedFx-UnitTests.trx</UnitTestFxTrxPhysicalFilePath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Target Name="TestSharedFx" DependsOnTargets="DefineSharedFxPrerequisites;ResolveCommitHash;InstallDotNet">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<UnitTestFxProject>$(RepositoryRoot)\test\SharedFx.UnitTests\SharedFx.UnitTests.csproj</UnitTestFxProject>
|
|
||||||
<UnitTestFxTestProps>
|
<UnitTestFxTestProps>
|
||||||
DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath);
|
DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath);
|
||||||
DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath);
|
DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath);
|
||||||
SharedFxOutputPath=$(SharedFxIntermediateOutputPath);
|
SharedFxOutputPath=$(SharedFxIntermediateOutputPath);
|
||||||
RepositoryCommit=$(RepositoryCommit);
|
RepositoryCommit=$(RepositoryCommit);
|
||||||
|
VSTestLogger=$([MSBuild]::Escape('trx;LogFileName=$(UnitTestFxTrxLogFile)'));
|
||||||
SharedFxRuntimeIdentifier=$(SharedFXRid)
|
SharedFxRuntimeIdentifier=$(SharedFXRid)
|
||||||
</UnitTestFxTestProps>
|
</UnitTestFxTestProps>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<MSBuild Projects="$(UnitTestFxProject)" Targets="Restore" Properties="_Dummy=restore;$(UnitTestFxTestProps)" />
|
<MSBuild Projects="$(UnitTestFxProject)" Targets="Restore" Properties="_Dummy=restore;$(UnitTestFxTestProps)" />
|
||||||
<MSBuild Projects="$(UnitTestFxProject)" Targets="VSTest" Properties="$(UnitTestFxTestProps)" />
|
<MSBuild Projects="$(UnitTestFxProject)" Targets="VSTest" Properties="$(UnitTestFxTestProps)" />
|
||||||
|
<CallTarget Targets="ReportTestSharedFxTrx" />
|
||||||
|
<OnError ExecuteTargets="ReportTestSharedFxTrx" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="ReportTestSharedFxTrx">
|
||||||
|
<Message Text="##teamcity[importData type='vstest' path='$(UnitTestFxTrxPhysicalFilePath)']"
|
||||||
|
Importance="high"
|
||||||
|
Condition=" '$(TEAMCITY_VERSION)' != '' AND Exists('$(UnitTestFxTrxLogFile)') "/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -115,4 +115,5 @@ docker run \
|
||||||
${docker_args[@]+"${docker_args[@]}"} \
|
${docker_args[@]+"${docker_args[@]}"} \
|
||||||
$tagname \
|
$tagname \
|
||||||
./build.sh \
|
./build.sh \
|
||||||
${build_args[@]+"${build_args[@]}"}
|
${build_args[@]+"${build_args[@]}"} \
|
||||||
|
"-p:HostMachineRepositoryRoot=$DIR"
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
version:2.2.0-preview1-17082
|
version:2.2.0-preview1-17084
|
||||||
commithash:13b85a32c7aa9d62f6f3cc211c5c7c566d16b3dd
|
commithash:d7fb2f0a63fbc33e8fe2bdb8f4ef63c1aea6d6ce
|
||||||
|
|
|
||||||
8
run.ps1
8
run.ps1
|
|
@ -32,6 +32,9 @@ Re-installs KoreBuild
|
||||||
.PARAMETER ConfigFile
|
.PARAMETER ConfigFile
|
||||||
The path to the configuration file that stores values. Defaults to korebuild.json.
|
The path to the configuration file that stores values. Defaults to korebuild.json.
|
||||||
|
|
||||||
|
.PARAMETER CI
|
||||||
|
Sets up CI specific settings and variables.
|
||||||
|
|
||||||
.PARAMETER PackageVersionPropsUrl
|
.PARAMETER PackageVersionPropsUrl
|
||||||
(optional) the url of the package versions props path containing dependency versions.
|
(optional) the url of the package versions props path containing dependency versions.
|
||||||
|
|
||||||
|
|
@ -81,7 +84,8 @@ param(
|
||||||
[Alias('u')]
|
[Alias('u')]
|
||||||
[switch]$Update,
|
[switch]$Update,
|
||||||
[switch]$Reinstall,
|
[switch]$Reinstall,
|
||||||
[string]$ConfigFile,
|
[string]$ConfigFile = $null,
|
||||||
|
[switch]$CI,
|
||||||
[string]$PackageVersionPropsUrl = $null,
|
[string]$PackageVersionPropsUrl = $null,
|
||||||
[string]$AccessTokenSuffix = $null,
|
[string]$AccessTokenSuffix = $null,
|
||||||
[string]$RestoreSources = $null,
|
[string]$RestoreSources = $null,
|
||||||
|
|
@ -235,7 +239,7 @@ $korebuildPath = Get-KoreBuild
|
||||||
Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1')
|
Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1')
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile
|
Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile -CI:$CI
|
||||||
Invoke-KoreBuildCommand $Command @MSBuildArguments
|
Invoke-KoreBuildCommand $Command @MSBuildArguments
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
|
|
||||||
7
run.sh
7
run.sh
|
|
@ -18,6 +18,7 @@ reinstall=false
|
||||||
repo_path="$DIR"
|
repo_path="$DIR"
|
||||||
channel=''
|
channel=''
|
||||||
tools_source=''
|
tools_source=''
|
||||||
|
ci=false
|
||||||
package_version_props_url=''
|
package_version_props_url=''
|
||||||
asset_root_url=''
|
asset_root_url=''
|
||||||
access_token_suffix=''
|
access_token_suffix=''
|
||||||
|
|
@ -48,6 +49,7 @@ __usage() {
|
||||||
echo " --product-build-id <ID> The product build ID for correlation with orchestrated builds."
|
echo " --product-build-id <ID> The product build ID for correlation with orchestrated builds."
|
||||||
echo " -u|--update Update to the latest KoreBuild even if the lock file is present."
|
echo " -u|--update Update to the latest KoreBuild even if the lock file is present."
|
||||||
echo " --reinstall Reinstall KoreBuild."
|
echo " --reinstall Reinstall KoreBuild."
|
||||||
|
echo " --ci Apply CI specific settings and environment variables."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Description:"
|
echo "Description:"
|
||||||
echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be."
|
echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be."
|
||||||
|
|
@ -216,6 +218,9 @@ while [[ $# -gt 0 ]]; do
|
||||||
--reinstall|-Reinstall)
|
--reinstall|-Reinstall)
|
||||||
reinstall=true
|
reinstall=true
|
||||||
;;
|
;;
|
||||||
|
--ci|-[Cc][Ii])
|
||||||
|
ci=true
|
||||||
|
;;
|
||||||
--verbose|-Verbose)
|
--verbose|-Verbose)
|
||||||
verbose=true
|
verbose=true
|
||||||
;;
|
;;
|
||||||
|
|
@ -288,7 +293,7 @@ fi
|
||||||
[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools'
|
[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools'
|
||||||
|
|
||||||
get_korebuild
|
get_korebuild
|
||||||
set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file"
|
set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file" "$ci"
|
||||||
|
|
||||||
# This incantation avoids unbound variable issues if msbuild_args is empty
|
# This incantation avoids unbound variable issues if msbuild_args is empty
|
||||||
# https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u
|
# https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue