Beispiel #1
0
        void ConfigureMac()
        {
            var classic_targets           = new List <MacClassicTarget> ();
            var unified_targets           = new List <MacUnifiedTarget> ();
            var hardcoded_unified_targets = new List <MacUnifiedTarget> ();

            RootDirectory = Path.GetFullPath(RootDirectory).TrimEnd('/');

            if (AutoConf)
            {
                AutoConfigureMac();
            }

            CreateBCLProjects();

            foreach (var file in TestProjects)
            {
                if (!File.Exists(file))
                {
                    throw new FileNotFoundException(file);
                }

                var unifiedMobile = new MacUnifiedTarget(true)
                {
                    TemplateProjectPath = file,
                    Harness             = this,
                };
                unifiedMobile.Execute();
                unified_targets.Add(unifiedMobile);

                var unifiedXM45 = new MacUnifiedTarget(false)
                {
                    TemplateProjectPath = file,
                    Harness             = this,
                };
                unifiedXM45.Execute();
                unified_targets.Add(unifiedXM45);

                var classic = new MacClassicTarget()
                {
                    TemplateProjectPath = file,
                    Harness             = this,
                };
                classic.Execute();
                classic_targets.Add(classic);
            }

            foreach (var file in HardCodedTestProjects)
            {
                var unifiedMobile = new MacUnifiedTarget(true, true)
                {
                    TemplateProjectPath = file,
                    Harness             = this,
                };
                unifiedMobile.Execute();
                hardcoded_unified_targets.Add(unifiedMobile);
            }

            MakefileGenerator.CreateMacMakefile(this, classic_targets.Union <MacTarget> (unified_targets).Union(hardcoded_unified_targets));
        }
Beispiel #2
0
        void ConfigureMac()
        {
            var classic_targets           = new List <MacClassicTarget> ();
            var unified_targets           = new List <MacUnifiedTarget> ();
            var hardcoded_unified_targets = new List <MacUnifiedTarget> ();

            Action <MacTarget, string, bool> configureTarget = (MacTarget target, string file, bool isNUnitProject) => {
                target.TemplateProjectPath = file;
                target.Harness             = this;
                target.IsNUnitProject      = isNUnitProject;
                target.Execute();
            };

            RootDirectory = Path.GetFullPath(RootDirectory).TrimEnd('/');

            if (AutoConf)
            {
                AutoConfigureMac();
            }

            foreach (var bclTestInfo in MacTestProjects.Where(x => x.BCLInfo != null).Select(x => x.BCLInfo))
            {
                bclTestInfo.Convert();
            }

            foreach (var proj in MacTestProjects.Where((v) => v.GenerateVariations))
            {
                var file = Path.ChangeExtension(proj.Path, "csproj");
                if (!File.Exists(file))
                {
                    throw new FileNotFoundException(file);
                }

                foreach (bool thirtyTwoBit in new bool[] { false, true })
                {
                    if (proj.GenerateModern)
                    {
                        var modern = new MacUnifiedTarget(true, thirtyTwoBit);
                        configureTarget(modern, file, proj.IsNUnitProject);
                        unified_targets.Add(modern);
                    }

                    if (proj.GenerateFull)
                    {
                        var full = new MacUnifiedTarget(false, thirtyTwoBit);
                        configureTarget(full, file, proj.IsNUnitProject);
                        unified_targets.Add(full);
                    }
                }

                if (proj.GenerateSystem)
                {
                    var system = new MacUnifiedTarget(false, false);
                    system.System = true;
                    configureTarget(system, file, proj.IsNUnitProject);
                    unified_targets.Add(system);
                }

                var classic = new MacClassicTarget();
                configureTarget(classic, file, false);
                classic_targets.Add(classic);
            }

            foreach (var proj in MacTestProjects.Where(v => !v.GenerateVariations))
            {
                var file    = proj.Path;
                var unified = new MacUnifiedTarget(proj.GenerateModern, thirtyTwoBit: false, shouldSkipProjectGeneration: true);
                unified.BCLInfo = proj.BCLInfo;
                configureTarget(unified, file, proj.IsNUnitProject);
                hardcoded_unified_targets.Add(unified);
            }

            MakefileGenerator.CreateMacMakefile(this, classic_targets.Union <MacTarget> (unified_targets).Union(hardcoded_unified_targets));
        }
Beispiel #3
0
        void ConfigureMac()
        {
            var classic_targets           = new List <MacClassicTarget> ();
            var unified_targets           = new List <MacUnifiedTarget> ();
            var hardcoded_unified_targets = new List <MacUnifiedTarget> ();

            RootDirectory = Path.GetFullPath(RootDirectory).TrimEnd('/');

            if (AutoConf)
            {
                AutoConfigureMac();
            }

            foreach (var proj in MacBclTests)
            {
                proj.Convert(this);
            }

            foreach (var proj in MacTestProjects.Where((v) => v.GenerateVariations))
            {
                var file = proj.Path;
                if (!File.Exists(file))
                {
                    throw new FileNotFoundException(file);
                }

                foreach (bool thirtyTwoBit in new bool[] { false, true })
                {
                    var unifiedMobile = new MacUnifiedTarget(true, thirtyTwoBit)
                    {
                        TemplateProjectPath = file,
                        Harness             = this,
                    };
                    unifiedMobile.Execute();
                    unified_targets.Add(unifiedMobile);

                    if (!proj.SkipXMVariations)
                    {
                        var unifiedXM45 = new MacUnifiedTarget(false, thirtyTwoBit)
                        {
                            TemplateProjectPath = file,
                            Harness             = this,
                        };
                        unifiedXM45.Execute();
                        unified_targets.Add(unifiedXM45);
                    }
                }

                var classic = new MacClassicTarget()
                {
                    TemplateProjectPath = file,
                    Harness             = this,
                };
                classic.Execute();
                classic_targets.Add(classic);
            }

            foreach (var proj in MacTestProjects.Where((v) => !v.GenerateVariations))
            {
                var file          = proj.Path;
                var unifiedMobile = new MacUnifiedTarget(true, false, true)
                {
                    TemplateProjectPath = file,
                    Harness             = this,
                };
                unifiedMobile.Execute();
                hardcoded_unified_targets.Add(unifiedMobile);
            }

            MakefileGenerator.CreateMacMakefile(this, classic_targets.Union <MacTarget> (unified_targets).Union(hardcoded_unified_targets));
        }