MSBuild back to v2.58.0 because of Owin dependency

FeatureCheckIterationPath122508 ignore features not planned

Removed ALIGNMENT-EQPT and ALIGNMENT Tests
This commit is contained in:
Mike Phares 2025-03-19 11:23:01 -07:00
parent e02b70e258
commit 40177bfb51
11 changed files with 69 additions and 382 deletions

View File

@ -45,6 +45,5 @@
"titleBar.inactiveForeground": "#e7e7e799", "titleBar.inactiveForeground": "#e7e7e799",
"commandCenter.border": "#e7e7e799" "commandCenter.border": "#e7e7e799"
}, },
"peacock.color": "#4a727e", "peacock.color": "#4a727e"
"cSpell.enabled": false
} }

View File

@ -400,47 +400,64 @@ public class ProcessData : IProcessData
_ => 8 _ => 8
}; };
private static string? GetMaxIterationPath122508(ReadOnlyCollection<Record> records) private static ReadOnlyCollection<Record> GetMaxIterationPaths122508(ReadOnlyCollection<Record> records)
{ {
string? result; List<Record> results;
List<string> results = new(); List<Record>? collection;
Dictionary<string, List<Record>> keyValuePairs = new();
foreach (Record record in records) foreach (Record record in records)
{ {
if (results.Contains(record.WorkItem.IterationPath)) if (!keyValuePairs.TryGetValue(record.WorkItem.IterationPath, out collection))
continue; {
results.Add(record.WorkItem.IterationPath); keyValuePairs.Add(record.WorkItem.IterationPath, new());
if (!keyValuePairs.TryGetValue(record.WorkItem.IterationPath, out collection))
throw new Exception();
}
collection.Add(record);
} }
result = results.Count == 0 ? null : results.Max(); string? max = keyValuePairs.Keys.Max();
return result; results = string.IsNullOrEmpty(max) ? new() : keyValuePairs[max];
return results.AsReadOnly();
} }
private static ReadOnlyCollection<Record> FeatureCheckIterationPath122508(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyDictionary<int, Record> keyValuePairs, string workItemType) private static ReadOnlyCollection<Record> FeatureCheckIterationPath122508(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyDictionary<int, Record> keyValuePairs, string workItemType)
{ {
List<Record> results = new(); List<Record> results = new();
Record record; Record record;
string? maxIterationPath; List<string> violations = new();
List<string> collection = new(); List<string> collection = new();
ReadOnlyCollection<Record> records; ReadOnlyCollection<Record> records;
ReadOnlyCollection<Record> maxIterationPaths;
foreach (KeyValuePair<int, Record> keyValuePair in keyValuePairs) foreach (KeyValuePair<int, Record> keyValuePair in keyValuePairs)
{ {
record = keyValuePair.Value; record = keyValuePair.Value;
if (record.WorkItem.State is "Removed") if (record.WorkItem.State is "Removed")
continue; continue;
if (!record.WorkItem.IterationPath.Contains('\\'))
continue;
if (record.WorkItem.WorkItemType != workItemType) if (record.WorkItem.WorkItemType != workItemType)
continue; continue;
collection.Clear(); collection.Clear();
violations.Clear();
if (record.Children is null || record.Children.Length == 0) if (record.Children is null || record.Children.Length == 0)
continue; continue;
records = FilterChildren(workItemTypes, record); records = FilterChildren(workItemTypes, record);
maxIterationPath = GetMaxIterationPath122508(records); maxIterationPaths = GetMaxIterationPaths122508(records);
if (string.IsNullOrEmpty(maxIterationPath) || record.WorkItem.IterationPath == maxIterationPath) foreach (Record r in maxIterationPaths)
continue; {
collection.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}"); if (string.IsNullOrEmpty(r.WorkItem.IterationPath) || record.WorkItem.IterationPath == r.WorkItem.IterationPath)
collection.Add(string.Empty); continue;
collection.Add($"- [ ] [{record.WorkItem.Id}]({url}{record.WorkItem.Id}) => {record.WorkItem.IterationPath} != {maxIterationPath}"); violations.Add($"<a target='_blank' href='{url}{r.WorkItem.Id}'>{r.WorkItem.Id}</a>:{r.WorkItem.IterationPath};");
collection.Add(string.Empty); }
lines.AddRange(collection); if (violations.Count > 0)
results.Add(Record.GetWithoutNesting(record, $"IterationPath:<a target='_blank' href='{url}{record.WorkItem.Id}'>{record.WorkItem.Id}</a>;{record.WorkItem.IterationPath} != {maxIterationPath}")); {
collection.Insert(0, string.Empty);
collection.Insert(0, $"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
lines.AddRange(collection);
violations.Insert(0, $"IterationPath:{record.WorkItem.IterationPath};");
results.Add(Record.GetWithoutNesting(record, string.Join(" ", violations)));
}
} }
return new(results); return new(results);
} }

View File

@ -491,7 +491,7 @@ public class FileRead : Properties.IFileRead
protected static void NestExistingFiles(FileConnectorConfiguration fileConnectorConfiguration) protected static void NestExistingFiles(FileConnectorConfiguration fileConnectorConfiguration)
{ {
if (!fileConnectorConfiguration.IncludeSubDirectories.Value) if (!fileConnectorConfiguration.IncludeSubDirectories.Value && fileConnectorConfiguration.TriggerOnCreated is not null && fileConnectorConfiguration.TriggerOnCreated.Value)
{ {
string[] matches = GetMatches(fileConnectorConfiguration); string[] matches = GetMatches(fileConnectorConfiguration);
if (matches is not null && matches.Length > 0) if (matches is not null && matches.Length > 0)

View File

@ -1,65 +0,0 @@
#if true
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Development.v2_59_0;
[TestClass]
public class ALIGNMENT_EQPT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static ALIGNMENT_EQPT EAFLoggingUnitTesting { get; private set; }
static ALIGNMENT_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public ALIGNMENT_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public ALIGNMENT_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new ALIGNMENT_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Development__v2_59_0__ALIGNMENT_EQPT__DownloadExcelFile()
{
string check = ".xlsx";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -1,65 +0,0 @@
#if true
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Development.v2_59_0;
[TestClass]
public class ALIGNMENT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static ALIGNMENT EAFLoggingUnitTesting { get; private set; }
static ALIGNMENT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public ALIGNMENT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public ALIGNMENT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new ALIGNMENT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Development__v2_59_0__ALIGNMENT__ConvertExcelToJson()
{
string check = "*.xlsx";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -1,52 +0,0 @@
#if true
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.Reflection;
using System.Threading;
namespace Adaptation._Tests.Extract.Development.v2_59_0;
[TestClass]
public class ALIGNMENT_EQPT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Development.v2_59_0.ALIGNMENT_EQPT _ALIGNMENT_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Development.v2_59_0.ALIGNMENT_EQPT.ClassInitialize(testContext);
_ALIGNMENT_EQPT = CreateSelfDescription.Development.v2_59_0.ALIGNMENT_EQPT.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
[Ignore]
[TestMethod]
public void Development__v2_59_0__ALIGNMENT_EQPT__DownloadExcelFile() => _ALIGNMENT_EQPT.Development__v2_59_0__ALIGNMENT_EQPT__DownloadExcelFile();
[Ignore]
[TestMethod]
public void Development__v2_59_0__ALIGNMENT_EQPT__DownloadExcelFile637961178824025822__Normal()
{
string check = ".xlsx";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_ALIGNMENT_EQPT.Development__v2_59_0__ALIGNMENT_EQPT__DownloadExcelFile();
_ = _ALIGNMENT_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
for (int i = 0; i < int.MinValue; i++)
Thread.Sleep(500);
NonThrowTryCatch();
}
}
#endif

View File

@ -1,64 +0,0 @@
#if true
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Text.Json;
namespace Adaptation._Tests.Extract.Development.v2_59_0;
[TestClass]
public class ALIGNMENT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Development.v2_59_0.ALIGNMENT _ALIGNMENT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Development.v2_59_0.ALIGNMENT.ClassInitialize(testContext);
_ALIGNMENT = CreateSelfDescription.Development.v2_59_0.ALIGNMENT.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Development__v2_59_0__ALIGNMENT__ConvertExcelToJson() => _ALIGNMENT.Development__v2_59_0__ALIGNMENT__ConvertExcelToJson();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Development__v2_59_0__ALIGNMENT__ConvertExcelToJson638353030755467303__Normal()
{
string check = "*.xlsx";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_ALIGNMENT.Development__v2_59_0__ALIGNMENT__ConvertExcelToJson();
Assert.IsFalse(string.IsNullOrEmpty(_ALIGNMENT.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
string[] variables = _ALIGNMENT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _ALIGNMENT.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
Assert.IsNotNull(extractResult.Item3);
Assert.IsNotNull(extractResult.Item4);
NonThrowTryCatch();
}
}
#endif

View File

@ -218,5 +218,25 @@ public class MESAFIBACKLOG
NonThrowTryCatch(); NonThrowTryCatch();
} }
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Development__v2_59_0__MESAFIBACKLOG__Markdown638779784153157286__Normal()
{
string check = "*.json";
bool validatePDSF = false;
_MESAFIBACKLOG.Development__v2_59_0__MESAFIBACKLOG__Markdown();
MethodBase methodBase = new StackFrame().GetMethod();
Assert.IsFalse(string.IsNullOrEmpty(_MESAFIBACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
string[] variables = _MESAFIBACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MESAFIBACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
Assert.IsNotNull(extractResult.Item3);
Assert.IsNotNull(extractResult.Item4);
NonThrowTryCatch();
}
} }
#endif #endif

View File

@ -1,106 +0,0 @@
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Adaptation._Tests.Static;
[TestClass]
public class ALIGNMENT : LoggingUnitTesting, IDisposable
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static ALIGNMENT LoggingUnitTesting { get; private set; }
public ALIGNMENT() : base(testContext: null, declaringType: null)
{
if (LoggingUnitTesting is null)
throw new Exception();
}
public ALIGNMENT(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new ALIGNMENT(testContext);
[ClassCleanup()]
public static void ClassCleanup()
{
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
LoggingUnitTesting?.Dispose();
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
[TestMethod]
public void TestDateTime()
{
DateTime dateTime = DateTime.Now;
Assert.AreEqual(dateTime.ToString(), dateTime.ToString("M/d/yyyy h:mm:ss tt"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Development()
{
MethodBase methodBase = new StackFrame().GetMethod();
StringBuilder results = new();
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
{
new("ALIGNMENT", "v2.59.0"),
new("ALIGNMENT-EQPT", "v2.59.0"),
};
string development = "http://eaf-dev.mes.infineon.com:9003/CellInstanceServiceV2";
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
{
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{development}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
}
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
if (!Directory.Exists(sourceDirectory))
_ = Directory.CreateDirectory(sourceDirectory);
File.WriteAllText(Path.Combine(sourceDirectory, $"{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv"), results.ToString());
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
[TestMethod]
public void CellInstanceVersionEdaConnectionPortNumber()
{
MethodBase methodBase = new StackFrame().GetMethod();
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
if (Directory.Exists(sourceDirectory))
{
string destinationDirectory = Path.Combine(sourceDirectory, "All");
if (!Directory.Exists(destinationDirectory))
_ = Directory.CreateDirectory(destinationDirectory);
List<string> lines = new();
string[] files = Directory.GetFiles(sourceDirectory, "*.tsv", SearchOption.TopDirectoryOnly);
foreach (string file in files)
lines.AddRange(File.ReadAllLines(file));
File.WriteAllLines(Path.Combine(destinationDirectory, $"{DateTime.Now.Ticks}.tsv"), lines.Distinct().OrderBy(l => l));
}
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
}

View File

@ -212,7 +212,7 @@
<Version>0.15.1</Version> <Version>0.15.1</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Infineon.EAF.Runtime"> <PackageReference Include="Infineon.EAF.Runtime">
<Version>2.59.0</Version> <Version>2.58.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.AspNet.SignalR.SelfHost"> <PackageReference Include="Microsoft.AspNet.SignalR.SelfHost">
<Version>2.4.3</Version> <Version>2.4.3</Version>
@ -220,17 +220,20 @@
<PackageReference Include="Microsoft.AspNet.SignalR.Core"> <PackageReference Include="Microsoft.AspNet.SignalR.Core">
<Version>2.4.3</Version> <Version>2.4.3</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Owin">
<Version>1.0.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.Owin"> <PackageReference Include="Microsoft.Owin">
<Version>4.0.0</Version> <Version>2.1.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.Owin.Cors"> <PackageReference Include="Microsoft.Owin.Cors">
<Version>4.0.0</Version> <Version>2.1.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.Owin.Security">
<Version>2.1.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.Owin.Hosting"> <PackageReference Include="Microsoft.Owin.Hosting">
<Version>4.0.0</Version> <Version>2.1.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.Owin.Host.HttpListener">
<Version>4.0.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.TeamFoundationServer.Client"> <PackageReference Include="Microsoft.TeamFoundationServer.Client">
<Version>16.205.1</Version> <Version>16.205.1</Version>

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.59.0.0")] [assembly: AssemblyVersion("2.58.0.0")]
[assembly: AssemblyFileVersion("2.59.0.0")] [assembly: AssemblyFileVersion("2.58.0.0")]