Exemple #1
0
        /// <summary>
        /// Run the resulting target from building the <see cref="BuildPipeline"/> of this <see cref="BuildConfiguration"/>.
        /// </summary>
        /// <returns></returns>
        public RunStepResult Run()
        {
            var pipeline = GetBuildPipeline();

            if (!CanRun(out var reason))
            {
                return(RunStepResult.Failure(this, pipeline?.RunStep, reason));
            }
            return(pipeline.Run(this));
        }
Exemple #2
0
        public void LogResult_SupportFormattingCharacters()
        {
            var config = BuildConfiguration.CreateInstance();
            var step   = new TestRunStep();

            var resultFailure = RunStepResult.Failure(config, step, @"{}{{}}{0}{s}%s%%\s±@£¢¤¬¦²³¼½¾");

            Assert.DoesNotThrow(() =>
            {
                LogAssert.Expect(LogType.Error, new Regex(@"Run.* failed\.\n.+"));
                resultFailure.LogResult();
            });
        }
        public override RunStepResult Start(BuildSettings settings)
        {
            var artifact = BuildArtifacts.GetBuildArtifact <DotsRuntimeBuildArtifact>(settings);
            var profile  = settings.GetComponent <DotsRuntimeBuildProfile>();

            if (!profile.Target.Run(artifact.OutputTargetFile))
            {
                return(RunStepResult.Failure(settings, this, $"Failed to start build target {profile.Target.DisplayName} at '{artifact.OutputTargetFile.FullName}'."));
            }

            //@TODO: BuildTarget.Run should return the process, so we can store it in DotsRuntimeRunInstance
            return(RunStepResult.Success(settings, this, new DotsRuntimeRunInstance()));
        }