Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DumpFolder: Q:\ReliabilityFramework\Dumps
AnalyzeOutputFolder: Q:\ReliabilityFramework\AnalyzeDump_Output
StackFrameKeyWords:
- "::gc_heap::"
- "::GCHeap::"
DebuggerPath: windbgx
Core_Root: Q:\Core_Root
WSLInstanceLocation: \\wsl.localhost\Debian
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
OutputFolder: Q:\output-data_sync_checkin
OutputFolder: Q:\ReliabilityFramework\TestSuites

EnableStressMode: false

CoreRoot: Q:\runtime\artifacts\tests\coreclr\windows.x64.Checked\Tests\Core_Root
Core_Root: Q:\runtime\artifacts\tests\coreclr\windows.x64.Checked\Tests\Core_Root
ReliabilityFrameworkDll: Q:\runtime\artifacts\tests\coreclr\windows.x64.Release\GC\Stress\Framework\ReliabilityFramework\ReliabilityFramework.dll
GCPerfSimDll: Q:\performance\artifacts\bin\GCPerfSim\Release\net7.0\GCPerfSim.dll
TestFolder: Q:\runtime\artifacts\tests\coreclr\windows.x64.Release\GC\Stress\Framework\ReliabilityFramework\Tests
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
using YamlDotNet.Serialization;

namespace GC.Infrastructure.Core.Configurations
{
public sealed class RFAnalyzeConfiguration
{
public required string DebuggerPath { get; set; }
public required List<string> StackFrameKeyWords { get; set; }
public required string Core_Root { get; set; }
public required string WSLInstanceLocation { get; set; }
public required string DumpFolder { get; set; }
public required string AnalyzeOutputFolder { get; set; }
}

public static class RFAnalyzeConfigurationParser
{
private static readonly IDeserializer _deserializer =
new DeserializerBuilder().IgnoreUnmatchedProperties().Build();

public static RFAnalyzeConfiguration Parse(string path)
{
// Preconditions.
ConfigurationChecker.VerifyFile(path, nameof(RFAnalyzeConfigurationParser));

string serializedConfiguration = File.ReadAllText(path);
RFAnalyzeConfiguration? configuration = null;

// This try catch is here because the exception from the YamlDotNet isn't helpful and must be imbued with more details.
try
{
configuration = _deserializer.Deserialize<RFAnalyzeConfiguration>(serializedConfiguration);
}
catch (Exception ex)
{
throw new ArgumentException($"{nameof(RFAnalyzeConfiguration)}: Unable to parse the yaml file because of an error in the syntax. Exception: {ex.Message} \n Call Stack: {ex.StackTrace}");
}

if (String.IsNullOrEmpty(configuration.AnalyzeOutputFolder))
{
throw new ArgumentException($"{nameof(RFAnalyzeConfiguration)}: Provide a analyze output folder.");
}

if (!Path.Exists(configuration.DumpFolder))
{
throw new ArgumentException($"{nameof(RFAnalyzeConfiguration)}: Dump folder doesn't exist.");
}

// Check Core_Root folder
if (!Path.Exists(configuration.Core_Root))
{
throw new ArgumentException($"{nameof(RFAnalyzeConfiguration)}: Core_Root doesn't exist.");
}
bool hasCoreRun = Directory.GetFiles(configuration.Core_Root)
.Any(filePath => Path.GetFileNameWithoutExtension(filePath) == "corerun");
if (!hasCoreRun)
{
throw new ArgumentException($"{nameof(RFAnalyzeConfiguration)}: Provide a valid Core_Root.");
}

return configuration;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
using YamlDotNet.Serialization;

namespace GC.Infrastructure.Core.Configurations
{
public sealed class RFCreateSuitesConfiguration
{
/// <summary>
/// Gets or sets the output path
/// </summary>
public string OutputFolder { get; set; }

/// <summary>
/// Gets or sets the Core_Root path
/// </summary>
public string Core_Root { get; set; }

/// <summary>
/// Gets or sets the Reliability Framework DLL path
/// </summary>
public string ReliabilityFrameworkDll { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the test is running in stress mode.
/// </summary>
public bool EnableStressMode { get; set; }

/// <summary>
/// Gets or sets the GCPerfSim DLL path.
/// </summary>
public string GCPerfSimDll { get; set; }

/// <summary>
/// Gets or sets the path to the test folder.
/// </summary>
public string TestFolder { get; set; }
}

public static class RFCreateSuitesConfigurationParser
{
private static readonly IDeserializer _deserializer =
new DeserializerBuilder().IgnoreUnmatchedProperties().Build();

public static RFCreateSuitesConfiguration Parse(string path)
{
// Preconditions.
ConfigurationChecker.VerifyFile(path, nameof(RFCreateSuitesConfigurationParser));

string serializedConfiguration = File.ReadAllText(path);
RFCreateSuitesConfiguration? configuration = null;

// This try catch is here because the exception from the YamlDotNet isn't helpful and must be imbued with more details.
try
{
configuration = _deserializer.Deserialize<RFCreateSuitesConfiguration>(serializedConfiguration);
}

catch (Exception ex)
{
throw new ArgumentException($"{nameof(RFCreateSuitesConfiguration)}: Unable to parse the yaml file because of an error in the syntax. Exception: {ex.Message} \n Call Stack: {ex.StackTrace}");
}

if (string.IsNullOrEmpty(configuration.OutputFolder))
{
throw new ArgumentException($"{nameof(RFCreateSuitesConfiguration)}: Please specify output folder");
}

if (string.IsNullOrEmpty(configuration.ReliabilityFrameworkDll) )
{
throw new ArgumentException($"{nameof(RFCreateSuitesConfiguration)}: Please specify ReliabilityFrameworkDll");
}

if (!Path.Exists(configuration.Core_Root))
{
throw new ArgumentException($"{nameof(RFCreateSuitesConfiguration)}: Given CoreRoot path is not valid");
}

if (string.IsNullOrEmpty(configuration.GCPerfSimDll))
{
throw new ArgumentException($"{nameof(RFCreateSuitesConfiguration)}: Please specify GCPerfSimDll");
}

if (!Path.Exists(configuration.TestFolder))
{
throw new ArgumentException($"{nameof(RFCreateSuitesConfiguration)}: Given TestFolder path is not valid");
}

return configuration;
}
}
}

This file was deleted.

Loading
Loading