Skip to content

Commit 0b5bdf9

Browse files
committed
Adds -tests option for build.cmd that will add the test build and running
1 parent 8b7f07d commit 0b5bdf9

File tree

6 files changed

+20
-65
lines changed

6 files changed

+20
-65
lines changed

Documentation/building/build-tests-against-packages.md

-52
This file was deleted.

Documentation/project-docs/developer-guide.md

+5
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ build-tests
6464
build -debug -buildArch=x64
6565
```
6666

67+
- Building the src and then building and running the tests
68+
```
69+
build -tests
70+
```
71+
6772
- Building for different target frameworks
6873
```
6974
build -framework netcoreapp

build-tests.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
@call %~dp0run.cmd build-managed -tests %*
1+
@call %~dp0run.cmd build-managed -testsOnly %*
22
@exit /b %ERRORLEVEL%

build-tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ done
3131
export CORECLR_SERVER_GC="$__ServerGC"
3232

3333
working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
34-
$working_tree_root/run.sh build-managed -tests $__UnprocessedBuildArgs
34+
$working_tree_root/run.sh build-managed -testsOnly $__UnprocessedBuildArgs
3535
exit $?

build.proj

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<ItemGroup>
1717
<Project Include="external\dir.proj" />
1818
<Project Include="src\dirs.proj" />
19+
<Project Include="src\tests.builds" Condition="'$(BuildTests)'=='true'" />
1920
<!-- signing must happen before packaging -->
2021
<Project Include="src\sign.builds" />
2122
<Project Include="src\packages.builds" Condition="'$(BuildPackages)'=='true'" />

config.json

+12-11
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@
4848
"values": ["True", "False"],
4949
"defaultValue": true
5050
},
51-
"RestoreDuringBuild": {
52-
"description": "Enables/Disables the restoration of packages.",
53-
"valueType": "property",
54-
"values": ["True", "False"],
55-
"defaultValue": true
56-
},
5751
"BuildPackages": {
5852
"description": "Enables/Disables building packages.",
5953
"valueType": "property",
@@ -262,9 +256,14 @@
262256
"settings": { }
263257
},
264258
"tests": {
265-
"description": "Builds the tests that are in the repository, doesn't restore packages.",
259+
"description": "Builds src and then builds and runs the tests for the given configuration.",
260+
"settings": {
261+
"BuildTests": true
262+
}
263+
},
264+
"testsOnly": {
265+
"description": "Builds and runs the tests for the given configuration.",
266266
"settings": {
267-
"RestoreDuringBuild": "false",
268267
"Project": "src/tests.builds",
269268
"MsBuildLogging":"/flp:v=normal;LogFile=build-tests.log"
270269
}
@@ -396,7 +395,11 @@
396395
"settings": {
397396
"StripSymbolsAdditionalArg": "stripSymbols"
398397
}
399-
}
398+
},
399+
"tests": {
400+
"description": "No-op for build-native, included just to enable easy combination with build-managed",
401+
"settings": { }
402+
},
400403
},
401404
"defaultValues": {
402405
"toolName": "terminal",
@@ -489,7 +492,6 @@
489492
"p": {
490493
"description": "Restores all NuGet packages for repository.",
491494
"settings": {
492-
"RestoreDuringBuild": true,
493495
"Sync": "default"
494496
}
495497
},
@@ -502,7 +504,6 @@
502504
"t": {
503505
"description": "Deprecated, use sync /p instead.",
504506
"settings": {
505-
"RestoreDuringBuild": true,
506507
"Sync": "default"
507508
}
508509
},

0 commit comments

Comments
 (0)