Skip to content

Commit

Permalink
Fix test build of test project that referenced corefx shared corelib …
Browse files Browse the repository at this point in the history
…directly and cleanup common path usages (dotnet#47)

* Fix test build break and update common path usages to use property

* Use normalize directory for CommonPath and CommonTestPath

* Update instances of CommonPath and CommonTestPath to not use trailing \
  • Loading branch information
safern authored and ViktorHofer committed Nov 14, 2019
1 parent 0d566c2 commit d8adaee
Show file tree
Hide file tree
Showing 241 changed files with 3,266 additions and 3,265 deletions.
70 changes: 35 additions & 35 deletions src/libraries/Common/tests/Common.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,103 +6,103 @@
<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs">
<Compile Include="$(CommonTestPath)System\Collections\DictionaryExtensions.cs">
<Link>Common\System\Collections\DictionaryExtensions.cs</Link>
</Compile>
<Compile Include="$(CommonTestPath)\System\Security\Cryptography\ByteUtils.cs">
<Compile Include="$(CommonTestPath)System\Security\Cryptography\ByteUtils.cs">
<Link>Common\System\Security\Cryptography\ByteUtils.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Linux\cgroups\Interop.cgroups.cs">
<Compile Include="$(CommonPath)Interop\Linux\cgroups\Interop.cgroups.cs">
<Link>Common\Interop\Linux\cgroups\Interop.cgroups.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Linux\procfs\Interop.ProcFsStat.cs">
<Compile Include="$(CommonPath)Interop\Linux\procfs\Interop.ProcFsStat.cs">
<Link>Common\Interop\Linux\procfs\Interop.ProcFsStat.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\CharArrayHelpers.cs">
<Compile Include="$(CommonPath)System\CharArrayHelpers.cs">
<Link>Common\System\CharArrayHelpers.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Marvin.cs">
<Compile Include="$(CommonPath)System\Marvin.cs">
<Link>Common\System\Marvin.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\StringExtensions.cs">
<Compile Include="$(CommonPath)System\StringExtensions.cs">
<Link>Common\System\StringExtensions.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Collections\Generic\ArrayBuilder.cs">
<Compile Include="$(CommonPath)System\Collections\Generic\ArrayBuilder.cs">
<Link>Common\System\Collections\Generic\ArrayBuilder.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Collections\Generic\LargeArrayBuilder.cs">
<Compile Include="$(CommonPath)System\Collections\Generic\LargeArrayBuilder.cs">
<Link>Common\System\Collections\Generic\LargeArrayBuilder.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Collections\Generic\LargeArrayBuilder.SpeedOpt.cs">
<Compile Include="$(CommonPath)System\Collections\Generic\LargeArrayBuilder.SpeedOpt.cs">
<Link>Common\System\Collections\Generic\LargeArrayBuilder.SpeedOpt.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\IO\PathInternal.CaseSensitivity.cs">
<Compile Include="$(CommonPath)System\IO\PathInternal.CaseSensitivity.cs">
<Link>Common\System\IO\PathInternal.CaseSensitivity.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\IO\RowConfigReader.cs">
<Compile Include="$(CommonPath)System\IO\RowConfigReader.cs">
<Link>Common\System\IO\RowConfigReader.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\IO\StringParser.cs">
<Compile Include="$(CommonPath)System\IO\StringParser.cs">
<Link>Common\System\IO\StringParser.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\HttpDateParser.cs">
<Compile Include="$(CommonPath)System\Net\HttpDateParser.cs">
<Link>Common\System\Net\HttpDateParser.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\HttpKnownHeaderNames.cs">
<Compile Include="$(CommonPath)System\Net\HttpKnownHeaderNames.cs">
<Link>Common\System\Net\HttpKnownHeaderNames.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\HttpKnownHeaderNames.TryGetHeaderName.cs">
<Compile Include="$(CommonPath)System\Net\HttpKnownHeaderNames.TryGetHeaderName.cs">
<Link>Common\System\Net\HttpKnownHeaderNames.TryGetHeaderName.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Http\Http2\IHttpHeadersHandler.cs">
<Compile Include="$(CommonPath)System\Net\Http\Http2\IHttpHeadersHandler.cs">
<Link>Common\System\Net\Http\Http2\IHttpHeadersHandler.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Http\Http2\Hpack\DynamicTable.cs">
<Compile Include="$(CommonPath)System\Net\Http\Http2\Hpack\DynamicTable.cs">
<Link>Common\System\Net\Http\Http2\Hpack\DynamicTable.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Http\Http2\Hpack\HeaderField.cs">
<Compile Include="$(CommonPath)System\Net\Http\Http2\Hpack\HeaderField.cs">
<Link>Common\System\Net\Http\Http2\Hpack\HeaderField.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Http\Http2\Hpack\HPackDecoder.cs">
<Compile Include="$(CommonPath)System\Net\Http\Http2\Hpack\HPackDecoder.cs">
<Link>Common\System\Net\Http\Http2\Hpack\HPackDecoder.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Http\Http2\Hpack\HPackDecodingException.cs">
<Compile Include="$(CommonPath)System\Net\Http\Http2\Hpack\HPackDecodingException.cs">
<Link>Common\System\Net\Http\Http2\Hpack\HPackDecodingException.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Http\Http2\Hpack\HPackEncoder.cs">
<Compile Include="$(CommonPath)System\Net\Http\Http2\Hpack\HPackEncoder.cs">
<Link>Common\System\Net\Http\Http2\Hpack\HPackEncoder.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Http\Http2\Hpack\HPackEncodingException.cs">
<Compile Include="$(CommonPath)System\Net\Http\Http2\Hpack\HPackEncodingException.cs">
<Link>Common\System\Net\Http\Http2\Hpack\HPackEncodingException.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Http\Http2\Hpack\Huffman.cs">
<Compile Include="$(CommonPath)System\Net\Http\Http2\Hpack\Huffman.cs">
<Link>Common\System\Net\Http\Http2\Hpack\Huffman.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Http\Http2\Hpack\HuffmanDecodingException.cs">
<Compile Include="$(CommonPath)System\Net\Http\Http2\Hpack\HuffmanDecodingException.cs">
<Link>Common\System\Net\Http\Http2\Hpack\HuffmanDecodingException.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Http\Http2\Hpack\IntegerDecoder.cs">
<Compile Include="$(CommonPath)System\Net\Http\Http2\Hpack\IntegerDecoder.cs">
<Link>Common\System\Net\Http\Http2\Hpack\IntegerDecoder.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Http\Http2\Hpack\IntegerEncoder.cs">
<Compile Include="$(CommonPath)System\Net\Http\Http2\Hpack\IntegerEncoder.cs">
<Link>Common\System\Net\Http\Http2\Hpack\IntegerEncoder.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Http\Http2\Hpack\StaticTable.cs">
<Compile Include="$(CommonPath)System\Net\Http\Http2\Hpack\StaticTable.cs">
<Link>Common\System\Net\Http\Http2\Hpack\StaticTable.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Http\Http2\Hpack\StatusCodes.cs">
<Compile Include="$(CommonPath)System\Net\Http\Http2\Hpack\StatusCodes.cs">
<Link>Common\System\Net\Http\Http2\Hpack\StatusCodes.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Text\ReusableTextReader.cs">
<Compile Include="$(CommonPath)System\Text\ReusableTextReader.cs">
<Link>Common\System\Text\ReusableTextReader.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Text\SimpleRegex.cs">
<Compile Include="$(CommonPath)System\Text\SimpleRegex.cs">
<Link>Common\System\Text\SimpleRegex.cs</Link>
</Compile>
<Compile Include="$(CoreLibSharedDir)System\Text\ValueStringBuilder.cs">
<Link>System\Text\ValueStringBuilder.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Security\IdentityHelper.cs">
<Compile Include="$(CommonPath)System\Security\IdentityHelper.cs">
<Link>Common\System\Security\IdentityHelper.cs</Link>
</Compile>
<Compile Include="$(CoreLibSharedDir)System\PasteArguments.cs">
Expand Down Expand Up @@ -150,14 +150,14 @@
<Compile Include="$(CoreLibSharedDir)System\IO\PathInternal.Windows.cs">
<Link>System\IO\PathInternal.Windows.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Interop.Libraries.cs">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs">
<Link>Common\Interop\Windows\Interop.Libraries.cs</Link>
</Compile>
<Compile Include="Tests\System\IO\PathInternal.Windows.Tests.cs" />
<Compile Include="$(CoreLibSharedDir)Interop\Windows\Kernel32\Interop.FormatMessage.cs">
<Link>Common\Interop\Windows\kernel32\Interop.FormatMessage.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Interop.Errors.cs">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Errors.cs">
<Link>Common\Interop\Windows\Interop.Errors.cs</Link>
</Compile>
<Compile Include="$(CoreLibSharedDir)System\IO\Win32Marshal.cs">
Expand All @@ -176,7 +176,7 @@
<Compile Include="$(CoreLibSharedDir)Interop\Unix\System.Native\Interop.PathConf.cs">
<Link>Common\Interop\Unix\Interop.PathConf.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\Interop.Libraries.cs">
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs">
<Link>Common\Interop\Unix\Interop.Libraries.cs</Link>
</Compile>
<Compile Include="$(CoreLibSharedDir)System\PasteArguments.Unix.cs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,28 @@
<Compile Include="$(CoreLibSharedDir)Interop\Windows\Kernel32\Interop.GetCurrentProcess_IntPtr.cs">
<Link>Common\Interop\Windows\Kernel32\Interop.GetCurrentProcess_IntPtr.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\NtDll\Interop.RTL_OSVERSIONINFOEX.cs">
<Compile Include="$(CommonPath)Interop\Windows\NtDll\Interop.RTL_OSVERSIONINFOEX.cs">
<Link>Common\Interop\Windows\NtDll\Interop.RTL_OSVERSIONINFOEX.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\NtDll\Interop.RtlGetVersion.cs">
<Compile Include="$(CommonPath)Interop\Windows\NtDll\Interop.RtlGetVersion.cs">
<Link>Common\Interop\Windows\NtDll\Interop.RtlGetVersion.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Advapi32\Interop.OpenProcessToken_SafeAccessTokenHandle.cs">
<Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.OpenProcessToken_SafeAccessTokenHandle.cs">
<Link>Common\Interop\Windows\Advapi32\Interop.OpenProcessToken_SafeAccessTokenHandle.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Interop.Libraries.cs">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs">
<Link>Common\Interop\Windows\Interop.Libraries.cs</Link>
</Compile>
<Compile Include="$(CoreLibSharedDir)Interop\Windows\Kernel32\Interop.CloseHandle.cs">
<Link>Interop\Windows\Kernel32\Interop.CloseHandle.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Advapi32\Interop.TOKEN_INFORMATION_CLASS.cs">
<Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.TOKEN_INFORMATION_CLASS.cs">
<Link>Common\Interop\Windows\Advapi32\Interop.TOKEN_INFORMATION_CLASS.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Advapi32\Interop.GetTokenInformation_void.cs">
<Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.GetTokenInformation_void.cs">
<Link>Common\Interop\Windows\Advapi32\Interop.GetTokenInformation_void.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Advapi32\Interop.TOKEN_ELEVATION.cs">
<Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.TOKEN_ELEVATION.cs">
<Link>Common\Interop\Windows\Advapi32\Interop.TOKEN_ELEVATION.cs</Link>
</Compile>
<Compile Include="$(CoreLibSharedDir)Interop\Windows\Interop.BOOL.cs">
Expand All @@ -65,7 +65,7 @@
</ItemGroup>
<!-- Unix imports -->
<ItemGroup>
<Compile Include="$(CommonPath)\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSslVersion.cs">
<Compile Include="$(CommonPath)Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSslVersion.cs">
<Link>Common\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSslVersion.cs</Link>
</Compile>
<Compile Include="$(CoreLibSharedDir)Interop\Unix\System.Native\Interop.GetEUid.cs">
Expand Down
5 changes: 3 additions & 2 deletions src/libraries/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,9 @@

<!-- Set up some common paths -->
<PropertyGroup>
<CommonPath>$(LibrariesProjectRoot)Common\src</CommonPath>
<CommonTestPath>$(LibrariesProjectRoot)Common\tests</CommonTestPath>
<CommonPathRoot>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'Common'))</CommonPathRoot>
<CommonPath>$([MSBuild]::NormalizeDirectory('$(CommonPathRoot)', 'src'))</CommonPath>
<CommonTestPath>$([MSBuild]::NormalizeDirectory('$(CommonPathRoot)', 'tests'))</CommonTestPath>
</PropertyGroup>

<!-- Set up the default output and intermediate paths -->
Expand Down
Loading

0 comments on commit d8adaee

Please sign in to comment.