Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore challenging intermittent nightly test failures #3148

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
da45bcb
add some debug code to Statistics.Split
bspratt Sep 5, 2024
759fe1c
try to stabilize these tests by using AbstractFunctionalTestEx.OpenDo…
bspratt Sep 5, 2024
c074520
per MattC email, try eliminating call to DiaUmpire.Config.GetConfigF…
bspratt Sep 9, 2024
737aff4
Merge branch 'master' into Skyline/work/20240905_what_is_up_with_test…
bspratt Sep 9, 2024
0c1e803
trying to determine with TestMS1Tutorial is hanging - added Program.R…
bspratt Sep 9, 2024
ff5c256
Merge branch 'Skyline/work/20240905_what_is_up_with_tests_on_jason_xp…
bspratt Sep 9, 2024
2be4d07
TestRunner launches ProcDump (if installed, see https://learn.microso…
bspratt Sep 30, 2024
b0c7b95
Merge branch 'master' into Skyline/work/20240905_what_is_up_with_test…
bspratt Oct 1, 2024
b8cb553
Merge branch 'Skyline/work/20240905_what_is_up_with_tests_on_jason_xp…
bspratt Oct 1, 2024
d95f715
SkylineNightly: set git's http.postBuffer size to 500MB to help with …
bspratt Oct 1, 2024
e5ac552
per Nick suggestion, aply the http buffer size change only for the du…
bspratt Oct 1, 2024
78c4729
add an informative message about SysInternals ProcDump when it isn't …
bspratt Oct 2, 2024
9e13daf
slightly more verbose launch for ProcDump
bspratt Oct 7, 2024
da1aa53
try to build as release with debug symbols retained
bspratt Oct 8, 2024
006a64a
Merge branch 'master' into Skyline/work/20240905_what_is_up_with_test…
bspratt Oct 8, 2024
88265ee
Merge branch 'master' into Skyline/work/20240905_what_is_up_with_test…
brendanx67 Oct 16, 2024
9d3c717
Merge branch 'master' into Skyline/work/20240905_what_is_up_with_test…
bspratt Oct 17, 2024
f4e8579
Merge branch 'master' into Skyline/work/20240905_what_is_up_with_test…
bspratt Oct 17, 2024
39158cd
Merge branch 'master' into Skyline/work/20240905_what_is_up_with_test…
bspratt Oct 18, 2024
a7d7e03
trying to leave debug symbols in confuses bjam
bspratt Oct 19, 2024
568acfe
Merge branch 'Skyline/work/20240905_what_is_up_with_tests_on_jason_xp…
bspratt Oct 19, 2024
fe9334f
Another try at a TC release build with debug symbols on - backs out a…
bspratt Oct 22, 2024
0a88db1
Merge branch 'master' into Skyline/work/20240905_what_is_up_with_test…
bspratt Oct 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pwiz_tools/Skyline/Model/DiaUmpireDdaConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public override bool Run(IProgressMonitor progressMonitor, IProgressStatus statu

// CONSIDER: read the file description to see what settings were used to generate the file;
// if the same settings were used, we can re-use the file, else regenerate
/* temp removal - is this the trouble spot causing memory errors? TODO restore this?
if (MsDataFileImpl.IsValidFile(outputFilepath))
{
var outputFileConfig = DiaUmpire.Config.GetConfigFromDiaUmpireOutput(outputFilepath);
Expand Down Expand Up @@ -139,7 +140,8 @@ public override bool Run(IProgressMonitor progressMonitor, IProgressStatus statu
}
}
}

end temp removal */

if (File.Exists(outputFilepath))
FileEx.SafeDelete(outputFilepath);

Expand Down
1 change: 1 addition & 0 deletions pwiz_tools/Skyline/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public static bool SkylineOffscreen
} // Set true to move Skyline windows offscreen.

public static bool DemoMode { get; set; } // Set to true in demo mode (main window is full screen and pauses at screenshots)
public static bool ReportTutorialTestProgress { get; set; } // When True, write PauseForScreenshot messages to console even if offscreen and even if not pausing for screenshots
public static bool NoVendorReaders { get; set; } // Set true to avoid calling vendor readers.
public static bool UseOriginalURLs { get; set; } // Set true to use original URLs for downloading tools instead of our S3 copies
public static bool IsPassZero { get { return NoVendorReaders; } } // Currently the only time NoVendorReaders gets set is pass0
Expand Down
8 changes: 5 additions & 3 deletions pwiz_tools/Skyline/SkylineTester/TabBuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,17 @@ public static bool CreateBuildCommands(

commandShell.Add("#@ Checking out {0} source files...\n", branchName);
commandShell.Add("# Checking out {0} source files...", branchName);

// Add the --progress flag for richer logging - git leaves out most progress info when it isn't writing to an actual terminal
// Add the "-c http.postBuffer=524288000" argument to help with clone on unstable networks
if (branchName.Contains("master"))
{
commandShell.AddWithRetry("{0} clone {1} --recurse-submodules --progress {2}", git.Quote(), branchUrl.Quote(), buildRoot.Quote());
commandShell.AddWithRetry("{0} -c http.postBuffer=524288000 clone {1} --recurse-submodules --progress {2}", git.Quote(), branchUrl.Quote(), buildRoot.Quote());
}
else
{
var branch = branchUrl.Split(new[] {"tree/"}, StringSplitOptions.None)[1];
commandShell.AddWithRetry("{0} clone {1} --recurse-submodules --progress -b {2} {3}", git.Quote(), GetMasterUrl().Quote(), branch.Quote(), buildRoot.Quote());
commandShell.AddWithRetry("{0} -c http.postBuffer=524288000 clone {1} --recurse-submodules --progress -b {2} {3}", git.Quote(), GetMasterUrl().Quote(), branch.Quote(), buildRoot.Quote());
}
}

Expand All @@ -214,7 +216,7 @@ public static bool CreateBuildCommands(
foreach (int architecture in architectures)
{
commandShell.Add("#@ Building Skyline {0} bit...\n", architecture);
commandShell.Add("{0} {1} {2} --i-agree-to-the-vendor-licenses {3} nolog",
commandShell.Add("{0} {1} {2} variant=release debug-symbols=on --i-agree-to-the-vendor-licenses {3} nolog",
Path.Combine(buildRoot, @"pwiz_tools\build-apps.bat").Quote(),
architecture,
runBuildTests ? "pwiz_tools/Skyline" : "pwiz_tools/Skyline//Skyline.exe",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
namespace pwiz.SkylineTestFunctional
{
[TestClass]
public class AgilentCeOptimizationTest : AbstractFunctionalTest
public class AgilentCeOptimizationTest : AbstractFunctionalTestEx
{
[TestMethod]
public void TestAgilentCeOptimization()
Expand All @@ -38,10 +38,7 @@ public void TestAgilentCeOptimization()

protected override void DoTest()
{
RunUI(() =>
{
SkylineWindow.OpenFile(TestFilesDir.GetTestPath("AgilentCeTest.sky"));
});
OpenDocument(TestFilesDir.GetTestPath("AgilentCeTest.sky"));
RunDlg<ImportResultsDlg>(SkylineWindow.ImportResults, importResults=>{
importResults.OptimizationName = ExportOptimize.CE;
importResults.NamedPathSets = new[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace pwiz.SkylineTestFunctional
/// https://skyline.ms/announcements/home/support/thread.view?rowId=52220
/// </summary>
[TestClass]
public class PermuteIsotopeModificationsTest : AbstractFunctionalTest
public class PermuteIsotopeModificationsTest : AbstractFunctionalTestEx
{
[TestMethod]
public void TestPermuteIsotopeModifications()
Expand All @@ -43,7 +43,7 @@ public void TestPermuteIsotopeModifications()

protected override void DoTest()
{
RunUI(()=>SkylineWindow.OpenFile(TestFilesDir.GetTestPath("PermuteIsotopeModificationsTest.sky")));
OpenDocument(TestFilesDir.GetTestPath("PermuteIsotopeModificationsTest.sky"));
// This document contains two peptides
Assert.AreEqual(2, SkylineWindow.Document.MoleculeCount);
Assert.AreEqual(2, SkylineWindow.Document.MoleculeTransitionGroupCount);
Expand Down
20 changes: 20 additions & 0 deletions pwiz_tools/Skyline/TestRunner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,26 @@ private static bool RunTestPasses(
runTests.Log("\r\n");
}

if (asNightly)
{
// Run procdump if installed
var process = new Process();
process.StartInfo.FileName = "procdump.exe";
var dmpDirQuote = string.IsNullOrEmpty(dmpDir) ? string.Empty : $@" ""{dmpDir}""";
process.StartInfo.Arguments = $@"-accepteula -ma -mk -h -64 TestRunner{dmpDirQuote}";
runTests.Log($@"# Attempting to launch 'procdump.exe {process.StartInfo.Arguments}', to try to diagnose hangs in TestRunner\r\n");
try
{

process.Start();
}
catch (Exception)
{
// ignored, presumably ProcDump is not installed
runTests.Log("# ProcDump did not launch. You may wish to install SysInternals ProcDump to try to diagnose hangs in TestRunner. It will be launched automatically if available.\r\n");
}
}

if (commandLineArgs.ArgAsBool("clipboardcheck"))
{
runTests.TestContext.Properties["ClipboardCheck"] = "TestRunner clipboard check";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
using pwiz.Skyline.Util;
using pwiz.Skyline.Util.Extensions;
using ZedGraph;
using pwiz.Skyline;

namespace pwiz.SkylineTestTutorial
{
Expand All @@ -58,6 +59,7 @@ public class Ms1FullScanFilteringTutorial : AbstractFunctionalTestEx
[TestMethod, MinidumpLeakThreshold(15)]
public void TestMs1Tutorial()
{
Program.ReportTutorialTestProgress = true; // Write screenshot info to console, trying to figure out where this hangs
// Set true to look at tutorial screenshots.
// IsPauseForScreenShots = true;
// IsCoverShotMode = true;
Expand Down
6 changes: 6 additions & 0 deletions pwiz_tools/Skyline/TestUtil/TestFunctional.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,12 @@ private void PauseForScreenShot(string description, int? pageNum, Type formType,
var form = TryWaitForOpenForm(formType);
Assert.IsNotNull(form);
}

if (Program.ReportTutorialTestProgress)
{
Console.WriteLine($@"# tutorial test progress: {description} - p. {pageNum}");
}

if (Program.SkylineOffscreen)
return;

Expand Down
38 changes: 24 additions & 14 deletions pwiz_tools/Skyline/Util/Statistics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1342,24 +1342,34 @@ public static double QNthItem(IList<double> list, int elementIndex)

private static void Split(IList<double> list, double value, ref int left, ref int right)
{
// Left and right scan until the pointers cross
do
try
{
while (list[left] < value)
left++;
while (value < list[right])
right--;

if (left <= right)
// Left and right scan until the pointers cross
do
{
double temp = list[left];
list[left] = list[right];
list[right] = temp;
while (list[left] < value)
left++;
while (value < list[right])
right--;

left++;
right--;
}
} while (left <= right);
if (left <= right)
{
double temp = list[left];
list[left] = list[right];
list[right] = temp;

left++;
right--;
}
} while (left <= right);
}
catch (Exception e)
{
Console.WriteLine(e);
Console.WriteLine($@"left={left} right={right} size={list.Count}");
throw;
}
}

/// <summary>
Expand Down
6 changes: 0 additions & 6 deletions pwiz_tools/build-apps.bat
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,9 @@ if "%ALL_ARGS: REGISTER=%" neq "%ALL_ARGS%" (
)
if "%ALL_ARGS: debug=%" neq "%ALL_ARGS%" (
set OPTIMIZATION=debug
if "%ALL_ARGS: debug-symbols=%" == "%ALL_ARGS%" (
set ALL_ARGS=%ALL_ARGS: debug=%
)
)
if "%ALL_ARGS: DEBUG=%" neq "%ALL_ARGS%" (
set OPTIMIZATION=debug
if "%ALL_ARGS: DEBUG-SYMBOLS=%" == "%ALL_ARGS%" (
set ALL_ARGS=%ALL_ARGS: DEBUG=%
)
)
if "%ALL_ARGS: nolog=%" neq "%ALL_ARGS%" (
set NOLOG=1
Expand Down
Loading