Skip to content

Update h2 sync scripts #17720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions src/Shared/Http2/CopyToCoreFx.cmd

This file was deleted.

19 changes: 0 additions & 19 deletions src/Shared/Http2/CopyToCoreFx.sh

This file was deleted.

14 changes: 14 additions & 0 deletions src/Shared/Http2/CopyToRuntime.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@ECHO OFF
SETLOCAL

if not [%1] == [] (set remote_repo=%1) else (set remote_repo=%RUNTIME_REPO%)

IF [%remote_repo%] == [] (
echo The 'RUNTIME_REPO' environment variable or command line parameter is not set, aborting.
exit /b 1
)

echo RUNTIME_REPO: %remote_repo%

robocopy . %remote_repo%\src\libraries\Common\src\System\Net\Http\Http2 /MIR
robocopy .\..\test\Shared.Tests\Http2 %remote_repo%\src\libraries\Common\tests\Tests\System\Net\Http2 /MIR
19 changes: 19 additions & 0 deletions src/Shared/Http2/CopyToRuntime.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

if [[ -n "$1" ]]; then
remote_repo="$1"
else
remote_repo="$RUNTIME_REPO"
fi

if [[ -z "$remote_repo" ]]; then
echo The 'RUNTIME_REPO' environment variable or command line parameter is not set, aborting.
exit 1
fi

cd "$(dirname "$0")" || exit 1

echo "RUNTIME_REPO: $remote_repo"

rsync -av --delete ./ "$remote_repo"/src/libraries/Common/src/System/Net/Http/Http2
rsync -av --delete ./../test/Shared.Tests/Http2/ "$remote_repo"/src/libraries/Common/tests/Tests/System/Net/Http2
38 changes: 19 additions & 19 deletions src/Shared/Http2/ReadMe.SharedCode.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
The code in this directory is shared between CoreFx and AspNetCore. This contains HTTP/2 protocol infrastructure such as an HPACK implementation. Any changes to this dir need to be checked into both repositories.
The code in this directory is shared between dotnet/runtime and aspnet/AspNetCore. This contains HTTP/2 protocol infrastructure such as an HPACK implementation. Any changes to this dir need to be checked into both repositories.

Corefx code paths:
- corefx\src\Common\src\System\Net\Http\Http2
- corefx\src\Common\tests\Tests\System\Net\Http2
AspNetCore code paths:
dotnet/runtime code paths:
- runtime\src\libraries\Common\src\System\Net\Http\Http2
- runtime\src\libraries\Common\tests\Tests\System\Net\Http2
aspnet/AspNetCore code paths:
- AspNetCore\src\Shared\Http2
- AspNetCore\src\Shared\test\Shared.Tests\Http2

## Copying code
To copy code from CoreFx to AspNetCore set ASPNETCORE_REPO to the AspNetCore repo root and then run CopyToAspNetCore.cmd.
To copy code from AspNetCore to CoreFx set COREFX_REPO to the CoreFx repo root and then run CopyToCoreFx.cmd.
To copy code from dotnet/runtime to aspnet/AspNetCore, set ASPNETCORE_REPO to the AspNetCore repo root and then run CopyToAspNetCore.cmd.
To copy code from aspnet/AspNetCore to dotnet/runtime, set RUNTIME_REPO to the runtime repo root and then run CopyToRuntime.cmd.

## Building CoreFx code:
- https://github.com/dotnet/corefx/blob/master/Documentation/building/windows-instructions.md
- https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md
- Run build.cmd from the root once: `PS D:\github\corefx> .\build.cmd`
## Building dotnet/runtime code:
- https://github.com/dotnet/runtime/blob/master/docs/libraries/building/windows-instructions.md
- https://github.com/dotnet/runtime/blob/master/docs/libraries/project-docs/developer-guide.md
- Run libraries.cmd from the root once: `PS D:\github\runtime> .\libraries.cmd`
- Build the individual projects:
- `PS D:\github\corefx\src\Common\tests> dotnet msbuild /t:rebuild`
- `PS D:\github\corefx\src\System.Net.Http\src> dotnet msbuild /t:rebuild`
- `PS D:\github\dotnet\src\libraries\Common\tests> dotnet msbuild /t:rebuild`
- `PS D:\github\dotnet\src\libraries\System.Net.Http\src> dotnet msbuild /t:rebuild`

### Running CoreFx tests:
- `PS D:\github\corefx\src\Common\tests> dotnet msbuild /t:rebuildandtest`
- `PS D:\github\corefx\src\System.Net.Http\tests\UnitTests> dotnet msbuild /t:rebuildandtest`
### Running dotnet/runtime tests:
- `PS D:\github\runtime\src\libraries\Common\tests> dotnet msbuild /t:rebuildandtest`
- `PS D:\github\runtime\src\libraries\System.Net.Http\tests\UnitTests> dotnet msbuild /t:rebuildandtest`

## Building AspNetCore code:
## Building aspnet/AspNetCore code:
- https://github.com/aspnet/AspNetCore/blob/master/docs/BuildFromSource.md
- Run restore in the root once: `PS D:\github\AspNetCore> .\restore.cmd`
- Activate to use the repo local runtime: `PS D:\github\AspNetCore> . .\activate.ps1`
- Build the individual projects:
- `(AspNetCore) PS D:\github\AspNetCore\src\Shared\test\Shared.Tests> dotnet msbuild`
- `(AspNetCore) PS D:\github\AspNetCore\src\servers\Kestrel\core\src> dotnet msbuild`

### Running AspNetCore tests:
### Running aspnet/AspNetCore tests:
- `(AspNetCore) PS D:\github\AspNetCore\src\Shared\test\Shared.Tests> dotnet test`
- `(AspNetCore) PS D:\github\AspNetCore\src\servers\Kestrel\core\test> dotnet test`
- `(AspNetCore) PS D:\github\AspNetCore\src\servers\Kestrel\core\test> dotnet test`