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); }
public static int Minimize(FileInfo testPath) { TestCase testFile = new TestCase(testPath); testFile.WriteToFile(testPath + ".nonmin"); int linesRemoved = 0; // Logger.Debug(testFile); for (int linePos = testFile.NumTestLines - 1; linePos >= 0; linePos--) { string oldLine = testFile.RemoveLine(linePos); if (!testFile.RunExternal().behaviorReproduced) { testFile.AddLine(linePos, oldLine); } else { linesRemoved++; } } testFile.WriteToFile(testPath); return(linesRemoved); }
private static bool Reproduce(FileInfo oneTest) { TestCase test = new TestCase(oneTest); TestCase.RunResults results = test.RunExternal(); if (results.behaviorReproduced) return true; return false; }
private static bool Reproduce(FileInfo oneTest) { TestCase test = new TestCase(oneTest); TestCase.RunResults results = test.RunExternal(); if (results.behaviorReproduced) { return(true); } return(false); }
public static int Minimize(FileInfo testPath) { TestCase testFile = new TestCase(testPath); testFile.WriteToFile(testPath + ".nonmin", false); int linesRemoved = 0; // Console.WriteLine(testFile); for (int linePos = testFile.NumTestLines - 1; linePos >= 0; linePos--) { string oldLine = testFile.RemoveLine(linePos); if (!testFile.RunExternal().behaviorReproduced) { testFile.AddLine(linePos, oldLine); } else { linesRemoved++; } } testFile.WriteToFile(testPath, false); return linesRemoved; }
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) { //Console.WriteLine("@@@COMPILATIONFAILED:"); //foreach (CompilerError err in runResults.compilerErrors) // Console.WriteLine("@@@" + err); } test.Delete(); } } return reproducibleTests; }