documentation/wiki/Mac-Debugging.md
ls in place of dir../build.sh -test instead of .\build.cmd -test.XUnit : error : Tests failed: /Users/forgind/Desktop/code/msbuild/artifacts/TestResults/Debug/Microsoft.Build.Utilities.UnitTests_netcoreapp2.1_x64.html [netcoreapp2.1|x64] [/Users/forgind/Desktop/code/msbuild/src/Utilities.UnitTests/Microsoft.Build.Utilities.UnitTests.csproj] near the end.Tests succeeded: /Users/forgind/Desktop/code/msbuild/artifacts/bin/Microsoft.Build.CommandLine.UnitTests/Debug/netcoreapp2.1/Microsoft.Build.CommandLine.UnitTests.dll [netcoreapp2.1|x64]Microsoft.Build.UnitTests_netcoreapp2.1_x64, that is, the part immediately preceding .html.find . -name Microsoft.Build.Engine.UnitTests_netcoreapp2.1_x64.log
.log in place of .html.tail -n 1 <path from previous step>
> character not preceded by 2) including that character. You may notice that part redirects output to the file you’re viewing.
2>&1) redirects standard error (using 2>) to the same place as where standard out is going (&1), in this case this log file.-class and the class's fully qualified name. To run all tests from TaskBuilder_Tests, for instance, you would add -class Microsoft.Build.UnitTests.BackEnd.TaskBuilder_Tests and run the statement without the following steps. Note that in the example below, standard output is redirected to /dev/null, thus only printing the errors../build.sh && to the truncated command line statement.-method and the name of the method you want to test to the end.
/Users/forgind/Desktop/code/msbuild/artifacts/TestResults/Debug/Microsoft.Build.Utilities.UnitTests_netcoreapp2.1_x64.html from the above case) in a web browser of choice. You will need to prepend file:// if you use Safari.Sample statements with outputs below and changes to the output of the second command bolded (note that additionally, the last two lines and one character of the second output were deleted):
<pre><code> $ find . -name Microsoft.Build.Engine.UnitTests_netcoreapp2.1_x64.log ./artifacts/log/Debug/Microsoft.Build.Engine.UnitTests_netcoreapp2.1_x64.log $ tail -n 1 ./artifacts/log/Debug/Microsoft.Build.Engine.UnitTests_netcoreapp2.1_x64.log "/Users/forgind/Desktop/code/msbuild/.dotnet/dotnet" exec --depsfile "/Users/forgind/Desktop/code/msbuild/artifacts/bin/Microsoft.Build.Engine.UnitTests/Debug/netcoreapp2.1/Microsoft.Build.Engine.UnitTests.deps.json" --runtimeconfig "/Users/forgind/Desktop/code/msbuild/artifacts/bin/Microsoft.Build.Engine.UnitTests/Debug/netcoreapp2.1/Microsoft.Build.Engine.UnitTests.runtimeconfig.json" "/Users/forgind/.nuget/packages/xunit.runner.console/2.4.1/tools/netcoreapp2.0/xunit.console.dll" "/Users/forgind/Desktop/code/msbuild/artifacts/bin/Microsoft.Build.Engine.UnitTests/Debug/netcoreapp2.1/Microsoft.Build.Engine.UnitTests.dll" -noautoreporters -xml "/Users/forgind/Desktop/code/msbuild/artifacts/TestResults/Debug/Microsoft.Build.Engine.UnitTests_netcoreapp2.1_x64.xml" -html "/Users/forgind/Desktop/code/msbuild/artifacts/TestResults/Debug/Microsoft.Build.Engine.UnitTests_netcoreapp2.1_x64.html" -notrait category=nonosxtests -notrait category=netcore-osx-failing -notrait category=nonnetcoreapptests -notrait category=failing > "/Users/forgind/Desktop/code/msbuild/artifacts/log/Debug/Microsoft.Build.Engine.UnitTests_netcoreapp2.1_x64.log" 2>&1 $ "/Users/forgind/Desktop/code/msbuild/.dotnet/dotnet" exec --depsfile "/Users/forgind/Desktop/code/msbuild/artifacts/bin/Microsoft.Build.Engine.UnitTests/Debug/netcoreapp2.1/Microsoft.Build.Engine.UnitTests.deps.json" --runtimeconfig "/Users/forgind/Desktop/code/msbuild/artifacts/bin/Microsoft.Build.Engine.UnitTests/Debug/netcoreapp2.1/Microsoft.Build.Engine.UnitTests.runtimeconfig.json" "/Users/forgind/.nuget/packages/xunit.runner.console/2.4.1/tools/netcoreapp2.0/xunit.console.dll" "/Users/forgind/Desktop/code/msbuild/artifacts/bin/Microsoft.Build.Engine.UnitTests/Debug/netcoreapp2.1/Microsoft.Build.Engine.UnitTests.dll" -noautoreporters -xml "/Users/forgind/Desktop/code/msbuild/artifacts/TestResults/Debug/Microsoft.Build.Engine.UnitTests_netcoreapp2.1_x64.xml" -html "/Users/forgind/Desktop/code/msbuild/artifacts/TestResults/Debug/Microsoft.Build.Engine.UnitTests_netcoreapp2.1_x64.html" -notrait category=nonosxtests -notrait category=netcore-osx-failing -notrait category=nonnetcoreapptests -notrait category=failing -class Microsoft.Build.UnitTests.BackEnd.TaskBuilder_Tests > /dev/null Microsoft.Build.UnitTests.BackEnd.TaskBuilder_Tests.NullMetadataOnLegacyOutputItems [FAIL] $ <b>./build.sh &&</b> "/Users/forgind/Desktop/code/msbuild/.dotnet/dotnet" exec --depsfile "/Users/forgind/Desktop/code/msbuild/artifacts/bin/Microsoft.Build.Engine.UnitTests/Debug/netcoreapp2.1/Microsoft.Build.Engine.UnitTests.deps.json" --runtimeconfig "/Users/forgind/Desktop/code/msbuild/artifacts/bin/Microsoft.Build.Engine.UnitTests/Debug/netcoreapp2.1/Microsoft.Build.Engine.UnitTests.runtimeconfig.json" "/Users/forgind/.nuget/packages/xunit.runner.console/2.4.1/tools/netcoreapp2.0/xunit.console.dll" "/Users/forgind/Desktop/code/msbuild/artifacts/bin/Microsoft.Build.Engine.UnitTests/Debug/netcoreapp2.1/Microsoft.Build.Engine.UnitTests.dll" -noautoreporters -xml "/Users/forgind/Desktop/code/msbuild/artifacts/TestResults/Debug/Microsoft.Build.Engine.UnitTests_netcoreapp2.1_x64.xml" -html "/Users/forgind/Desktop/code/msbuild/artifacts/TestResults/Debug/Microsoft.Build.Engine.UnitTests_netcoreapp2.1_x64.html" -notrait category=nonosxtests -notrait category=netcore-osx-failing -notrait category=nonnetcoreapptests -notrait category=failing <b>-method Microsoft.Build.UnitTests.BackEnd.TaskBuilder_Tests.NullMetadataOnLegacyOutputItems</b> </code></pre>