Skip to content

Commit

Permalink
Adds -tests option for build.cmd that will add the test build and run…
Browse files Browse the repository at this point in the history
…ning
  • Loading branch information
weshaggard committed Feb 16, 2017
1 parent 8b7f07d commit 0b5bdf9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 65 deletions.
52 changes: 0 additions & 52 deletions Documentation/building/build-tests-against-packages.md

This file was deleted.

5 changes: 5 additions & 0 deletions Documentation/project-docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ build-tests
build -debug -buildArch=x64
```

- Building the src and then building and running the tests
```
build -tests
```

- Building for different target frameworks
```
build -framework netcoreapp
Expand Down
2 changes: 1 addition & 1 deletion build-tests.cmd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@call %~dp0run.cmd build-managed -tests %*
@call %~dp0run.cmd build-managed -testsOnly %*
@exit /b %ERRORLEVEL%
2 changes: 1 addition & 1 deletion build-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ done
export CORECLR_SERVER_GC="$__ServerGC"

working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
$working_tree_root/run.sh build-managed -tests $__UnprocessedBuildArgs
$working_tree_root/run.sh build-managed -testsOnly $__UnprocessedBuildArgs
exit $?
1 change: 1 addition & 0 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<ItemGroup>
<Project Include="external\dir.proj" />
<Project Include="src\dirs.proj" />
<Project Include="src\tests.builds" Condition="'$(BuildTests)'=='true'" />
<!-- signing must happen before packaging -->
<Project Include="src\sign.builds" />
<Project Include="src\packages.builds" Condition="'$(BuildPackages)'=='true'" />
Expand Down
23 changes: 12 additions & 11 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@
"values": ["True", "False"],
"defaultValue": true
},
"RestoreDuringBuild": {
"description": "Enables/Disables the restoration of packages.",
"valueType": "property",
"values": ["True", "False"],
"defaultValue": true
},
"BuildPackages": {
"description": "Enables/Disables building packages.",
"valueType": "property",
Expand Down Expand Up @@ -262,9 +256,14 @@
"settings": { }
},
"tests": {
"description": "Builds the tests that are in the repository, doesn't restore packages.",
"description": "Builds src and then builds and runs the tests for the given configuration.",
"settings": {
"BuildTests": true
}
},
"testsOnly": {
"description": "Builds and runs the tests for the given configuration.",
"settings": {
"RestoreDuringBuild": "false",
"Project": "src/tests.builds",
"MsBuildLogging":"/flp:v=normal;LogFile=build-tests.log"
}
Expand Down Expand Up @@ -396,7 +395,11 @@
"settings": {
"StripSymbolsAdditionalArg": "stripSymbols"
}
}
},
"tests": {
"description": "No-op for build-native, included just to enable easy combination with build-managed",
"settings": { }
},
},
"defaultValues": {
"toolName": "terminal",
Expand Down Expand Up @@ -489,7 +492,6 @@
"p": {
"description": "Restores all NuGet packages for repository.",
"settings": {
"RestoreDuringBuild": true,
"Sync": "default"
}
},
Expand All @@ -502,7 +504,6 @@
"t": {
"description": "Deprecated, use sync /p instead.",
"settings": {
"RestoreDuringBuild": true,
"Sync": "default"
}
},
Expand Down

0 comments on commit 0b5bdf9

Please sign in to comment.