Пример #1
0
        public RunDeviceTask(MSBuildTask build_task, IEnumerable <IHardwareDevice> candidates)
            : base(build_task, candidates.OrderBy((v) => v.DebugSpeed))
        {
            switch (build_task.Platform)
            {
            case TestPlatform.iOS:
            case TestPlatform.iOS_Unified:
            case TestPlatform.iOS_Unified32:
            case TestPlatform.iOS_Unified64:
                AppRunnerTarget = AppRunnerTarget.Device_iOS;
                break;

            case TestPlatform.iOS_TodayExtension64:
                AppRunnerTarget = AppRunnerTarget.Device_iOS;
                break;

            case TestPlatform.tvOS:
                AppRunnerTarget = AppRunnerTarget.Device_tvOS;
                break;

            case TestPlatform.watchOS:
            case TestPlatform.watchOS_32:
            case TestPlatform.watchOS_64_32:
                AppRunnerTarget = AppRunnerTarget.Device_watchOS;
                break;

            default:
                throw new NotImplementedException();
            }
        }
Пример #2
0
        public RunDeviceTask(IHardwareDeviceLoader devices, MSBuildTask build_task, IProcessManager ProcessManager, IEnumerable <IHardwareDevice> candidates)
            : base(build_task, ProcessManager, candidates.OrderBy((v) => v.DebugSpeed))
        {
            switch (build_task.Platform)
            {
            case TestPlatform.iOS:
            case TestPlatform.iOS_Unified:
            case TestPlatform.iOS_Unified32:
            case TestPlatform.iOS_Unified64:
                AppRunnerTarget = TestTarget.Device_iOS;
                break;

            case TestPlatform.iOS_TodayExtension64:
                AppRunnerTarget = TestTarget.Device_iOS;
                break;

            case TestPlatform.tvOS:
                AppRunnerTarget = TestTarget.Device_tvOS;
                break;

            case TestPlatform.watchOS:
            case TestPlatform.watchOS_32:
            case TestPlatform.watchOS_64_32:
                AppRunnerTarget = TestTarget.Device_watchOS;
                break;

            default:
                throw new NotImplementedException();
            }

            this.devices = devices ?? throw new ArgumentNullException(nameof(devices));
        }
Пример #3
0
 public RunDeviceTask(Jenkins jenkins, IHardwareDeviceLoader devices, MSBuildTask buildTask, IProcessManager processManager, IEnumerable <IHardwareDevice> candidates)
     : base(jenkins, buildTask, processManager, candidates.OrderBy((v) => v.DebugSpeed))
 {
     runDevice = new RunDevice(
         testTask: this,
         devices: devices,
         resourceManager: Jenkins,
         mainLog: Jenkins.MainLog,
         deviceLoadLog: Jenkins.DeviceLoadLog,
         defaultLogDirectory: Jenkins.Harness.LogDirectory,
         uninstallTestApp: Jenkins.UninstallTestApp,
         cleanSuccessfulTestRuns: Jenkins.CleanSuccessfulTestRuns,
         generateXmlFailures: Jenkins.Harness.InCI,
         inCI: Jenkins.Harness.InCI,
         xmlResultJargon: Jenkins.Harness.XmlJargon
         );
 }
Пример #4
0
        public RunSimulatorTask(MSBuildTask build_task, IEnumerable <ISimulatorDevice> candidates = null)
            : base(build_task, candidates)
        {
            var project = Path.GetFileNameWithoutExtension(ProjectFile);

            if (project.EndsWith("-tvos", StringComparison.Ordinal))
            {
                AppRunnerTarget = AppRunnerTarget.Simulator_tvOS;
            }
            else if (project.EndsWith("-watchos", StringComparison.Ordinal))
            {
                AppRunnerTarget = AppRunnerTarget.Simulator_watchOS;
            }
            else
            {
                AppRunnerTarget = AppRunnerTarget.Simulator_iOS;
            }
        }
Пример #5
0
        public RunSimulatorTask(ISimulatorLoader simulators, MSBuildTask build_task, IProcessManager ProcessManager, IEnumerable <ISimulatorDevice> candidates = null)
            : base(build_task, ProcessManager, candidates)
        {
            var project = Path.GetFileNameWithoutExtension(ProjectFile);

            if (project.EndsWith("-tvos", StringComparison.Ordinal))
            {
                AppRunnerTarget = TestTarget.Simulator_tvOS;
            }
            else if (project.EndsWith("-watchos", StringComparison.Ordinal))
            {
                AppRunnerTarget = TestTarget.Simulator_watchOS;
            }
            else
            {
                AppRunnerTarget = TestTarget.Simulator_iOS;
            }

            this.simulators = simulators ?? throw new ArgumentNullException(nameof(simulators));
        }
Пример #6
0
 public RunDeviceTask(Jenkins jenkins, IHardwareDeviceLoader devices, MSBuildTask buildTask, IMlaunchProcessManager processManager, ITunnelBore tunnelBore, IErrorKnowledgeBase errorKnowledgeBase, bool useTcpTunnel, IEnumerable <IHardwareDevice> candidates)
     : base(jenkins, buildTask, processManager, candidates.OrderBy((v) => v.DebugSpeed))
 {
     TunnelBore = tunnelBore;
     runDevice  = new RunDevice(
         testTask: this,
         devices: devices,
         resourceManager: ResourceManager,
         mainLog: Jenkins.MainLog,
         deviceLoadLog: Jenkins.DeviceLoadLog,
         errorKnowledgeBase: errorKnowledgeBase,
         defaultLogDirectory: Jenkins.Harness.LogDirectory,
         uninstallTestApp: Jenkins.UninstallTestApp,
         cleanSuccessfulTestRuns: Jenkins.CleanSuccessfulTestRuns,
         generateXmlFailures: Jenkins.Harness.InCI,
         inCI: Jenkins.Harness.InCI,
         useTcpTunnel: useTcpTunnel,
         xmlResultJargon: Jenkins.Harness.XmlJargon
         );
 }
Пример #7
0
 public RunSimulatorTask(Jenkins jenkins, ISimulatorLoader simulators, MSBuildTask buildTask, IMlaunchProcessManager processManager, IEnumerable <ISimulatorDevice> candidates = null)
     : base(jenkins, buildTask, processManager, candidates) => runSimulator = new RunSimulator(
Пример #8
0
 public DotNetTestTask(Jenkins jenkins, MSBuildTask build_task, IMlaunchProcessManager processManager)
     : base(jenkins, build_task, processManager)
 {
     MSBuildTask.SetDotNetEnvironmentVariables(Environment);
 }