Esempio n. 1
0
        public GallioTestRunner(IFacadeTaskServer facadeTaskServer, IFacadeLogger facadeLogger, 
            FacadeTaskExecutorConfiguration facadeTaskExecutorConfiguration)
        {
            this.facadeTaskServer = facadeTaskServer;
            this.facadeLogger = facadeLogger;
            this.facadeTaskExecutorConfiguration = facadeTaskExecutorConfiguration;
            sessionId = facadeTaskServer.SessionId;

            assemblyLocations = new HashSetOfString();
            testTasks = new Dictionary<string, GallioTestItemTask>();
            testMonitors = new Dictionary<string, TestMonitor>();
            explicitTestIds = new HashSetOfString();
        }
        public FacadeTaskResult Execute(IFacadeTaskServer facadeTaskServer, IFacadeLogger facadeLogger, FacadeTask facadeTask, FacadeTaskExecutorConfiguration facadeTaskExecutorConfiguration)
        {
            ILogger logger = new FacadeLoggerWrapper(facadeLogger);
            try
            {
                RuntimeAccessor.Instance.AddLogListener(logger);

                return facadeTask.Execute(facadeTaskServer, facadeLogger, facadeTaskExecutorConfiguration);
            }
            finally
            {
                RuntimeAccessor.Instance.RemoveLogListener(logger);
            }
        }
Esempio n. 3
0
        sealed public override void ExecuteRecursive(TaskExecutionNode node)
        {
            AdapterFacadeTaskServer facadeTaskServer = new AdapterFacadeTaskServer(Server);
            AdapterFacadeLogger facadeLogger = new AdapterFacadeLogger();

            FacadeTaskExecutorConfiguration facadeTaskExecutorConfiguration = new FacadeTaskExecutorConfiguration()
            {
                ShadowCopy = TaskExecutor.Configuration.ShadowCopy,
                AssemblyFolder = TaskExecutor.Configuration.AssemblyFolder
            };

            FacadeTask facadeTask = facadeTaskServer.MapTasks(node);
            executeResult = FacadeUtils.ToTaskResult(Execute(facadeTaskServer, facadeLogger, facadeTask, facadeTaskExecutorConfiguration));
        }
Esempio n. 4
0
        sealed public override void ExecuteRecursive(TaskExecutionNode node)
        {
            AdapterFacadeTaskServer facadeTaskServer = new AdapterFacadeTaskServer(Server);
            AdapterFacadeLogger     facadeLogger     = new AdapterFacadeLogger();

            FacadeTaskExecutorConfiguration facadeTaskExecutorConfiguration = new FacadeTaskExecutorConfiguration()
            {
                ShadowCopy     = TaskExecutor.Configuration.ShadowCopy,
                AssemblyFolder = TaskExecutor.Configuration.AssemblyFolder
            };

            FacadeTask facadeTask = facadeTaskServer.MapTasks(node);

            executeResult = FacadeUtils.ToTaskResult(Execute(facadeTaskServer, facadeLogger, facadeTask, facadeTaskExecutorConfiguration));
        }
Esempio n. 5
0
 /// <summary>
 /// Executes the task and its children recursively.
 /// </summary>
 /// <param name="facadeTaskServer">The task server.</param>
 /// <param name="facadeLogger">The logger.</param>
 /// <param name="facadeTaskExecutorConfiguration">The task executor configuration.</param>
 /// <returns>The task result.</returns>
 public virtual FacadeTaskResult Execute(IFacadeTaskServer facadeTaskServer, IFacadeLogger facadeLogger, FacadeTaskExecutorConfiguration facadeTaskExecutorConfiguration)
 {
     throw new NotSupportedException("This task is not executable.");
 }
Esempio n. 6
0
        protected virtual FacadeTaskResult Execute(IFacadeTaskServer facadeTaskServer, IFacadeLogger facadeLogger, FacadeTask facadeTask, FacadeTaskExecutorConfiguration facadeTaskExecutorConfiguration)
        {
            IIsolatedEnvironment environment = SharedEnvironmentManager.GetSharedEnvironment();

            Type taskRunnerType = typeof(RemoteFacadeTaskRunner);
            IRemoteFacadeTaskRunner taskRunner = (IRemoteFacadeTaskRunner)environment.AppDomain.CreateInstanceAndUnwrap(
                taskRunnerType.Assembly.FullName, taskRunnerType.FullName);

            return(taskRunner.Execute(facadeTaskServer, facadeLogger, facadeTask, facadeTaskExecutorConfiguration));
        }
Esempio n. 7
0
 /// <summary>
 /// Executes the task and its children recursively.
 /// </summary>
 /// <param name="facadeTaskServer">The task server.</param>
 /// <param name="facadeLogger">The logger.</param>
 /// <param name="facadeTaskExecutorConfiguration">The task executor configuration.</param>
 /// <returns>The task result.</returns>
 public virtual FacadeTaskResult Execute(IFacadeTaskServer facadeTaskServer, IFacadeLogger facadeLogger, FacadeTaskExecutorConfiguration facadeTaskExecutorConfiguration)
 {
     throw new NotSupportedException("This task is not executable.");
 }
        public FacadeTaskResult Execute(IFacadeTaskServer facadeTaskServer, IFacadeLogger facadeLogger, FacadeTask facadeTask, FacadeTaskExecutorConfiguration facadeTaskExecutorConfiguration)
        {
            ILogger logger = new FacadeLoggerWrapper(facadeLogger);

            try
            {
                RuntimeAccessor.Instance.AddLogListener(logger);

                return(facadeTask.Execute(facadeTaskServer, facadeLogger, facadeTaskExecutorConfiguration));
            }
            finally
            {
                RuntimeAccessor.Instance.RemoveLogListener(logger);
            }
        }
Esempio n. 9
0
        protected virtual FacadeTaskResult Execute(IFacadeTaskServer facadeTaskServer, IFacadeLogger facadeLogger, FacadeTask facadeTask, FacadeTaskExecutorConfiguration facadeTaskExecutorConfiguration)
        {
            IIsolatedEnvironment environment = SharedEnvironmentManager.GetSharedEnvironment();

            Type taskRunnerType = typeof(RemoteFacadeTaskRunner);
            IRemoteFacadeTaskRunner taskRunner = (IRemoteFacadeTaskRunner)environment.AppDomain.CreateInstanceAndUnwrap(
                taskRunnerType.Assembly.FullName, taskRunnerType.FullName);

            return taskRunner.Execute(facadeTaskServer, facadeLogger, facadeTask, facadeTaskExecutorConfiguration);
        }