[corlib] Fix building nunit-lite twice (#16894)
commitf99acb8fa6fd45c6219f7024826fed01f4dcd97a
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 17 Sep 2019 18:25:52 +0000 (17 20:25 +0200)
committerGitHub <noreply@github.com>
Tue, 17 Sep 2019 18:25:52 +0000 (17 20:25 +0200)
tree569ad8e44e3a5b36db7746ef4254e47f1414cad4
parent906c71b8bf990a9f6dce535a1842a2b3d22a5272
[corlib] Fix building nunit-lite twice (#16894)

We sometimes saw the following build error in Mono SDKs builds on Jenkins:

```
[2019-09-16T01:03:30.709Z] CSC     [xammac] nunit-lite-console.exe
[2019-09-16T01:03:30.709Z] error CS0009: Metadata file '/Users/builder/jenkins/workspace/archive-mono/2019-08/mac/release/mcs/class/lib/xammac/nunitlite.dll' could not be opened -- PE image doesn't contain managed metadata.
```

Taking a closer look we found out that nunit-lite was trying to be built twice for the same profile which caused a race where the file was corrupted.

The reason for this is that the corlib Makefile defines two test assemblies: the normal PROFILE_corlib_test.dll and BinarySerializationOverVersionsTest.dll and
integrating the BinarySerializationOverVersionsTest.dll via the `test-vts` target incorrectly overwrote the `test` target instead of using `test-local`.
mcs/build/tests.make
mcs/class/corlib/Makefile
mcs/tools/Makefile