Граф коммитов

12 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge f8a254d628 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-11-16 14:26:50 -05:00
Ankit Jain f865694f86 Move tests to use new tool xibuild and thus fix msbuild tests (#5128)
* xibuild: New wrapper tool to run msbuild or managed executables

MSBuild supports fallback paths for projects imported using
`$(MSBuildExtensionsPath)`, but these must be specified explicitly in
the app.config of the main executable. There was a PR to allow use of
properties for this in the app.config, but that was not accepted
upstream.

This is required for being able to:

1. build projects with msbuild against the in-tree XI/XM build output
2. and to run nunit tests against the same.

For this we introduce a new tool, `xibuild`, based on XA's `xabuild`.
This supports the fallback paths to be specified via the environment variable
`MSBuildExtensionsPathFallbackPathsOverride`[1].
It essentially operates in 3 modes:

1. `xibuild -c /path/to/foo.exe`
	Generates /path/to/foo.exe.config with the fallback paths inserted into that.

2. `xibuild -- /v:diag /path/to/project.csproj`
	Runs msbuild with the arguments after `--` with a custom app.config based on
	`MSBuild.dll.config`, with the fallback paths correctly inserted.
	This is in a temporary file and the original config file is not touched.

3. `xibuild -t -- /path/to/managed_tool.exe args`
	Generates `/path/to/managed_tool.exe.config` based on `MSBuild.dll.config` with
	the fallback paths inserted, and runs `managed_tool.exe` with the arguments.
	The default is to overwrite the config file.
	But there is also a switch to merge it with an existing config file.

--
1. Value of the environment variable $MSBuildExtensionsPathFallbackPathsOverride
is prepended to any existing list of search paths in `MSBuild.dll.config`, IOW,
it takes precedence. So, the order of lookup becomes:

  - Value of the property `$(MSBuildExtensionsPath)`
  - Value of the environment variable `$MSBuildExtensionsPathFallbackPathsOverride`
  - /Library/Frameworks/Mono.framework/External/xbuild on macOS

* Integrate use of `xibuild` with the tests

Update all uses of `msbuild` and invocations of tools like nunit that
might depend on using the in-tree builds to use `xibuild`.

* xibuild: Move help descriptions to OptionSet itself.
2018-11-16 14:24:35 -05:00
Rolf Bjarne Kvinge cca50fe500 Mono 2018-08 requires macOS 10.9+, so Xamarin.Mac must as well. 2018-10-25 09:54:43 +02:00
Ankit c7b051436f [msbuild] Replace all invocations of xbuild with msbuild
- And map xbuild properties to msbuild ones for fallback paths

`XBUILD_FRAMEWORK_FOLDERS_PATH -> TargetFrameworkFallbackSearchPaths`

`MSBuildExtensionsPath -> MSBuildExtensionsPathFallbackPathsOverride`

Note:
Earlier with xbuild, the order of lookup for (example)
`MSBuildExtensionsPath` was:

	1. The value of $(MSBuildExtensionsPath), which we were setting to
	the in-tree path

	2. /Library/Frameworks/Mono.framework/External/xbuild on osx

	3. $prefix/lib/mono/xbuild (default location)

And with the above changes, it will be:

	1. The value of $(MSBuildExtensionsPath), which we are no longer
	setting, so the default path : $prefix/lib/mono/xbuild

	2. The in-tree path, via $(MSBuildExtensionsPathFallbackPathsOverride)

	3. /Library/Frameworks/Mono.framework/External/xbuild on osx

Since, XI/XM targets are used via fallback path
`/Library/Frameworks/Mono.framework/External/xbuild`, the default
location doesn't matter. And the order of the remaining two remains the
same.

The same thing applies to the target frameworks also.
2018-05-22 13:24:29 -04:00
Rolf Bjarne Kvinge ee91b95c19 [tests] Unset XCODE_DEVELOPER_DIR_PATH when building mac binding projects. (#2776)
Unset XCODE_DEVELOPER_DIR_PATH when building mac binding projects, so that
when building from VSfM when the Xcode in VSfM differs from the system Xcode
(according to xcode-select) the Xcode command-line tools don't end up confused
and fail in strange ways.
2017-09-27 10:48:51 +02:00
Rolf Bjarne Kvinge dbc78103d0 [mmp] Fix symbol name for 32-bit Objective-C classes. Fixes #58861. (#2506)
* [mmp] Fix symbol name for 32-bit Objective-C classes. Fixes #58861.

https://bugzilla.xamarin.com/show_bug.cgi?id=58861

* [tests] Add test case for bug #58861.

https://bugzilla.xamarin.com/show_bug.cgi?id=58861

* [tests] Fix build failure for msbuild and xammac tests.

Fixes this:

> tests/common/mac/ProjectTestHelpers.cs(93,68): error CS0117: 'Driver' does not contain a definition for 'Verbosity'

* [mmptest] Fix build to build MobileBinding.dll as well.

This makes sure tests that need MobileBinding.dll actually have it.
2017-08-24 09:42:08 +02:00
Chris Hamons 9accdb3888 Framework tests were still binding non-linked Simple class which errors now (#2216)
- Improve Makefile to rebuild when projects build with errors
2017-06-14 08:33:18 -05:00
Chris Hamons 482ab9051f [XM] Rework binding project test to try to fix build machine issues (#1474)
- https://bugzilla.xamarin.com/show_bug.cgi?id=50634
2017-01-17 10:06:10 -06:00
Rolf Bjarne Kvinge 7cbaa254c5 [tests] Make mdtool verbose on CI, and fix a few xbuild invocation to honor XBUILD_VERBOSITY. (#131) 2016-06-06 13:01:24 +02:00
Rolf Bjarne Kvinge 4a714f3c43 Make logic not depend on the checkout directory being named 'xamarin-macios'. (#129) 2016-06-06 12:18:52 +02:00
Chris Hamons f495ad50a7 [XM] Fix mmp tests to use shared mac-binding-project copy, and name SimpleClassDylib.dylib correctly (#120) 2016-06-01 13:51:04 -04:00
Rolf Bjarne Kvinge ecfdea9508 [tests] Import 2016-05-26 15:06:52 +02:00