Skip to content
代码片段 群组 项目
未验证 提交 0058a583 编辑于 作者: John Luo's avatar John Luo 提交者: GitHub
浏览文件

Fix Template test runs on macOS and Linux (#11407)

上级 689b0525
No related branches found
No related tags found
无相关合并请求
...@@ -431,6 +431,10 @@ jobs: ...@@ -431,6 +431,10 @@ jobs:
- bash: "./eng/scripts/install-nginx-mac.sh" - bash: "./eng/scripts/install-nginx-mac.sh"
displayName: Installing Nginx displayName: Installing Nginx
afterBuild: afterBuild:
- bash: ./build.sh --ci --pack --no-build --no-restore --no-build-deps "/bl:artifacts/log/packages.pack.binlog"
displayName: Pack Packages (for Template tests)
- bash: ./src/ProjectTemplates/build.sh --ci --pack --no-restore --no-build-deps "/bl:artifacts/log/template.pack.binlog"
displayName: Pack Templates (for Template tests)
- bash: ./build.sh --no-build --ci --test -p:RunFlakyTests=true - bash: ./build.sh --no-build --ci --test -p:RunFlakyTests=true
displayName: Run Flaky Tests displayName: Run Flaky Tests
continueOnError: true continueOnError: true
...@@ -456,6 +460,10 @@ jobs: ...@@ -456,6 +460,10 @@ jobs:
- bash: "echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p" - bash: "echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p"
displayName: Increase inotify limit displayName: Increase inotify limit
afterBuild: afterBuild:
- bash: ./build.sh --ci --pack --no-build --no-restore --no-build-deps "/bl:artifacts/log/packages.pack.binlog"
displayName: Pack Packages (for Template tests)
- bash: ./src/ProjectTemplates/build.sh --ci --pack --no-restore --no-build-deps "/bl:artifacts/log/template.pack.binlog"
displayName: Pack Templates (for Template tests)
- bash: ./build.sh --no-build --ci --test -p:RunFlakyTests=true - bash: ./build.sh --no-build --ci --test -p:RunFlakyTests=true
displayName: Run Flaky Tests displayName: Run Flaky Tests
continueOnError: true continueOnError: true
......
...@@ -15,8 +15,9 @@ Some projects in this repository (like SignalR Java Client) require JDK installa ...@@ -15,8 +15,9 @@ Some projects in this repository (like SignalR Java Client) require JDK installa
1. Run `git submodule update --init --recursive` if you haven't already. 1. Run `git submodule update --init --recursive` if you haven't already.
1. Run `git submodule update` to update submodules. 1. Run `git submodule update` to update submodules.
1. Run `build.cmd -all -pack` in the repository root to build all of the dependencies. 1. Run `build.cmd -all -pack` in the repository root to build all of the dependencies.
1. Run `build.cmd` in this directory will produce NuGet packages for each class of template in the artifacts directory. 1. Run `build.cmd -pack -NoRestore -NoBuilddeps` in this directory will produce NuGet packages for each class of template in the artifacts directory.
1. Because the templates build against the version of `Microsoft.AspNetCore.App` that was built during the previous step, it is NOT advised that you install templates created on your local machine via `dotnet new -i [nupkgPath]`. Instead, use the `Run-[Template]-Locally.ps1` scripts in the script folder. These scripts do `dotnet new -i` with your packages, but also apply a series of fixes and tweaks to the created template which keep the fact that you don't have a production `Microsoft.AspNetCore.App` from interfering. 1. Because the templates build against the version of `Microsoft.AspNetCore.App` that was built during the previous step, it is NOT advised that you install templates created on your local machine via `dotnet new -i [nupkgPath]`. Instead, use the `Run-[Template]-Locally.ps1` scripts in the script folder. These scripts do `dotnet new -i` with your packages, but also apply a series of fixes and tweaks to the created template which keep the fact that you don't have a production `Microsoft.AspNetCore.App` from interfering.
1. The ASP.NET localhost development certificate must also be installed and trusted or else you'll get a test error "Certificate error: Navigation blocked". 1. The ASP.NET localhost development certificate must also be installed and trusted or else you'll get a test error "Certificate error: Navigation blocked".
1. Run `build.cmd -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true"` to run template tests.
** Note** Templating tests require Visual Studio unless a full build (CI) is performed. ** Note** Templating tests require Visual Studio unless a full build (CI) is performed.
#!/usr/bin/env bash
set -euo pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
repo_root="$DIR/../.."
"$repo_root/build.sh" --projects "$DIR/**/*.*proj" "$@"
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册