Beispiel #1
0
        public static Collection <FileInfo> RemoveNonReproducibleErrors(Collection <FileInfo> partitionedTests)
        {
            Collection <FileInfo> reproducibleTests = new Collection <FileInfo>();

            foreach (FileInfo test in partitionedTests)
            {
                TestCase testCase = new TestCase(test);

                // Don't attempt to reproduce non-error-revealing tests (to save time).
                if (!IsErrorRevealing(testCase))
                {
                    reproducibleTests.Add(test);
                    continue;
                }

                TestCase.RunResults runResults = testCase.RunExternal();
                if (runResults.behaviorReproduced)
                {
                    reproducibleTests.Add(test);
                }
                else
                {
                    if (!runResults.compilationSuccessful)
                    {
                        //Logger.Debug("@@@COMPILATIONFAILED:");
                        //foreach (CompilerError err in runResults.compilerErrors)
                        //    Logger.Debug("@@@" + err);
                    }
                    test.Delete();
                }
            }
            return(reproducibleTests);
        }
Beispiel #2
0
        private static bool Reproduce(FileInfo oneTest)
        {
            TestCase test = new TestCase(oneTest);

            TestCase.RunResults results = test.RunExternal();
            if (results.behaviorReproduced)
            {
                return(true);
            }
            return(false);
        }