Beispiel #1
0
        public override void SetBaseMChessOptionsForTestExecution(AppTasks.RunMChessBasedTestTask runTestTask, MChessOptions opts)
        {
            base.SetBaseMChessOptionsForTestExecution(runTestTask, opts);

            // Enable data race detection
            opts.EnableRaceDetection = true;
            opts.MaxExecs            = 20;
        }
        /// <summary>
        /// Sets up the base <see cref="MChessOptions"/> instance for a fresh run of this test.
        /// This is the part that usually differentiate tests using MChess from each other.
        /// </summary>
        /// <returns></returns>
        public virtual void SetBaseMChessOptionsForTestExecution(AppTasks.RunMChessBasedTestTask runTestTask, MChessOptions opts)
        {
            // Look to see if the test defines an MChessOptions element
            var xopts = DataElement.Element(XChessNames.MChessOptions);

            if (xopts != null)
            {
                var testOpts = new MChessOptions(xopts);
                opts.MergeWith(testOpts);
            }
        }
Beispiel #3
0
        public override void SetBaseMChessOptionsForTestExecution(AppTasks.RunMChessBasedTestTask runTestTask, MChessOptions opts)
        {
            base.SetBaseMChessOptionsForTestExecution(runTestTask, opts);

            opts.EnumerateObservations = true;
            opts.ObservationMode       = Granularity.ToChessObservationMode();

            string contextName = runTestTask.TestContext.Name;
            string obsFileName = ComposeObservationFilename(OwningTestMethod, FileIdentity, contextName, runTestTask.TestArgs);

            opts.ObservationFile = obsFileName;
        }
Beispiel #4
0
        public override void SetBaseMChessOptionsForTestExecution(AppTasks.RunMChessBasedTestTask runTestTask, MChessOptions opts)
        {
            base.SetBaseMChessOptionsForTestExecution(runTestTask, opts);

            opts.CheckObservations = true;
            opts.ObservationMode   = CheckingMode.ToChessObservationMode();

            string fileIdentity = ResolveFileIdentity();
            string contextName  = runTestTask.TestContext.Name;
            string obsFileName  = ObservationGeneratorEntity.ComposeObservationFilename(OwningTestMethod, fileIdentity, contextName, runTestTask.TestArgs);

            opts.ObservationFile = obsFileName;
        }
Beispiel #5
0
        public override void SetBaseMChessOptionsForTestExecution(AppTasks.RunMChessBasedTestTask runTestTask, MChessOptions opts)
        {
            base.SetBaseMChessOptionsForTestExecution(runTestTask, opts);

            opts.EnableDeterminismChecking = true;
        }