-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add props/targets for PCL, Windows and Xamarin TFM's #889
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
Conversation
I haven't had a chance to look at this in detail yet, but one thing I'd suggest is that instead of having a big cross-targeting project that tests targeting everything, just test each target individually. That will make it simpler to see what's wrong and fix it if something is failing. |
f9c225a
to
a3126d6
Compare
@dsplaisted Ok, I've added one test per TFM in a new test class |
15d25b0
to
fda094f
Compare
Okay update -- got the tests working and passing. There were a few bug fixes and one really important thing -- only works with FullMSBuild. So the tests must be run with |
I still need to review all the details, but two main thoughts from cursory review:
|
I think we'll need to detect cases where language targets as missing and go with inconclusive/skipped result. It's not sustainable to have to have tons of VS workloads and VS 2015 installed for tests to pass. We should make arrangements to run in that environment often enough as an integration test, but we can't have unit tests depending on it always. |
Hmm...maybe? So like put a |
How do you think the rest of the world feels about not having a true "xcopyable" build-server definition ;) That said, I agree and am happy to update the tests to accommodate however that needs to be done. |
Fair. Not saying this is a situation to be proud of, just what we need to do to test given today's reality. ;) |
@nguerrera I simplified the contains searches by including the separator char on either end to be more explicit and avoid partial matches. As for using a theory for those tests, the one issue there is that the output isn't necessarily the same across all TFM's. Some include a Is there any harm in having an explicit test for each TFM rather than use a theory? |
7989d2d
to
be0d40b
Compare
Okay, tests are working as expected. The CI server needs to have VS 2015 with the Win8, SL5 and WP workloads installed to complete. The VS 2017 install needs the Xamarin and UWP workloads installed. Once those are on the FullFramework CI box, the tests will pass. |
Even if we use distinct facts, we should avoid having dozens of nearly identical test projects to maintain. I think WithSourceChanges(... /* set TFM */) is still a good idea. Note that as of right now, each test is copying the entire LibraryWithTfm folder leading to O(N^2) cspojs in bin\Debug\Tests where N is number of TFMs being tested. At a minimum, we need to just copy the test project that is used, but I strongly want to dedup them in source control too. It should be easy to add new TFMs moving forward without having to copy a bunch of files. You can also group tests which have the same expectations in to theories. |
As I said earlier, we need build -FullMSBuild to pass locally without the Dev15 and Xamarin requirements. Can the tests check if the language targets exist and if not expect the missing language targets failure? We can then start a separate conversation about how to maximimize the coverage, but I'm not keen on a hard ordering of a huge dependency increase for CI to this PR. |
@nguerrera I can dedup the tests, but checking for the targets existence is hard since How do you suggest we get that variable from? |
be0d40b
to
efe3122
Compare
For test purposes, we can get it relative from the DOTNET_SDK_TEST_MSBUILD_PATH environment variable that locates msbuild.exe. |
This is to implement #491
The project I added to test works when restored/built locally and overriding the MSBuildSdksPath to point to the locally built version. Not sure yet why the test in the harness is failing.
The build server will need the Xamarin and UWP workloads installed and very likely VS 2015 to get the SL5 and WP8 targets.