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

Enable running perftests via Test Explorer in Visual Studio #3279

Merged
merged 5 commits into from
Dec 25, 2024
Merged
Changes from all commits
Commits
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
12 changes: 2 additions & 10 deletions pwiz_tools/Skyline/TestUtil/AbstractUnitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected bool AllowInternetAccess
/// </summary>
protected bool RunPerfTests
{
get { return TestContext.GetBoolValue("RunPerfTests", false); } // Return false if unspecified
get { return TestContext.GetBoolValue("RunPerfTests", true); } // Return true if unspecified
set { TestContext.Properties["RunPerfTests"] = value.ToString(CultureInfo.InvariantCulture); }
}

Expand All @@ -107,17 +107,9 @@ protected bool RecordAuditLogs
set { TestContext.Properties["RecordAuditLogs"] = value.ToString(CultureInfo.InvariantCulture); }
}

/// <summary>
/// This controls whether we run the various tests that are small molecule versions of our standard tests,
/// for example DocumentExportImportTestAsSmallMolecules(). Such tests convert the entire document to small
/// molecule representations before proceeding.
/// Developers that want to see such tests execute within the IDE can add their machine name to the SmallMoleculeDevelopers
/// list below (partial matches suffice, so name carefully!)
/// </summary>
private static string[] SmallMoleculeDevelopers = {"BSPRATT"};
protected bool RunSmallMoleculeTestVersions
{
get { return TestContext.GetBoolValue("RunSmallMoleculeTestVersions", false) || SmallMoleculeDevelopers.Any(smd => Environment.MachineName.Contains(smd)); }
get { return TestContext.GetBoolValue("RunSmallMoleculeTestVersions", true); }
set { TestContext.Properties["RunSmallMoleculeTestVersions"] = value.ToString(CultureInfo.InvariantCulture); }
}

Expand Down