add support for generating xml documentation

fixes #312
This commit is contained in:
Andrew Stanton-Nurse 2016-01-08 11:03:14 -08:00
parent 770026eef7
commit 78cef18e1c
22 changed files with 378 additions and 102 deletions

View file

@ -40,10 +40,20 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
public virtual void Dispose()
{
if (_temp != null)
{
if (_temp != null && !PreserveTemp())
{
_temp.Dispose();
}
}
// Quick-n-dirty way to allow the temp output to be preserved when running tests
private bool PreserveTemp()
{
var val = Environment.GetEnvironmentVariable("DOTNET_TEST_PRESERVE_TEMP");
return !string.IsNullOrEmpty(val) && (
string.Equals("true", val, StringComparison.OrdinalIgnoreCase) ||
string.Equals("1", val, StringComparison.OrdinalIgnoreCase) ||
string.Equals("on", val, StringComparison.OrdinalIgnoreCase));
}
}
}