[xharness] Log the environment variables in the execution logs (#5045)

While trying to debug an msbuild unit tests it was not possible to
successfully copy/paste the command from the execution log and
run it in a shell.

It's not that hard to run xharness and figure it out - but the
same can happen on bots (which could be harder).

So that little change prints out the host and xharness changes
to the environment variables to make copy/pasters life even
lazier :)
This commit is contained in:
Sebastien Pouliot 2018-10-26 13:34:08 -04:00 коммит произвёл GitHub
Родитель eaa6435e89
Коммит 917214828d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -1,4 +1,5 @@
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Diagnostics; using System.Diagnostics;
@ -2883,6 +2884,8 @@ function toggleAll (show)
} }
proc.StartInfo.Arguments = args.ToString (); proc.StartInfo.Arguments = args.ToString ();
SetEnvironmentVariables (proc); SetEnvironmentVariables (proc);
foreach (DictionaryEntry de in proc.StartInfo.EnvironmentVariables)
log.WriteLine ($"export {de.Key}={de.Value}");
Jenkins.MainLog.WriteLine ("Executing {0} ({1})", TestName, Mode); Jenkins.MainLog.WriteLine ("Executing {0} ({1})", TestName, Mode);
if (!Harness.DryRun) { if (!Harness.DryRun) {
ExecutionResult = TestExecutingResult.Running; ExecutionResult = TestExecutingResult.Running;