Example #1
0
        public void DependencyOrderWhenParallelAndSkipping(
            TargetCollection targets,
            TestConsole console,
            int clock,
            int buildStartTime,
            int test1StartTime,
            int test2StartTime)
        {
            "Given a target that takes a long time to start up"
            .x(() => Ensure(ref targets).Add(CreateTarget(
                                                 "build",
                                                 () => {
                Thread.Sleep(TimeSpan.FromSeconds(1));         // a weak way to encourage the tests to run first
                buildStartTime = Interlocked.Increment(ref clock);
            })));

            "And a second target which depends on the first target"
            .x(() => targets.Add(CreateTarget("test1", new[] { "build" }, () => test1StartTime = Interlocked.Increment(ref clock))));

            "And a third target which depends on the first target"
            .x(() => targets.Add(CreateTarget("test2", new[] { "build" }, () => test2StartTime = Interlocked.Increment(ref clock))));

            "When I run all the targets with parallelism, skipping dependencies"
            .x(() => targets.RunAsync(new List <string> {
                "--parallel", "--skip-dependencies", "test1", "test2", "build"
            }, console = new TestConsole()));

            "Then the first target is run first"
            .x(() => Assert.Equal(1, buildStartTime));

            "And the other targets are run later"
            .x(() => Assert.Equal(5, test1StartTime + test2StartTime));
        }
Example #2
0
        public void DoubleTransitiveDependency(TargetCollection targets, List <string> ran)
        {
            "Given a target"
            .x(() => Ensure(ref targets).Add(CreateTarget("first", () => Ensure(ref ran).Add("first"))));

            "And a second target which depends on the first target"
            .x(() => targets.Add(CreateTarget("second", new[] { "first" }, () => Ensure(ref ran).Add("second"))));

            "And a third target which depends on the first target and the second target"
            .x(() => targets.Add(CreateTarget("third", new[] { "first", "second" }, () => Ensure(ref ran).Add("third"))));

            "When I run the third target"
            .x(() => targets.RunAsync(new List <string> {
                "third"
            }, default));

            "Then all targets are run"
            .x(() => Assert.Equal(3, ran.Count));

            "And the first target is run first"
            .x(() => Assert.Equal("first", ran[0]));

            "And the second target is run second"
            .x(() => Assert.Equal("second", ran[1]));

            "And the third target is run third"
            .x(() => Assert.Equal("third", ran[2]));
        }
Example #3
0
        public void NestedDependencies(TargetCollection targets, TestConsole console, List <string> ran)
        {
            "Given a target"
            .x(() => Ensure(ref targets).Add(CreateTarget("first", () => Ensure(ref ran).Add("first"))));

            "And a second target which depends on the first target"
            .x(() => targets.Add(CreateTarget("second", new[] { "first" }, () => Ensure(ref ran).Add("second"))));

            "And a third target which depends on the second target"
            .x(() => targets.Add(CreateTarget("third", new[] { "second" }, () => Ensure(ref ran).Add("third"))));

            "When I run the third target"
            .x(() => targets.RunAsync(new List <string> {
                "third"
            }, console = new TestConsole()));

            "Then all targets are run"
            .x(() => Assert.Equal(3, ran.Count));

            "And the first target is run first"
            .x(() => Assert.Equal("first", ran[0]));

            "And the second target is run second"
            .x(() => Assert.Equal("second", ran[1]));

            "And the third target is run third"
            .x(() => Assert.Equal("third", ran[2]));
        }
Example #4
0
        public void NotExistentDependencies(TargetCollection targets, TestConsole console, bool anyRan, Exception exception)
        {
            "Given a target"
            .x(() => Ensure(ref targets).Add(CreateTarget("first", () => anyRan = true)));

            "And a second target which depends on the first target and a non-existent target"
            .x(() => targets.Add(CreateTarget("second", new[] { "first", "non-existing" }, () => anyRan = true)));

            "And a third target which depends on the second target and another non-existent target"
            .x(() => targets.Add(CreateTarget("third", new[] { "second", "also-non-existing" }, () => anyRan = true)));

            "When I run the third target"
            .x(async() => exception = await Record.ExceptionAsync(() => targets.RunAsync(new List <string> {
                "third"
            }, console = new TestConsole())));

            "Then the operation fails"
            .x(() => Assert.NotNull(exception));

            "And I am told that the first non-existent target could not be found"
            .x(() => Assert.Contains("non-existing, required by second", exception.Message));

            "And I am told that the second non-existent target could not be found"
            .x(() => Assert.Contains("also-non-existing, required by third", exception.Message));

            "And the other targets are not run"
            .x(() => Assert.False(anyRan));
        }
Example #5
0
 /// <summary>
 /// Initializes a new instance of <see cref="LoggingRule"/> by
 /// setting the logger name pattern, minimum logging level and
 /// the target to be written to when logger name and log level match.
 /// </summary>
 /// <param name="loggerNamePattern">Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends.</param>
 /// <param name="minLevel">Minimum log level needed to trigger this rule.</param>
 /// <param name="target">Target to be written to when the rule matches.</param>
 public LoggingRule(string loggerNamePattern, LogLevel minLevel, Target target)
 {
     LoggerNamePattern = loggerNamePattern;
     _targets.Add(target);
     for (int i = (int)minLevel.Ordinal; i <= (int)LogLevel.MaxLevel.Ordinal; ++i)
     {
         EnableLoggingForLevel(LogLevel.FromOrdinal(i));
     }
 }
Example #6
0
        public void FlatDependencies(TargetCollection targets, List <string> ran)
        {
            "Given a target"
            .x(() => Ensure(ref targets).Add(CreateTarget("first", () => Ensure(ref ran).Add("first"))));

            "And a second target"
            .x(() => targets.Add(CreateTarget("second", () => Ensure(ref ran).Add("second"))));

            "And a third target which depends on the first and second target"
            .x(() => targets.Add(CreateTarget("third", new[] { "first", "second" }, () => Ensure(ref ran).Add("third"))));

            "When I run the third target"
            .x(() => targets.RunAsync(new List <string> {
                "third"
            }, default, default, default));
    public override TargetCollection GetRuntimeBuildList( )
    {
        TargetCollection sc = new TargetCollection();

        sc.Add(@"awscalculobuquesgranelero", "dll");
        return(sc);
    }
Example #8
0
 private void okButton_Click(object sender, RoutedEventArgs e)
 {
     for (int i = SourceCollection.Count - 1; i >= 0; i--)
     {
         object o = SourceCollection[i];
         if (!SourceCollectionEdited.Contains(o))
         {
             SourceCollection.RemoveAt(i);
         }
     }
     foreach (object o in SourceCollectionEdited)
     {
         if (!SourceCollection.Contains(o))
         {
             SourceCollection.Add(o);
         }
     }
     for (int i = TargetCollection.Count - 1; i >= 0; i--)
     {
         object o = TargetCollection[i];
         if (!TargetCollectionEdited.Contains(o))
         {
             TargetCollection.RemoveAt(i);
         }
     }
     foreach (object o in TargetCollectionEdited)
     {
         if (!TargetCollection.Contains(o))
         {
             TargetCollection.Add(o);
         }
     }
     cancelButton_Click(sender, e);
 }
Example #9
0
    public override TargetCollection GetRuntimeBuildList( )
    {
        TargetCollection sc = new TargetCollection();

        sc.Add(@"appmasterpage", "dll");
        sc.Add(@"recentlinks", "dll");
        sc.Add(@"promptmasterpage", "dll");
        sc.Add(@"rwdmasterpage", "dll");
        sc.Add(@"rwdrecentlinks", "dll");
        sc.Add(@"rwdpromptmasterpage", "dll");
        sc.Add(@"gx0010", "dll");
        sc.Add(@"gx0020", "dll");
        sc.Add(@"pais", "dll");
        sc.Add(@"cliente", "dll");
        return(sc);
    }
Example #10
0
        internal void InitializeAll()
        {
            foreach (LoggingRule r in LoggingRules)
            {
                foreach (Target t in r.Targets)
                {
                    if (!_aliveTargets.Contains(t))
                    {
                        _aliveTargets.Add(t);
                    }
                }
            }

            foreach (Target target in _aliveTargets)
            {
                try
                {
                    target.Initialize();
                }
                catch (Exception ex)
                {
                    InternalLogger.Error("Error while initializing target: {0} {1}", target.Name, ex);
                }
            }
        }
    public override TargetCollection GetRuntimeBuildList( )
    {
        TargetCollection sc = new TargetCollection();

        sc.Add(@"awscalculartanqueros", "dll");
        return(sc);
    }
    public override TargetCollection GetRuntimeBuildList( )
    {
        TargetCollection sc = new TargetCollection();

        sc.Add(@"awscalcularportavehiculosrorosoap", "dll");
        return(sc);
    }
Example #13
0
        /// <inheritdoc cref="IInconsistency" />
        public void ResolveRight()
        {
            var direction = Context.Direction;

            try
            {
                Context.Direction = SynchronizationDirection.LeftToRightForced;
                if (IsLeftMissing)
                {
                    SourceCollection.Remove(Source);
                }
                else
                {
                    var comp = Context.CallTransformation(Rule, Source);
                    if (!comp.IsDelayed)
                    {
                        TargetCollection.Add(comp.Output as TTarget);
                    }
                    else
                    {
                        comp.OutputInitialized += (o, e) => TargetCollection.Add(comp.Output as TTarget);
                    }
                }
                Context.Inconsistencies.Remove(this);
            }
            finally
            {
                Context.Direction = direction;
            }
        }
    public override TargetCollection GetRuntimeBuildList( )
    {
        TargetCollection sc = new TargetCollection();

        sc.Add(@"wwpbaseobjects\seclogin", "dll");
        return(sc);
    }
Example #15
0
    public override TargetCollection GetRuntimeBuildList( )
    {
        TargetCollection sc = new TargetCollection();

        sc.Add(@"home", "dll");
        return(sc);
    }
Example #16
0
        public void MixingCase(TargetCollection targets, bool first, bool second)
        {
            "Given a target"
            .x(() => Ensure(ref targets).Add(CreateTarget("first", () => first = true)));

            "And another target which depends on the first target with a different case"
            .x(() => targets.Add(CreateTarget("second", new[] { "FIRST" }, () => second = true)));

            "When I run the second target with a different case"
            .x(() => targets.RunAsync(new[] { "SECOND" }, default, default, default));
Example #17
0
        /// <summary>
        /// Returns a collection of named targets specified in the configuration.
        /// </summary>
        /// <returns>A <see cref="TargetCollection"/> object that contains a list of named targets.</returns>
        /// <remarks>
        /// Unnamed targets (such as those wrapped by other targets) are not returned.
        /// </remarks>
        public TargetCollection GetConfiguredNamedTargets()
        {
            TargetCollection tc = new TargetCollection();

            foreach (Target t in _targets.Values)
            {
                tc.Add(t);
            }
            return(tc);
        }
Example #18
0
        public void Default(TargetCollection targets, bool @default, bool other)
        {
            "Given a default target"
            .x(() => Ensure(ref targets).Add(CreateTarget("default", () => @default = true)));

            "And another target"
            .x(() => targets.Add(CreateTarget(nameof(other), () => other = true)));

            "When I run without specifying any target names"
            .x(() => targets.RunAsync(new List <string>(), default, default));
Example #19
0
        public void CircularDependency(TargetCollection targets, Exception exception)
        {
            "Given a target which depends on a third target"
            .x(() => Ensure(ref targets).Add(CreateTarget("first", new[] { "third" })));

            "And a second target which depends on the first target"
            .x(() => targets.Add(CreateTarget("second", new[] { "first" })));

            "And a third target which depends on the second target"
            .x(() => targets.Add(CreateTarget("third", new[] { "second" })));

            "When I run the third target"
            .x(async() => exception = await Record.ExceptionAsync(() => targets.RunAsync(new List <string> {
                "third"
            }, null)));

            "Then the operation fails"
            .x(() => Assert.NotNull(exception));

            "And I am told that the circular dependency was detected"
            .x(() => Assert.Contains("first -> third -> second -> first", exception.Message));
        }
Example #20
0
        public void Default(TargetCollection targets, TestConsole console, bool @default, bool other)
        {
            "Given a default target"
            .x(() => Ensure(ref targets).Add(CreateTarget("default", () => @default = true)));

            "And another target"
            .x(() => targets.Add(CreateTarget(nameof(other), () => other = true)));

            "When I run without specifying any target names"
            .x(() => targets.RunAsync(new List <string>(), console = new TestConsole()));

            "Then the default target is run"
            .x(() => Assert.True(@default));

            "But the other target is not run"
            .x(() => Assert.False(other));
        }
Example #21
0
      public void CopyFrom (TContent alias)
      {
        if (alias.NotNull ()) {
          Cleanup ();

          foreach (var id in alias.IdCollection) {
            IdCollection.Add (id);
          }

          foreach (var gadgetTest in alias.TestCollection) {
            TestCollection.Add (gadgetTest.Clone ());
          }

          foreach (var gadgetTarget in alias.TargetCollection) {
            TargetCollection.Add (gadgetTarget.Clone ());
          }
        }
      }
Example #22
0
        public void SkippingDependencies(TargetCollection targets, TestConsole console, List <string> ran)
        {
            "Given a target"
            .x(() => Ensure(ref targets).Add(CreateTarget("first", () => Ensure(ref ran).Add("first"))));

            "And a second target which depends on the first target and a non-existent target"
            .x(() => targets.Add(CreateTarget("second", new[] { "first", "non-existent" }, () => Ensure(ref ran).Add("second"))));

            "When I run the second target, skipping dependencies"
            .x(() => targets.RunAsync(new List <string> {
                "second", "-s"
            }, console = new TestConsole()));

            "Then the second target is run"
            .x(() => Assert.Contains("second", ran));

            "But the first target is not run"
            .x(() => Assert.DoesNotContain("first", ran));
        }
Example #23
0
      public bool Add (GadgetTarget gadget)
      {
        var res = false;

        if (gadget.NotNull ()) {
          if (Contains (gadget.Id).IsFalse ()) {
            IdCollection.Add (gadget.Id);
            TargetCollection.Add (gadget);

            res = true;
          }

          else {
            if (ContainsTarget (gadget.Id).IsFalse ()) {
              TargetCollection.Add (gadget);
            }
          }
        }

        return (res);
      }
Example #24
0
        public void DoubleDependency(TargetCollection targets, TestConsole console, List <string> ran)
        {
            "Given a target"
            .x(() => Ensure(ref targets).Add(CreateTarget("first", () => Ensure(ref ran).Add("first"))));

            "And a second target which depends on the first target twice"
            .x(() => targets.Add(CreateTarget("second", new[] { "first", "first" }, () => Ensure(ref ran).Add("second"))));

            "When I run the second target"
            .x(() => targets.RunAsync(new List <string> {
                "second"
            }, console = new TestConsole()));

            "Then both targets are run once"
            .x(() => Assert.Equal(2, ran.Count));

            "And the first target is run first"
            .x(() => Assert.Equal("first", ran[0]));

            "And the second target is run second"
            .x(() => Assert.Equal("second", ran[1]));
        }
Example #25
0
        public void DependencyOrderWhenSkipping(TargetCollection targets, TestConsole console, List <string> ran)
        {
            "Given a target"
            .x(() => Ensure(ref targets).Add(CreateTarget("first", () => Ensure(ref ran).Add("first"))));

            "And a second target which depends on the first target"
            .x(() => targets.Add(CreateTarget("second", new[] { "first" }, () => Ensure(ref ran).Add("second"))));

            "When I run the second and first targets, skipping dependencies"
            .x(() => targets.RunAsync(new List <string> {
                "--skip-dependencies", "second", "first"
            }, console = new TestConsole()));

            "Then all targets are run"
            .x(() => Assert.Equal(2, ran.Count));

            "And the first target is run first"
            .x(() => Assert.Equal("first", ran[0]));

            "And the second target is run second"
            .x(() => Assert.Equal("second", ran[1]));
        }
Example #26
0
 /// <summary>
 /// Returns a collection of named targets specified in the configuration.
 /// </summary>
 /// <returns>A <see cref="TargetCollection"/> object that contains a list of named targets.</returns>
 /// <remarks>
 /// Unnamed targets (such as those wrapped by other targets) are not returned.
 /// </remarks>
 public TargetCollection GetConfiguredNamedTargets()
 {
     TargetCollection tc = new TargetCollection();
     foreach (Target t in _targets.Values)
     {
         tc.Add(t);
     }
     return tc;
 }
Example #27
0
    public override TargetCollection GetRuntimeBuildList( )
    {
        TargetCollection sc = new TargetCollection();

        sc.Add(@"acalculartanqueros", "dll");
        sc.Add(@"wscalcularportavehiculosroro", "dll");
        sc.Add(@"awscalcularportavehiculosrorosoap", "dll");
        sc.Add(@"awscalculobuquesgranelero", "dll");
        sc.Add(@"awscalculartanqueros", "dll");
        sc.Add(@"awscalcularquimiqueros", "dll");
        sc.Add(@"awscalcularlpg", "dll");
        sc.Add(@"awscalcularlng", "dll");
        sc.Add(@"awscalcularrefcgraldesp", "dll");
        sc.Add(@"awscalcularpasajeros", "dll");
        sc.Add(@"awscalcularportacontenedores", "dll");
        sc.Add(@"appmasterpage", "dll");
        sc.Add(@"recentlinks", "dll");
        sc.Add(@"promptmasterpage", "dll");
        sc.Add(@"rwdmasterpage", "dll");
        sc.Add(@"rwdrecentlinks", "dll");
        sc.Add(@"rwdpromptmasterpage", "dll");
        sc.Add(@"wcportacontenedores", "dll");
        sc.Add(@"wcencontruccion", "dll");
        sc.Add(@"ppal", "dll");
        sc.Add(@"wcgranelessecos", "dll");
        sc.Add(@"notauthorized", "dll");
        sc.Add(@"tabbedview", "dll");
        sc.Add(@"appmastersd", "dll");
        sc.Add(@"wctanqueros", "dll");
        sc.Add(@"wcnota", "dll");
        sc.Add(@"wcquimiqueros", "dll");
        sc.Add(@"wcportavehiculosroro", "dll");
        sc.Add(@"wcrefrigerados", "dll");
        sc.Add(@"wclpg", "dll");
        sc.Add(@"wclng", "dll");
        sc.Add(@"wcpasajeros", "dll");
        sc.Add(@"wccargageneral", "dll");
        sc.Add(@"wcotros", "dll");
        sc.Add(@"wcportavehiculosrorows", "dll");
        sc.Add(@"bootstrapalertsample", "dll");
        sc.Add(@"mp", "dll");
        sc.Add(@"webportacontenedores", "dll");
        sc.Add(@"wcnoteng", "dll");
        sc.Add(@"wcnotesp", "dll");
        return(sc);
    }
Example #28
0
    async Task <int> OnExecuteAsync()
    {
        Exception error = default;

        try
        {
            NeedMono = !RuntimeInformation.IsOSPlatform(OSPlatform.Windows);

            // Find the folder with the solution file
            BaseFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            while (true)
            {
                if (Directory.GetFiles(BaseFolder, "*.sln").Count() != 0)
                {
                    break;
                }

                BaseFolder = Path.GetDirectoryName(BaseFolder);
                if (BaseFolder == null)
                {
                    throw new InvalidOperationException("Could not locate a solution file in the directory hierarchy");
                }
            }

            // Dependent folders
            PackageOutputFolder = Path.Combine(BaseFolder, "artifacts", "packages");
            Directory.CreateDirectory(PackageOutputFolder);

            TestOutputFolder = Path.Combine(BaseFolder, "artifacts", "test");
            Directory.CreateDirectory(TestOutputFolder);

            var homeFolder = NeedMono
                                ? Environment.GetEnvironmentVariable("HOME")
                                : Environment.GetEnvironmentVariable("USERPROFILE");

            var nuGetCliFolder = Path.Combine(homeFolder, ".nuget", "cli", NuGetVersion);
            Directory.CreateDirectory(nuGetCliFolder);

            NuGetExe = Path.Combine(nuGetCliFolder, "nuget.exe");
            NuGetUrl = $"https://dist.nuget.org/win-x86-commandline/v{NuGetVersion}/nuget.exe";

            // Parse the targets and Bullseye-specific arguments
            var bullseyeArguments = Targets.Select(x => x.ToString());
            if (SkipDependencies)
            {
                bullseyeArguments = bullseyeArguments.Append("--skip-dependencies");
            }

            // Find target classes
            var targetCollection = new TargetCollection();
            var targets
                = Assembly.GetExecutingAssembly()
                  .ExportedTypes
                  .Select(x => new { type = x, attr = x.GetCustomAttribute <TargetAttribute>() })
                  .Where(x => x.attr != null);

            foreach (var target in targets)
            {
                var method = target.type.GetRuntimeMethod("OnExecute", new[] { typeof(BuildContext) });

                if (method == null)
                {
                    targetCollection.Add(new Target(target.attr.TargetName, target.attr.DependentTargets));
                }
                else
                {
                    targetCollection.Add(new ActionTarget(target.attr.TargetName, target.attr.DependentTargets, () => (Task)method.Invoke(null, new[] { this })));
                }
            }

            // Let Bullseye run the target(s)
            await targetCollection.RunAsync(bullseyeArguments.ToList(), SkipDependencies, false, false, new NullLogger(), null);

            return(0);
        }
        catch (Exception ex)
        {
            error = ex;
            while (error is TargetInvocationException || error is TargetFailedException)
            {
                error = error.InnerException;
            }
        }

        Console.WriteLine();

        if (error is NonZeroExitCodeException nonZeroExit)
        {
            WriteLineColor(ConsoleColor.Red, "==> Build failed! <==");
            return(nonZeroExit.ExitCode);
        }

        WriteLineColor(ConsoleColor.Red, $"==> Build failed! An unhandled exception was thrown <==");
        Console.WriteLine(error.ToString());
        return(-1);
    }
    public override TargetCollection GetRuntimeBuildList( )
    {
        TargetCollection sc = new TargetCollection();

        sc.Add(@"wwpbaseobjects\gethomesampledata", "dll");
        sc.Add(@"wwpbaseobjects\gethomesamplenamevaluedata", "dll");
        sc.Add(@"wwpbaseobjects\secfunctionalityfilterparentwwgetfilterdata", "dll");
        sc.Add(@"wwpbaseobjects\secfunctionalitysecfunctionalityrolewcgetfilterdata", "dll");
        sc.Add(@"wwpbaseobjects\secfunctionalitywwgetfilterdata", "dll");
        sc.Add(@"wwpbaseobjects\secrolesecfunctionalityrolewcgetfilterdata", "dll");
        sc.Add(@"wwpbaseobjects\secrolewwgetfilterdata", "dll");
        sc.Add(@"br_demographicswwgetfilterdata", "dll");
        sc.Add(@"br_diagnosiswwgetfilterdata", "dll");
        sc.Add(@"br_labwwgetfilterdata", "dll");
        sc.Add(@"br_medicationwwgetfilterdata", "dll");
        sc.Add(@"br_procedurewwgetfilterdata", "dll");
        sc.Add(@"br_medicalimaging_diagwwgetfilterdata", "dll");
        sc.Add(@"br_medicalimagingwwgetfilterdata", "dll");
        sc.Add(@"br_medication_detailwwgetfilterdata", "dll");
        sc.Add(@"br_pathology_specimenwwgetfilterdata", "dll");
        sc.Add(@"br_pathology_diagwwgetfilterdata", "dll");
        sc.Add(@"br_pathology_otherwwgetfilterdata", "dll");
        sc.Add(@"br_pathologywwgetfilterdata", "dll");
        sc.Add(@"br_vitalwwgetfilterdata", "dll");
        sc.Add(@"br_medication_schemewwgetfilterdata", "dll");
        sc.Add(@"br_procedure_surgerywwgetfilterdata", "dll");
        sc.Add(@"br_procedure_radiowwgetfilterdata", "dll");
        sc.Add(@"br_schemewwgetfilterdata", "dll");
        sc.Add(@"br_scheme_br_scheme_medicationgetfilterdata", "dll");
        sc.Add(@"br_scheme_medicationwwgetfilterdata", "dll");
        sc.Add(@"br_medicationpromptgetfilterdata", "dll");
        sc.Add(@"xt_configwwgetfilterdata", "dll");
        sc.Add(@"br_encounterreasonwwgetfilterdata", "dll");
        sc.Add(@"br_encounter_refusereasonwwgetfilterdata", "dll");
        sc.Add(@"br_enteringsubmitdetailgetfilterdata", "dll");
        sc.Add(@"wb_checkjwtifcorrect", "dll");
        sc.Add(@"wb_checkjwtifcorrect", "dll");
        sc.Add(@"wb_getusername", "dll");
        sc.Add(@"wb_getusername", "dll");
        sc.Add(@"wb_refreshjwt", "dll");
        sc.Add(@"wb_refreshjwt", "dll");
        sc.Add(@"testwebs", "dll");
        sc.Add(@"testwebs", "dll");
        sc.Add(@"xt_intialdefinecodegetfilterdata", "dll");
        sc.Add(@"wb_refreshjwtback", "dll");
        sc.Add(@"wb_refreshjwtback", "dll");
        sc.Add(@"sys_rolepermissionwwgetfilterdata", "dll");
        sc.Add(@"jc_providerwwgetfilterdata", "dll");
        sc.Add(@"br_informationlistgetfilterdata", "dll");
        sc.Add(@"br_encounterlistgetfilterdata", "dll");
        sc.Add(@"br_encountertabgetfilterdata", "dll");
        sc.Add(@"br_encounterlistwwgetfilterdata", "dll");
        sc.Add(@"appmasterpage", "dll");
        sc.Add(@"recentlinks", "dll");
        sc.Add(@"promptmasterpage", "dll");
        sc.Add(@"rwdmasterpage", "dll");
        sc.Add(@"rwdrecentlinks", "dll");
        sc.Add(@"rwdpromptmasterpage", "dll");
        sc.Add(@"wwpbaseobjects\addressdisplay", "dll");
        sc.Add(@"wwpbaseobjects\exportoptions", "dll");
        sc.Add(@"dashboard", "dll");
        sc.Add(@"wwpbaseobjects\managefilters", "dll");
        sc.Add(@"wwpbaseobjects\promptgeolocation", "dll");
        sc.Add(@"wwpbaseobjects\savefilteras", "dll");
        sc.Add(@"wwpbaseobjects\wizardstepsarrowwc", "dll");
        sc.Add(@"wwpbaseobjects\wizardstepsbulletwc", "dll");
        sc.Add(@"wwpbaseobjects\wwptabbedview", "dll");
        sc.Add(@"wwpbaseobjects\notauthorized", "dll");
        sc.Add(@"wwpbaseobjects\secfunctionalityww", "dll");
        sc.Add(@"wwpbaseobjects\secroleww", "dll");
        sc.Add(@"wwpbaseobjects\secuserview", "dll");
        sc.Add(@"wwpbaseobjects\secuserww", "dll");
        sc.Add(@"wwpbaseobjects\secfunctionalityfilterparentww", "dll");
        sc.Add(@"wwpbaseobjects\secrolefunroleassociationww", "dll");
        sc.Add(@"wwpbaseobjects\secrolefunroleactionassociationww", "dll");
        sc.Add(@"wwpbaseobjects\secusersecuserroleassociation", "dll");
        sc.Add(@"wwpbaseobjects\secfunctionalityview", "dll");
        sc.Add(@"wwpbaseobjects\secfunctionalitygeneral", "dll");
        sc.Add(@"wwpbaseobjects\secfunctionalitysecfunctionalityrolewc", "dll");
        sc.Add(@"wwpbaseobjects\seclogin", "dll");
        sc.Add(@"wwpbaseobjects\seclogin", "dll");
        sc.Add(@"wwpbaseobjects\secroleview", "dll");
        sc.Add(@"wwpbaseobjects\secrolegeneral", "dll");
        sc.Add(@"wwpbaseobjects\secrolesecfunctionalityrolewc", "dll");
        sc.Add(@"wwpbaseobjects\secrolesecuserrolewc", "dll");
        sc.Add(@"wwpbaseobjects\secuserprompt", "dll");
        sc.Add(@"wwpbaseobjects\secusergeneral", "dll");
        sc.Add(@"wwpbaseobjects\secusersecuserrolewc", "dll");
        sc.Add(@"wwpbaseobjects\secchangepassword", "dll");
        sc.Add(@"wwpbaseobjects\workwithplusmasterpage", "dll");
        sc.Add(@"br_encounterview", "dll");
        sc.Add(@"br_encounterww", "dll");
        sc.Add(@"br_encounterprompt", "dll");
        sc.Add(@"br_encountergeneral", "dll");
        sc.Add(@"br_informationww", "dll");
        sc.Add(@"br_informationprompt", "dll");
        sc.Add(@"br_informationgeneral", "dll");
        sc.Add(@"br_informationview", "dll");
        sc.Add(@"secuser_update", "dll");
        sc.Add(@"br_encounterupdate", "dll");
        sc.Add(@"br_encounterupdategeneral", "dll");
        sc.Add(@"br_encounterupdatebr_diagnosiswc", "dll");
        sc.Add(@"br_encounterupdatebr_labwc", "dll");
        sc.Add(@"br_encounterupdatebr_medicationwc", "dll");
        sc.Add(@"br_encounterupdatebr_procedurewc", "dll");
        sc.Add(@"xt_defindcodetypeview", "dll");
        sc.Add(@"xt_defindcodetypeww", "dll");
        sc.Add(@"xt_defindcodetypeprompt", "dll");
        sc.Add(@"xt_defindcodetypegeneral", "dll");
        sc.Add(@"xt_defindcodetypext_definecodewc", "dll");
        sc.Add(@"xt_definecodeview", "dll");
        sc.Add(@"xt_definecodeww", "dll");
        sc.Add(@"xt_definecodeprompt", "dll");
        sc.Add(@"xt_definecodegeneral", "dll");
        sc.Add(@"br_encounterupdatedemographics", "dll");
        sc.Add(@"br_demographicsww", "dll");
        sc.Add(@"br_demographicsprompt", "dll");
        sc.Add(@"br_demographicsgeneral", "dll");
        sc.Add(@"br_demographicsview", "dll");
        sc.Add(@"tabbedview", "dll");
        sc.Add(@"br_encounterupdatebehavior", "dll");
        sc.Add(@"br_encounterupdatecomorbidity", "dll");
        sc.Add(@"br_encounterupdatedeath", "dll");
        sc.Add(@"br_medicationupdate", "dll");
        sc.Add(@"br_procedureinsert", "dll");
        sc.Add(@"br_diagnosisww", "dll");
        sc.Add(@"br_diagnosisprompt", "dll");
        sc.Add(@"br_diagnosisgeneral", "dll");
        sc.Add(@"br_diagnosisview", "dll");
        sc.Add(@"br_labww", "dll");
        sc.Add(@"br_labprompt", "dll");
        sc.Add(@"br_labgeneral", "dll");
        sc.Add(@"br_labview", "dll");
        sc.Add(@"br_medicationww", "dll");
        sc.Add(@"br_medicationprompt", "dll");
        sc.Add(@"br_medicationgeneral", "dll");
        sc.Add(@"br_medicationview", "dll");
        sc.Add(@"br_procedureww", "dll");
        sc.Add(@"br_procedureprompt", "dll");
        sc.Add(@"br_proceduregeneral", "dll");
        sc.Add(@"br_procedureview", "dll");
        sc.Add(@"br_encountercheck", "dll");
        sc.Add(@"br_encountercheckgeneral", "dll");
        sc.Add(@"br_encountercheckdemographics", "dll");
        sc.Add(@"br_encountercheckbehavior", "dll");
        sc.Add(@"br_encountercheckcomorbidity", "dll");
        sc.Add(@"br_encountercheckdeath", "dll");
        sc.Add(@"br_encountercheckbr_diagnosiswc", "dll");
        sc.Add(@"br_encountercheckbr_labwc", "dll");
        sc.Add(@"br_encountercheckbr_medicationwc", "dll");
        sc.Add(@"br_encountercheckbr_procedurewc", "dll");
        sc.Add(@"wwpbaseobjects\secrolesecuserroleassociationww", "dll");
        sc.Add(@"wwpbaseobjects\secfunctionalitysecfunctionalityroleassociation", "dll");
        sc.Add(@"wwpbaseobjects\secuserjc_providersecuserassociation", "dll");
        sc.Add(@"jc_selectprovider", "dll");
        sc.Add(@"br_encountertab", "dll");
        sc.Add(@"br_encounterdetail", "dll");
        sc.Add(@"xt_logview", "dll");
        sc.Add(@"xt_logww", "dll");
        sc.Add(@"xt_logprompt", "dll");
        sc.Add(@"xt_loggeneral", "dll");
        sc.Add(@"br_medicalimaging_diagview", "dll");
        sc.Add(@"br_medicalimaging_diagww", "dll");
        sc.Add(@"br_medicalimaging_diaggeneral", "dll");
        sc.Add(@"br_medicalimagingview", "dll");
        sc.Add(@"br_medicalimagingww", "dll");
        sc.Add(@"br_medicalimaginggeneral", "dll");
        sc.Add(@"br_medicalimagingbr_medicalimaging_diagwc", "dll");
        sc.Add(@"br_medication_detailview", "dll");
        sc.Add(@"br_medication_detailww", "dll");
        sc.Add(@"br_medication_detailgeneral", "dll");
        sc.Add(@"br_medication_schemeview", "dll");
        sc.Add(@"br_medication_schemeww", "dll");
        sc.Add(@"br_medication_schemegeneral", "dll");
        sc.Add(@"br_medication_schemebr_medication_detailwc", "dll");
        sc.Add(@"br_pathology_specimenview", "dll");
        sc.Add(@"br_pathology_specimenww", "dll");
        sc.Add(@"br_pathology_diagview", "dll");
        sc.Add(@"br_pathology_diagww", "dll");
        sc.Add(@"br_pathology_otherview", "dll");
        sc.Add(@"br_pathology_otherww", "dll");
        sc.Add(@"br_pathology_specimengeneral", "dll");
        sc.Add(@"br_pathology_diaggeneral", "dll");
        sc.Add(@"br_pathology_othergeneral", "dll");
        sc.Add(@"br_pathologyview", "dll");
        sc.Add(@"br_pathologyww", "dll");
        sc.Add(@"br_pathologygeneral", "dll");
        sc.Add(@"br_pathologybr_pathology_specimenwc", "dll");
        sc.Add(@"br_pathologybr_pathology_diagwc", "dll");
        sc.Add(@"br_pathologybr_pathology_otherwc", "dll");
        sc.Add(@"br_encounterupdatebr_medicalimagingwc", "dll");
        sc.Add(@"br_encounterupdatebr_pathologywc", "dll");
        sc.Add(@"br_encountercheckbr_medicalimagingwc", "dll");
        sc.Add(@"br_encountercheckbr_pathologywc", "dll");
        sc.Add(@"br_medicalimagingprompt", "dll");
        sc.Add(@"br_pathologyprompt", "dll");
        sc.Add(@"br_medicalimaging_diagprompt", "dll");
        sc.Add(@"br_pathology_specimenprompt", "dll");
        sc.Add(@"br_pathology_diagprompt", "dll");
        sc.Add(@"br_pathology_otherprompt", "dll");
        sc.Add(@"br_medication_schemeprompt", "dll");
        sc.Add(@"br_medication_detailprompt", "dll");
        sc.Add(@"br_labupdate", "dll");
        sc.Add(@"br_medication_schemeupdate", "dll");
        sc.Add(@"br_vitalview", "dll");
        sc.Add(@"br_vitalww", "dll");
        sc.Add(@"br_vitalgeneral", "dll");
        sc.Add(@"br_encounterupdatebr_vitalwc", "dll");
        sc.Add(@"br_encountercheckvitalwc", "dll");
        sc.Add(@"br_vitalprompt", "dll");
        sc.Add(@"br_procedurebr_procedure_surgerywc", "dll");
        sc.Add(@"br_procedurebr_procedure_radiowc", "dll");
        sc.Add(@"br_procedure_surgeryview", "dll");
        sc.Add(@"br_procedure_surgeryww", "dll");
        sc.Add(@"br_procedure_radioview", "dll");
        sc.Add(@"br_procedure_radioww", "dll");
        sc.Add(@"br_procedure_radiogeneral", "dll");
        sc.Add(@"br_procedure_surgerygeneral", "dll");
        sc.Add(@"br_procedure_radioprompt", "dll");
        sc.Add(@"br_procedure_surgeryprompt", "dll");
        sc.Add(@"br_schemeview", "dll");
        sc.Add(@"br_schemeww", "dll");
        sc.Add(@"br_schemeprompt", "dll");
        sc.Add(@"br_schemegeneral", "dll");
        sc.Add(@"br_scheme_br_scheme_medication", "dll");
        sc.Add(@"br_scheme_medicationview", "dll");
        sc.Add(@"br_scheme_medicationww", "dll");
        sc.Add(@"br_scheme_medicationgeneral", "dll");
        sc.Add(@"br_encounterupdatebr_schemewc", "dll");
        sc.Add(@"br_encountercheckbr_schemewc", "dll");
        sc.Add(@"br_schemeupdate", "dll");
        sc.Add(@"br_scheme_medicationprompt", "dll");
        sc.Add(@"br_informationoperate", "dll");
        sc.Add(@"br_medicalimaging_uploadimage", "dll");
        sc.Add(@"br_medicalshowupoloadimage", "dll");
        sc.Add(@"br_medicalqrcode", "dll");
        sc.Add(@"br_sduploadimage", "dll");
        sc.Add(@"br_uploadsuccessfully", "dll");
        sc.Add(@"xt_configview", "dll");
        sc.Add(@"xt_configww", "dll");
        sc.Add(@"xt_configgeneral", "dll");
        sc.Add(@"xt_configprompt", "dll");
        sc.Add(@"beizhu", "dll");
        sc.Add(@"br_pathology_otherdelete", "dll");
        sc.Add(@"br_encounterreasonview", "dll");
        sc.Add(@"br_encounterreasonww", "dll");
        sc.Add(@"br_encounterreasongeneral", "dll");
        sc.Add(@"br_enteringsubmit", "dll");
        sc.Add(@"br_encounterreasonprompt", "dll");
        sc.Add(@"br_scheme_medicationupdate", "dll");
        sc.Add(@"br_encounter_refusereasonview", "dll");
        sc.Add(@"br_encounter_refusereasonww", "dll");
        sc.Add(@"br_enteringsubmitdetail", "dll");
        sc.Add(@"br_encounter_refusereasonprompt", "dll");
        sc.Add(@"br_encounter_refusereasongeneral", "dll");
        sc.Add(@"br_enteringreaptcheck", "dll");
        sc.Add(@"wwpbaseobjects\datamanager_direct", "dll");
        sc.Add(@"wwpbaseobjects\seclogout", "dll");
        sc.Add(@"showcookie", "dll");
        sc.Add(@"br_choosetenent", "dll");
        sc.Add(@"xt_definecodeoperate", "dll");
        sc.Add(@"wwpbaseobjects\homeback", "dll");
        sc.Add(@"wwpbaseobjects\workwithplusmasterpagenu", "dll");
        sc.Add(@"wwpbaseobjects\workwithplusmasterpageap", "dll");
        sc.Add(@"wwpbaseobjects\notauthorized1", "dll");
        sc.Add(@"wwpbaseobjects\workwithplusmasterpageback", "dll");
        sc.Add(@"br_informationbr_patientreentityassociation", "dll");
        sc.Add(@"wwpbaseobjects\secloginback", "dll");
        sc.Add(@"test_getjwtnewtoken", "dll");
        sc.Add(@"xt_intialdefinecode", "dll");
        sc.Add(@"dmindex", "dll");
        sc.Add(@"br_informationbr_patientretenantassociation", "dll");
        sc.Add(@"sys_rolepermissionview", "dll");
        sc.Add(@"sys_rolepermissionww", "dll");
        sc.Add(@"sys_rolepermissiongeneral", "dll");
        sc.Add(@"sys_rolepermissionprompt", "dll");
        sc.Add(@"br_medicationpromptitl", "dll");
        sc.Add(@"jc_providerview", "dll");
        sc.Add(@"jc_providerww", "dll");
        sc.Add(@"jc_providerprompt", "dll");
        sc.Add(@"jc_providergeneral", "dll");
        sc.Add(@"jc_providerjc_providersecuserwc", "dll");
        sc.Add(@"jc_providerjc_provider_br_informationwc", "dll");
        sc.Add(@"br_diagnosisinsert", "dll");
        sc.Add(@"br_diagnosisupdate", "dll");
        sc.Add(@"br_diagnosisdelete", "dll");
        sc.Add(@"br_labinsert", "dll");
        sc.Add(@"br_labdelete", "dll");
        sc.Add(@"br_medicationinsert", "dll");
        sc.Add(@"br_procedureupdate", "dll");
        sc.Add(@"xt_definecodedelete", "dll");
        sc.Add(@"br_encounterinsert", "dll");
        sc.Add(@"br_medicalimaging_diaginsert", "dll");
        sc.Add(@"br_medicalimaging_diagupdate", "dll");
        sc.Add(@"br_medicalimaging_diagdelete", "dll");
        sc.Add(@"br_pathology_specimeninsert", "dll");
        sc.Add(@"br_pathology_specimenupdate", "dll");
        sc.Add(@"br_pathology_specimendelete", "dll");
        sc.Add(@"br_pathology_diaginsert", "dll");
        sc.Add(@"br_pathology_diagupdate", "dll");
        sc.Add(@"br_pathology_diagdelete", "dll");
        sc.Add(@"br_pathology_otherinsert", "dll");
        sc.Add(@"br_pathology_otherupdate", "dll");
        sc.Add(@"br_medicalimaginginsert", "dll");
        sc.Add(@"br_medicalimagingupdate", "dll");
        sc.Add(@"br_pathologyinsert", "dll");
        sc.Add(@"br_pathologyupdate", "dll");
        sc.Add(@"br_vitalinsert", "dll");
        sc.Add(@"br_vitalupdate", "dll");
        sc.Add(@"br_vitaldelete", "dll");
        sc.Add(@"br_procedure_surgeryinsert", "dll");
        sc.Add(@"br_procedure_surgeryupate", "dll");
        sc.Add(@"br_procedure_surgerydelete", "dll");
        sc.Add(@"br_procedure_radioinsert", "dll");
        sc.Add(@"br_procedure_radioupdate", "dll");
        sc.Add(@"br_procedure_radiodelete", "dll");
        sc.Add(@"br_scheminsert", "dll");
        sc.Add(@"br_informationlist", "dll");
        sc.Add(@"dashboardnotauthorized", "dll");
        sc.Add(@"wwpbaseobjects\workwithplusmasterpagedm", "dll");
        sc.Add(@"dmnotauthorized", "dll");
        sc.Add(@"webpanel1", "dll");
        sc.Add(@"webpanel2", "dll");
        sc.Add(@"br_encounterinsertn", "dll");
        sc.Add(@"webpanel3", "dll");
        sc.Add(@"br_encounterlist", "dll");
        sc.Add(@"br_encounterupdatefamilyhistory", "dll");
        sc.Add(@"br_encounterlistww", "dll");
        sc.Add(@"br_encountercheckfamilyhistory", "dll");
        sc.Add(@"wwpbaseobjects\secfunctionality", "dll");
        sc.Add(@"wwpbaseobjects\secfunctionalityrole", "dll");
        sc.Add(@"wwpbaseobjects\secobject", "dll");
        sc.Add(@"wwpbaseobjects\secrole", "dll");
        sc.Add(@"wwpbaseobjects\secuser", "dll");
        sc.Add(@"wwpbaseobjects\secuserrole", "dll");
        sc.Add(@"wwpbaseobjects\usercustomizations", "dll");
        sc.Add(@"br_behavior", "dll");
        sc.Add(@"br_comorbidity", "dll");
        sc.Add(@"br_death", "dll");
        sc.Add(@"br_demographics", "dll");
        sc.Add(@"br_diagnosis", "dll");
        sc.Add(@"br_encounter", "dll");
        sc.Add(@"br_information", "dll");
        sc.Add(@"br_lab", "dll");
        sc.Add(@"br_medication", "dll");
        sc.Add(@"br_procedure", "dll");
        sc.Add(@"br_vital", "dll");
        sc.Add(@"jc_provider", "dll");
        sc.Add(@"xt_defindcodetype", "dll");
        sc.Add(@"xt_definecode", "dll");
        sc.Add(@"xt_log", "dll");
        sc.Add(@"jc_providersecuser", "dll");
        sc.Add(@"xt_config", "dll");
        sc.Add(@"jc_provider_br_information", "dll");
        sc.Add(@"br_medicalimaging_diag", "dll");
        sc.Add(@"br_medicalimaging", "dll");
        sc.Add(@"br_medication_detail", "dll");
        sc.Add(@"br_medication_scheme", "dll");
        sc.Add(@"br_pathology_specimen", "dll");
        sc.Add(@"br_pathology_diag", "dll");
        sc.Add(@"br_pathology_other", "dll");
        sc.Add(@"br_pathology", "dll");
        sc.Add(@"br_procedure_surgery", "dll");
        sc.Add(@"br_procedure_radio", "dll");
        sc.Add(@"br_scheme", "dll");
        sc.Add(@"br_scheme_medication", "dll");
        sc.Add(@"br_encounterreason", "dll");
        sc.Add(@"br_encounter_refusereason", "dll");
        sc.Add(@"sys_userrole", "dll");
        sc.Add(@"sys_serialnumber", "dll");
        sc.Add(@"sys_tenantuser", "dll");
        sc.Add(@"sys_permission", "dll");
        sc.Add(@"sys_tenantuseraccess", "dll");
        sc.Add(@"sys_database", "dll");
        sc.Add(@"sys_instituteuser", "dll");
        sc.Add(@"sys_user", "dll");
        sc.Add(@"sys_instituteuserrole", "dll");
        sc.Add(@"bas_tenant", "dll");
        sc.Add(@"sys_rolepermission", "dll");
        sc.Add(@"sys_role", "dll");
        sc.Add(@"bas_datapackage", "dll");
        sc.Add(@"sys_tenantuserrole", "dll");
        sc.Add(@"bas_institute", "dll");
        sc.Add(@"sys_log", "dll");
        sc.Add(@"br_patientretenant", "dll");
        sc.Add(@"br_patientreentity", "dll");
        sc.Add(@"view_lastest_patient_info", "dll");
        sc.Add(@"view_new_encounter", "dll");
        sc.Add(@"br_familyhistory", "dll");
        sc.Add(@"view_new_encounter2", "dll");
        return(sc);
    }
Example #30
0
 public static void Target(string name, IEnumerable <string> dependsOn) =>
 targets.Add(new Target(name, dependsOn));
Example #31
0
    public async Task <int> OnExecuteAsync()
    {
        Exception error = default;

        try
        {
            NeedMono             = !RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
            TestFlagsNonParallel = "-parallel none -maxthreads 1 ";
            // TestFlagsNonParallel = "-parallel none -maxthreads 1 -preenumeratetheories ";
            TestFlagsParallel = "";

            // Find the folder with the solution file
            BaseFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            while (true)
            {
                if (Directory.Exists(Path.Combine(BaseFolder, ".git")))
                {
                    break;
                }

                BaseFolder = Path.GetDirectoryName(BaseFolder);
                if (BaseFolder == null)
                {
                    throw new InvalidOperationException("Could not locate a solution file in the directory hierarchy");
                }
            }

            ConsoleRunnerExe   = Path.Combine(BaseFolder, "src", "xunit.v3.runner.console", "bin", ConfigurationText, "net472", "merged", "xunit.v3.runner.console.exe");
            ConsoleRunner32Exe = Path.Combine(BaseFolder, "src", "xunit.v3.runner.console", "bin", ConfigurationText + "_x86", "net472", "merged", "xunit.v3.runner.console.x86.exe");

            // Dependent folders
            PackageOutputFolder = Path.Combine(BaseFolder, "artifacts", "packages");
            Directory.CreateDirectory(PackageOutputFolder);

            TestOutputFolder = Path.Combine(BaseFolder, "artifacts", "test");
            Directory.CreateDirectory(TestOutputFolder);

            // Parse the targets
            var targetNames = Targets.Select(x => x.ToString()).ToList();

            // Turn off test parallelization in CI, for more repeatable test timing
            if (Targets.Contains(BuildTarget.CI))
            {
                TestFlagsParallel = TestFlagsNonParallel;
            }

            // Find target classes
            var targetCollection = new TargetCollection();
            var targets
                = Assembly.GetExecutingAssembly()
                  .ExportedTypes
                  .Select(x => new { type = x, attr = x.GetCustomAttribute <TargetAttribute>() })
                  .Where(x => x.attr != null);

            foreach (var target in targets)
            {
                var method = target.type.GetRuntimeMethod("OnExecute", new[] { typeof(BuildContext) });

                if (method == null)
                {
                    targetCollection.Add(new Target(target.attr.TargetName, target.attr.DependentTargets));
                }
                else
                {
                    targetCollection.Add(new ActionTarget(target.attr.TargetName, target.attr.DependentTargets, async() =>
                    {
                        var sw = Stopwatch.StartNew();

                        try
                        {
                            await(Task) method.Invoke(null, new[] { this });
                        }
                        finally
                        {
                            if (Timing)
                            {
                                WriteLineColor(ConsoleColor.Cyan, $"TIMING: Target '{target.attr.TargetName}' took {sw.Elapsed}{Environment.NewLine}");
                            }
                        }
                    }));
                }
            }

            var swTotal = Stopwatch.StartNew();

            // Let Bullseye run the target(s)
            await targetCollection.RunAsync(targetNames, SkipDependencies, dryRun : false, parallel : false, new NullLogger(), _ => false);

            WriteLineColor(ConsoleColor.Green, $"==> Build success! <=={Environment.NewLine}");

            if (Timing)
            {
                WriteLineColor(ConsoleColor.Cyan, $"TIMING: Build took {swTotal.Elapsed}{Environment.NewLine}");
            }

            return(0);
        }
        catch (Exception ex)
        {
            error = ex;
            while (error is TargetInvocationException || error is TargetFailedException)
            {
                error = error.InnerException;
            }
        }

        Console.WriteLine();

        if (error is NonZeroExitCodeException nonZeroExit)
        {
            WriteLineColor(ConsoleColor.Red, "==> Build failed! <==");
            return(nonZeroExit.ExitCode);
        }

        WriteLineColor(ConsoleColor.Red, $"==> Build failed! An unhandled exception was thrown <==");
        Console.WriteLine(error.ToString());
        return(-1);
    }