Support filtering to TestTFM
This change is to support filtering according to the TestTFM. e.g. can do
“build.cmd /p:FilterToTestTFM=net46”
The change here is splitting the Build phase from the Test phase in dir.traversal.targets
so we don’t have to rebuild the test assemblies when passing TestTFM property to run the test.
Now if FilterToTestTFM is not specified, we default running the tests as netcoreapp1.0
so when issuing “build.cmd/sh” Command without passing FilterToTestTFM, it will
filter the tests to netcoreapp1.0 and run those tests.
I have enabled one of the test projects System.AppContext.Tests to support net46
as example, next step will be Enabling the rest of all projects to run against all
platforms (net46, net461, net462, netcore50 and netcore50aot)
Commit migrated from https://github.com/dotnet/corefx/commit/
3e714b8b1efe68c693469b6cab7883ff8a1b51d8