Skip to content

Fix test output during CI. #652

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
Aug 6, 2018
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
3 changes: 1 addition & 2 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
BuildNative;
$(TraversalBuildDependsOn);
DownloadExternalTestFiles;
RunTests;
</TraversalBuildDependsOn>
</PropertyGroup>

Expand Down Expand Up @@ -79,7 +78,7 @@
TreatErrorsAsWarnings="true"/>
</Target>

<Target Name="RunTests" Condition="'$(RunTests)'=='true'">
<Target Name="RunTests">
<MSBuild Projects="test\run-tests.proj"
Targets="RunTests" />
</Target>
Expand Down
4 changes: 3 additions & 1 deletion build/ci/phase-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ phases:
_configuration: Release
${{ insert }}: ${{ parameters.queue }}
steps:
- script: $(_buildScript) -$(_configuration)
displayName: Build
- script: $(_buildScript) -$(_configuration) -runtests
displayName: Build and Test
displayName: Run Tests
- task: PublishTestResults@2
displayName: Publish Test Results
condition: succeededOrFailed()
Expand Down
8 changes: 4 additions & 4 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
"defaultValue": ""
},
"RunTests": {
"description": "Run tests after building.",
"valueType": "property",
"description": "MsBuild target that run the tests. Call this after building.",
"valueType": "target",
"values": [],
"defaultValue": ""
},
Expand Down Expand Up @@ -113,9 +113,9 @@
}
},
"runtests": {
"description": "Runs the tests after building.",
"description": "Runs the tests. Call this after building.",
"settings": {
"RunTests": "true"
"RunTests": "default"
}
},
"verbose": {
Expand Down
4 changes: 2 additions & 2 deletions docs/building/windows-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ You can use the Developer Command Prompt, Powershell or work in any regular cmd.
From a (non-admin) Command Prompt window:

- `build.cmd` - builds the assemblies
- `build.cmd -runTests` - builds the assemblies and runs tests
- `build.cmd -runTests` - called after a normal "build.cmd" will run all tests
- `build.cmd -buildPackages` called after a normal “build.cmd” will create the NuGet packages with the assemblies in “bin"

**Note**: Before working on individual projects or test projects you **must** run `build.cmd` from the root once before beginning that work. It is also a good idea to run `build.cmd` whenever you pull a large set of unknown changes into your branch.

### Running tests from the command line

From the root, use `build.cmd -runTests`.
From the root, run `build.cmd` and then `build.cmd -runTests`.
For more details, or to test an individual project, you can navigate to the test project directory and then use `dotnet test`

### Running tests from Visual Studio
Expand Down
3 changes: 2 additions & 1 deletion docs/project-docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ build.cmd -Release -TargetArchitecture:x64

- Building the src and then building and running the tests
```
build.cmd -RunTests
build.cmd
build.cmd -runTests
```

### Building individual projects
Expand Down
1 change: 1 addition & 0 deletions netci.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def branch = GithubBranchName

def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) {
steps {
shell("./build.sh -$config")
shell("./build.sh -$config -runtests")
shell("./build.sh -buildPackages")
}
Expand Down