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

5 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 327c0a8ddf
[xibuild] Add support for /verbose, and use it accordingly. (#5224)
* [xibuild] Add support for /verbose, and use it accordingly.

Also stop using xibuild when it's not needed.

* Use the same verbosity for xibuild as we do for xbuild/msbuild.
2019-01-09 07:43:22 +01:00
Rolf Bjarne Kvinge 1af3903f1f
[xibuild] Don't redirect standard input. (#5209)
It's not needed, and it prevents subprocesses from detecting a terminal (and
thus no colors in the output).
2018-12-03 14:52:08 +01:00
Rolf Bjarne Kvinge a8c54e00b3
[xibuild] Auto-make if not already made. (#5211)
* [xibuild] Auto-make if not already made.

Automatically make xibuild if it doesn't already exist.

Also fix the script:

* Use bash instead of sh, since it references BASH_SOURCE.
* Don't hide errors (-e).
* Fix shellcheck warnings
	* Use $(..) instead of backticks, because backticks are strongly discouraged [1].
	* Sprinkle quotes.

[1] For the curious: https://stackoverflow.com/a/4708569/183422

* Run make in the right directory.
2018-12-03 11:49:26 +01:00
Rolf Bjarne Kvinge 2e754a2f70
[xibuild] Build the expected configuration. (#5172) 2018-11-23 16:22:14 +01: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