Add daily build non-windows platforms (#7683)

Add daily build non-windows platforms
  - Also, make the [Feature] tag work in VSTS for non-windows
  - Also, add a way to force feature tests to run
  - Also, fix an issue where `-workingdirectory` didn't work when running async
This commit is contained in:
Travis Plunk
2018-09-06 18:00:46 -07:00
parent b17c5113f4
commit 433a263a17
7 changed files with 86 additions and 29 deletions
@@ -160,6 +160,18 @@ namespace Microsoft.PowerShell
ExecuteCommandAsyncHelper(tempPipeline, out exceptionThrown, options);
}
/// <summary>
/// Executes a pipeline in the console when we are running asnyc.
/// </summary>
/// <param name="tempPipeline">
/// The pipeline to execute.
/// </param>
/// <param name="exceptionThrown">
/// Any exception thrown trying to run the pipeline.
/// </param>
/// <param name="options">
/// The options to use to execute the pipeline.
/// </param>
internal void ExecuteCommandAsyncHelper(Pipeline tempPipeline, out Exception exceptionThrown, ExecutionOptions options)
{
Dbg.Assert(!_isPromptFunctionExecutor, "should not async invoke the prompt");
@@ -192,7 +204,14 @@ namespace Microsoft.PowerShell
tempPipeline.Output.DataReady += new EventHandler(OutputObjectStreamHandler);
tempPipeline.Error.DataReady += new EventHandler(ErrorObjectStreamHandler);
PipelineFinishedWaitHandle waiterThereIsAFlyInMySoup = new PipelineFinishedWaitHandle(tempPipeline);
PipelineFinishedWaitHandle pipelineWaiter = new PipelineFinishedWaitHandle(tempPipeline);
// close the input pipeline so the command will do something
// if we are not reading input
if ((options & Executor.ExecutionOptions.ReadInputObjects) == 0)
{
tempPipeline.Input.Close();
}
tempPipeline.InvokeAsync();
if ((options & ExecutionOptions.ReadInputObjects) > 0 && Console.IsInputRedirected)
@@ -224,7 +243,7 @@ namespace Microsoft.PowerShell
}
tempPipeline.Input.Close();
waiterThereIsAFlyInMySoup.Wait();
pipelineWaiter.Wait();
//report error if pipeline failed
if (tempPipeline.PipelineStateInfo.State == PipelineState.Failed && tempPipeline.PipelineStateInfo.Reason != null)