Beispiel #1
0
            private Results GatherResults()
            {
                if (!RunningProgram.HasExited)
                {
                    throw new ArgumentException($"Script updater for {NodeResult.outputfile}: results requested while RunningProgram has not exited");
                }
                if (RunningProgram.ExitCode != 0)
                {
                    return(ErrorResult($"Script updater for {NodeResult.outputfile} failed with exitcode {RunningProgram.ExitCode} and stdout: {RunningProgram.GetStdoutAndStdErrCombined()}"));
                }

                if (!_updateTxtFile.FileExists())
                {
                    return(ErrorResult($"Script updater for {NodeResult.outputfile} failed to produce updates.txt file"));
                }

                var updateLines = _updateTxtFile.ReadAllLines();

                var updates = updateLines.Select(ParseLineIntoUpdate).ToArray();

                if (updates.Contains(null))
                {
                    return(ErrorResult($"Script updater for {NodeResult.outputfile} emitted an invalid line to updates.txt"));
                }

                return(new Results()
                {
                    Messages = Array.Empty <BeeDriverResult.Message>(),
                    ProducedUpdates = updates.ToArray()
                });
            }
Beispiel #2
0
 public override void Abort()
 {
     RunningProgram.Abort();
 }