135 references to FileTrackerTestHelper
Microsoft.Build.Utilities.UnitTests (135)
TrackedDependencies\FileTrackerTests.cs (135)
92FileTrackerTestHelper.CleanTlogs(); 99int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, ""); 109int exit = FileTrackerTestHelper.RunCommandWithLog(s_defaultTrackerPath, "/q", out string log); 135int exit = FileTrackerTestHelper.RunCommandWithLog(testTrackerPath, "/?", out string log); 157FileTrackerTestHelper.WriteAll("test.in", "foo"); 159int exit = FileTrackerTestHelper.RunCommandWithLog(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " @abc.rsp /c findstr /ip foo test.in", out string log); 164FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 176int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath); 189FileTrackerTestHelper.WriteAll("test.in", "foo"); 193int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, trackerCommand); 196FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), tlog); 200exit = FileTrackerTestHelper.RunCommandWithLog(s_defaultTrackerPath, trackerCommand, out string log); 218FileTrackerTestHelper.WriteAll("test.in", "foo"); 220int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /c findstr /ip foo test.in"); 223FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 232FileTrackerTestHelper.WriteAll("test.in", "foo"); 234int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /o /c findstr /ip foo test.in"); 239bool foundW = FileTrackerTestHelper.FindStringInTlog("CreateFileW, Desired Access=0x80000000, Creation Disposition=0x3:" + Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 240bool foundA = FileTrackerTestHelper.FindStringInTlog("CreateFileA, Desired Access=0x80000000, Creation Disposition=0x3:" + Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 250FileTrackerTestHelper.WriteAll("test.in", "foo"); 252int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /o /e /c findstr /ip foo test.in"); 257bool foundGetFileAttributesW = FileTrackerTestHelper.FindStringInTlog("GetFileAttributesW:" + Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 258bool foundGetFileAttributesA = FileTrackerTestHelper.FindStringInTlog("GetFileAttributesA:" + Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 262bool foundCreateFileW = FileTrackerTestHelper.FindStringInTlog("CreateFileW, Desired Access=0x80000000, Creation Disposition=0x3:" + Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 263bool foundCreateFileA = FileTrackerTestHelper.FindStringInTlog("CreateFileA, Desired Access=0x80000000, Creation Disposition=0x3:" + Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 273FileTrackerTestHelper.WriteAll("test.in", "foo"); 275int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /o /a /c findstr /ip foo test.in"); 279bool foundGetFileAttributesW = FileTrackerTestHelper.FindStringInTlog("GetFileAttributesW:" + Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 280bool foundGetFileAttributesA = FileTrackerTestHelper.FindStringInTlog("GetFileAttributesA:" + Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 284bool foundCreateFileW = FileTrackerTestHelper.FindStringInTlog("CreateFileW, Desired Access=0x80000000, Creation Disposition=0x3:" + Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 285bool foundCreateFileA = FileTrackerTestHelper.FindStringInTlog("CreateFileA, Desired Access=0x80000000, Creation Disposition=0x3:" + Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 527FileTrackerTestHelper.WriteAll("test.in", "foo"); 529int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /t /c findstr /ip foo test.in"); 530string line = FileTrackerTestHelper.ReadLineFromFile("findstr.command.1.tlog", 1); 542FileTrackerTestHelper.WriteAll("test file.in", "foo"); 544int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /c findstr /ip foo \"test file.in\""); 547FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test file.in").ToUpperInvariant(), "findstr.read.1.tlog"); 556FileTrackerTestHelper.WriteAll("t\u1EBCst.in", "foo"); 559int exit = FileTrackerTestHelper.RunCommandNoStdOut(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /i . /c find /I \"\\\"foo\"\\\" t\u1EBCst.in"); 562FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("t\u1EBCst.in").ToUpperInvariant(), "find.read.1.tlog"); 571FileTrackerTestHelper.WriteAll("test.in", "foo"); 578FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 587FileTrackerTestHelper.WriteAll("tracker.rsp", "/d " + s_defaultFileTrackerPath + " /r jibbit"); 590FileTrackerTestHelper.WriteAll("test.in", "foo"); 592int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "@tracker.rsp /c findstr /ip foo test.in"); 597FileTrackerTestHelper.ReadLineFromFile("findstr.read.1.tlog", 1).ToUpperInvariant()); 598FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 607FileTrackerTestHelper.WriteAll("test.in", "foo"); 609int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /r jibbit /c findstr /ip foo test.in"); 614FileTrackerTestHelper.ReadLineFromFile("findstr.read.1.tlog", 1).ToUpperInvariant()); 615FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 625FileTrackerTestHelper.WriteAll("test.in", "foo"); 627int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/t /d " + s_defaultFileTrackerPath + " /r jibbit /c findstr /ip foo test.in"); 632FileTrackerTestHelper.ReadLineFromFile("findstr.read.1.tlog", 1).ToUpperInvariant()); 633FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 635FileTrackerTestHelper.ReadLineFromFile("findstr.command.1.tlog", 2)); 644FileTrackerTestHelper.WriteAll("test.in", "foo"); 646int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /r \"jibbit goo\" /c findstr /ip foo test.in"); 651FileTrackerTestHelper.ReadLineFromFile("findstr.read.1.tlog", 1).ToUpperInvariant()); 652FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 661FileTrackerTestHelper.WriteAll("test.in", "foo"); 663int exit = FileTrackerTestHelper.RunCommand( 675FileTrackerTestHelper.ReadLineFromFile("findstr.read.1.tlog", 1).ToUpperInvariant()); 676FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 691int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /c sort test.in /O test.out"); 695FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), "sort.read.1.tlog"); 696FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.out").ToUpperInvariant(), "sort.write.1.tlog"); 699FileTrackerTestHelper.ReadLineFromFile("test.out", 0).ToUpperInvariant()); 702FileTrackerTestHelper.ReadLineFromFile("test.out", 1).ToUpperInvariant()); 718int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /i outdir /c sort test.in /O test.out"); 722FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), "outdir\\sort.read.1.tlog"); 723FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.out").ToUpperInvariant(), "outdir\\sort.write.1.tlog"); 726FileTrackerTestHelper.ReadLineFromFile("test.out", 0).ToUpperInvariant()); 729FileTrackerTestHelper.ReadLineFromFile("test.out", 1).ToUpperInvariant()); 749int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /i outdir /c sort test.in /O test.out"); 753FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), "outdir\\sort.read.1.tlog"); 754FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.out").ToUpperInvariant(), "outdir\\sort.write.1.tlog"); 757FileTrackerTestHelper.ReadLineFromFile("test.out", 0).ToUpperInvariant()); 760FileTrackerTestHelper.ReadLineFromFile("test.out", 1).ToUpperInvariant()); 769FileTrackerTestHelper.WriteAll("test.in", "foo"); 771int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /c cmd /c findstr /ip foo test.in"); 774FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), "cmd-findstr.read.1.tlog"); 787FileTrackerTestHelper.WriteAll("test.in", "foo"); 789int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /c cmd /c cmd /c findstr /ip foo test.in"); 793FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), tlogFiles[0]); 813FileTrackerTestHelper.WriteAll("test.in", "foo"); 815int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /c " + s_cmd64Path + " /c " + s_cmd32Path + " /c findstr /ip foo test.in"); 819FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), tlogFiles[0]); 839FileTrackerTestHelper.WriteAll("test.in", "foo"); 841int exit = FileTrackerTestHelper.RunCommand(s_defaultTrackerPath, "/d " + s_defaultFileTrackerPath + " /c " + s_cmd32Path + " /c " + s_cmd64Path + " /c findstr /ip foo test.in"); 845FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), tlogFiles[0]); 959string[] lines = FileTrackerTestHelper.ReadLinesFromFile(tlogWriteFile); 1000string[] lines = FileTrackerTestHelper.ReadLinesFromFile(tlogWriteFile); 1062string[] lines = FileTrackerTestHelper.ReadLinesFromFile(tlogWriteFile); 1093string[] lines = FileTrackerTestHelper.ReadLinesFromFile(tlogWriteFile); 1149string[] lines = FileTrackerTestHelper.ReadLinesFromFile(tlogWriteFile); 1150string[] lines2 = FileTrackerTestHelper.ReadLinesFromFile(tlogWriteFile2); 1195string[] lines = FileTrackerTestHelper.ReadLinesFromFile(tlogWriteFile); 1196string[] lines2 = FileTrackerTestHelper.ReadLinesFromFile(tlogWriteFile2); 1245string[] lines = FileTrackerTestHelper.ReadLinesFromFile(tlogWriteFile); 1295string[] lines = FileTrackerTestHelper.ReadLinesFromFile(tlogWriteFile); 1378FileTrackerTestHelper.WriteAll("test.in", "foo"); 1381exit = FileTrackerTestHelper.RunCommand("findstr", "/ip foo test.in"); 1394FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), "InProcTrackingStartProcessFindStrIn-findstr.read.1.tlog"); 1458FileTrackerTestHelper.WriteAll("test.in", "foo"); 1461exit = FileTrackerTestHelper.RunCommand("findstr", "/ip foo test.in"); 1471FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath("test.in").ToUpperInvariant(), "findstr.read.1.tlog"); 1502string[] writtenlines = FileTrackerTestHelper.ReadLinesFromFile(sourceFile); 1503string[] lines = FileTrackerTestHelper.ReadLinesFromFile(tlogWriteFile); 1504string[] childLines = FileTrackerTestHelper.ReadLinesFromFile(tlogChildWriteFile); 1541string[] writtenlines = FileTrackerTestHelper.ReadLinesFromFile(sourceFile); 1542string[] lines = FileTrackerTestHelper.ReadLinesFromFile(tlogWriteFile); 1543string[] childLines = FileTrackerTestHelper.ReadLinesFromFile(tlogChildWriteFile); 1583string[] writtenlines = FileTrackerTestHelper.ReadLinesFromFile(sourceFile); 1618string[] writtenlines = FileTrackerTestHelper.ReadLinesFromFile(sourceFile); 1619string[] childLines = FileTrackerTestHelper.ReadLinesFromFile(tlogChildWriteFile); 1707string[] writeLines = FileTrackerTestHelper.ReadLinesFromFile(tlogWriteFile); 1708string[] readLines = FileTrackerTestHelper.ReadLinesFromFile(tlogReadFile); 1750FileTrackerTestHelper.AssertFoundStringInTLog(readFile.ToUpperInvariant(), Path.Combine(testDir, tlogRootName + ".read.1.tlog")); 1751FileTrackerTestHelper.AssertDidntFindStringInTLog(readFile.ToUpperInvariant(), Path.Combine(testDir, tlogRootName + ".write.1.tlog")); 1792FileTrackerTestHelper.AssertFoundStringInTLog(copyFromFile.ToUpperInvariant(), tlogReadFile); 1793FileTrackerTestHelper.AssertFoundStringInTLog(copyToFile.ToUpperInvariant(), tlogWriteFile); 1815FileTrackerTestHelper.AssertFoundStringInTLog(copyFromFile.ToUpperInvariant(), tlogReadFile); 1816FileTrackerTestHelper.AssertFoundStringInTLog(copyToFile.ToUpperInvariant(), tlogWriteFile); 1862FileTrackerTestHelper.AssertFoundStringInTLog(moveFromFile.ToUpperInvariant(), tlogDeleteFile); 1863FileTrackerTestHelper.AssertFoundStringInTLog(moveToFile.ToUpperInvariant(), tlogWriteFile); 1887FileTrackerTestHelper.AssertFoundStringInTLog(moveFromFile.ToUpperInvariant(), tlogDeleteFile); 1888FileTrackerTestHelper.AssertFoundStringInTLog(moveToFile.ToUpperInvariant(), tlogDeleteFile); 1889FileTrackerTestHelper.AssertFoundStringInTLog(moveToFile2.ToUpperInvariant(), tlogWriteFile); 2338FileTrackerTestHelper.WriteAll(testInFile, testInFileContent); 2339FileTrackerTestHelper.WriteAll(trackerResponseFile, fileTrackerParameters); 2347int exit = FileTrackerTestHelper.RunCommand( 2359FileTrackerTestHelper.ReadLineFromFile(toolReadTlog, 1).ToUpperInvariant()); 2360FileTrackerTestHelper.AssertFoundStringInTLog(Path.GetFullPath(testInFile).ToUpperInvariant(), toolReadTlog); 2364FileTrackerTestHelper.ReadLineFromFile(tlogRootName + ".write.1.tlog", 1).ToUpperInvariant());