Infineon.EAF.Runtime 2.49.0

net6.0 to net7.0
Removed hasRDS that was added for P2-LOW-RR
This commit is contained in:
Mike Phares 2023-04-18 13:48:58 -07:00
parent 3c30da0bb1
commit 025ec077f5
19 changed files with 340 additions and 108 deletions

View File

@ -36,9 +36,9 @@ public class FileRead : Shared.FileRead, IFileRead
if (!_IsDuplicator)
throw new Exception(cellInstanceConnectionName);
_LastLines = string.Empty;
_OpenInsightApiIFXDirectory = @"\\messdv002.na.infineon.com\Candela\Archive\API";
_OpenInsightApiECDirectory = @"\\messv02ecc1.ec.local\EC_Metrology_Si\Archive\API";
_IqsConnectionString = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "IQS.ConnectionString");
_OpenInsightApiECDirectory = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "API.EC.Directory");
_OpenInsightApiIFXDirectory = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "API.IFX.Directory");
_OpenInsightFilePattern = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.FilePattern");
}

View File

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
@ -61,7 +62,7 @@ public class Job
(int? workOrderNumber, int? _, int? workOrderCassette, int? slotNumber, bool isWorkOrder) = GetWorkOrder(input);
if (isWorkOrder || reactorNumber.HasValue)
(layer, psn, rdsNumber, zone) = (string.Empty, string.Empty, null, string.Empty);
else if (!string.IsNullOrEmpty(input.MID) && input.MID.Length is not 2 and not 3)
else if (!string.IsNullOrEmpty(input.MID) && input.MID.Length is not 2 and not 3 and not 5)
(layer, psn, rdsNumber, reactorNumber, zone) = Get(input);
else
(layer, psn, rdsNumber, reactorNumber, zone) = Get(metrologyFileShare, input);
@ -157,7 +158,7 @@ public class Job
reactor = defaultReactor;
else
reactor = segments[0];
if (segments.Length <= 1 || !int.TryParse(segments[1], out int rdsValue) || rdsValue < 99)
if (segments.Length <= 1 || !int.TryParse(segments[1].Replace("QP", string.Empty), out int rdsValue) || rdsValue < 99)
rds = defaultRDS;
else
rds = segments[1];
@ -222,7 +223,7 @@ public class Job
string defaultLayer = string.Empty;
string defaultReactor = string.Empty;
string[] segments = input.MID.Split(new char[] { '-' });
bool hasRDS = Regex.IsMatch(input.MID, "[-]?[0-9]{5,}[-]?");
bool hasRDS = Regex.IsMatch(input.MID, "[-]?([QP][0-9]{4,}|[0-9]{5,})[-]?");
string formattedText = Regex.Replace(input.MID, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, input.MID, formattedText, segments, hasRDS);
if (string.IsNullOrEmpty(rds))
@ -245,50 +246,66 @@ public class Job
return new(layer, psn, rdsNumber, reactorNumber, zone);
}
private static string[] GetDirectories(string metrologyFileShare)
{
DateTime dateTime = DateTime.Now;
DateTime before = dateTime.AddHours(-1);
Calendar calendar = new CultureInfo("en-US").Calendar;
string weekOfYear = $"{dateTime:yyyy}_Week_{calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday):00}";
string weekOfYearForBefore = $"{before:yyyy}_Week_{calendar.GetWeekOfYear(before, CalendarWeekRule.FirstDay, DayOfWeek.Sunday):00}";
return new string[]
{
Path.Combine(metrologyFileShare, weekOfYear, dateTime.ToString("yyyy-MM-dd_HH")),
Path.Combine(metrologyFileShare, weekOfYearForBefore, before.ToString("yyyy-MM-dd_HH"))
};
}
#nullable enable
private static (string, string, int?, int?, string) Get(string metrologyFileShare, Input input)
{
string[] files;
string[] lines;
string moveFile;
string lines;
int? reactor = null;
int? rdsNumber = null;
string psn = string.Empty;
List<string> files = new();
string zone = string.Empty;
string layer = string.Empty;
string usedDirectory = Path.Combine(metrologyFileShare, "Used");
WorkMaterialOut? workMaterialOut;
if (!Directory.Exists(metrologyFileShare))
throw new Exception($"Unable to access file-share <{metrologyFileShare}>");
if (!Directory.Exists(usedDirectory))
_ = Directory.CreateDirectory(usedDirectory);
if (string.IsNullOrEmpty(input.MID))
files = Array.Empty<string>();
else
files = Directory.GetFiles(metrologyFileShare, $"*-{input.MID}.rsv", SearchOption.TopDirectoryOnly);
if (!string.IsNullOrEmpty(input.MID))
{
string[] checkDirectories = GetDirectories(metrologyFileShare);
foreach (string checkDirectory in checkDirectories)
{
if (!Directory.Exists(checkDirectory))
_ = Directory.CreateDirectory(checkDirectory);
files.AddRange(Directory.GetFiles(checkDirectory, $"WMO-{input.MID}.json", SearchOption.TopDirectoryOnly));
}
}
foreach (string file in files.OrderByDescending(l => new FileInfo(l).LastWriteTime))
{
lines = File.ReadAllLines(file);
foreach (string line in lines)
{
if (string.IsNullOrEmpty(line))
continue;
if (!int.TryParse(line, out int rds) || IsInvalid(rds))
continue;
lines = File.ReadAllText(file);
workMaterialOut = JsonSerializer.Deserialize<WorkMaterialOut>(lines, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
if (workMaterialOut is null)
continue;
if (!string.IsNullOrEmpty(workMaterialOut.Layer))
layer = workMaterialOut.Layer;
if (!string.IsNullOrEmpty(workMaterialOut.PSN))
psn = workMaterialOut.PSN;
if (!string.IsNullOrEmpty(workMaterialOut.RunDataSheet) && int.TryParse(workMaterialOut.RunDataSheet, out int rds))
rdsNumber = rds;
break;
}
if (rdsNumber is not null)
{
moveFile = Path.Combine(usedDirectory, Path.GetFileName(file));
if (File.Exists(moveFile))
File.Delete(file);
else
File.Move(file, moveFile);
break;
}
reactor = workMaterialOut.Reactor;
if (!string.IsNullOrEmpty(workMaterialOut.Zone))
zone = workMaterialOut.Zone;
break;
}
return new(layer, psn, rdsNumber, reactor, zone);
}
#nullable disable
private static string GetRunJson(string lsl2SQLConnectionString, int? rds, int? workOrderNumber, int? workOrderCassette, int? slot, int? reactor)
{
StringBuilder result = new();

View File

@ -0,0 +1,18 @@
namespace Adaptation.FileHandlers.TIBCO.Transport;
#nullable enable
public class WorkMaterialOut
{
public string? Layer { get; set; }
public string? PSN { get; set; }
public string? Pocket { get; set; }
public int? Reactor { get; set; }
public string? RunDataSheet { get; set; }
public string? Scan { get; set; }
public int? SlotNumber { get; set; }
public string? Username { get; set; }
public string? Zone { get; set; }
}

View File

@ -457,11 +457,11 @@ public class ProcessData : IProcessData
}
}
private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments, bool hasRDS)
private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments)
{
string rds;
string reactor;
if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText) || (segments.Length > 1 && !hasRDS))
if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText))
reactor = defaultReactor;
else
reactor = segments[0];
@ -477,11 +477,11 @@ public class ProcessData : IProcessData
return new(reactor, rds);
}
private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments, bool hasRDS)
private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments)
{
string psn;
string layer;
if (segments.Length <= 2 || (segments.Length > 1 && !hasRDS))
if (segments.Length <= 2)
{
psn = defaultPSN;
layer = defaultLayer;
@ -532,7 +532,17 @@ public class ProcessData : IProcessData
string defaultLayer = string.Empty;
string defaultReactor = string.Empty;
string defaultEmployee = string.Empty;
if (string.IsNullOrEmpty(text) || (text.Length is 2 or 3 && Regex.IsMatch(text, "^[a-zA-z]{2,3}")))
if (Regex.IsMatch(text, @"^[a-zA-z][0-9]{4}$"))
{
lot = text.ToUpper();
psn = defaultPSN;
rds = defaultRDS;
zone = defaultZone;
layer = defaultLayer;
reactor = defaultReactor;
employee = defaultEmployee;
}
else if (string.IsNullOrEmpty(text) || (text.Length is 2 or 3 && Regex.IsMatch(text, "^[a-zA-z]{2,3}")))
{
lot = text;
employee = text;
@ -563,9 +573,9 @@ public class ProcessData : IProcessData
if (lot.Length > 2 && lot[0] == '1' && (lot[1] == 'T' || lot[1] == 't'))
lot = lot.Substring(2);
string[] segments = lot.Split('-');
bool hasRDS = Regex.IsMatch(lot, "[-]?[0-9]{5,}[-]?");
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, lot, segments, hasRDS);
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments, hasRDS);
// bool hasRDS = Regex.IsMatch(lot, "[-]?([QP][0-9]{4,}|[0-9]{5,})[-]?");
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, lot, segments);
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments);
zone = GetZone(segments);
employee = defaultEmployee;
}

View File

@ -22,7 +22,7 @@ steps:
set configuration=Debug
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo ($Configuration)
echo $(Configuration)
displayName: Configuration
- script: |
@ -121,7 +121,15 @@ steps:
testResultsFormat: VSTest
testResultsFiles: "**/*.trx"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: PublishTestResults@2
displayName: "Publish Test Results */coverage.cobertura.xml"
inputs:
testResultsFormat: VSTest
testResultsFiles: "*/coverage.cobertura.xml"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
displayName: "Create work item"

View File

@ -11,7 +11,7 @@
<LangVersion>10.0</LangVersion>
<Nullable>disable</Nullable>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<VSTestLogger>trx</VSTestLogger>
@ -34,7 +34,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.2.0" />
<PackageReference Include="FFMpegCore" Version="5.0.2" />
<PackageReference Include="FFMpegCore" Version="5.1.0" />
<PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.OpenJDK.Media" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
@ -43,7 +43,7 @@
<PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="Instances" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" />

View File

@ -22,11 +22,11 @@ steps:
set configuration=Release
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo ($Configuration)
echo $(Configuration)
displayName: Configuration
- script: |
set nugetSource=https://messa08ec.ec.local/v3/index.json
set nugetSource=https://eaf-prod.mes.infineon.com/v3/index.json
echo %nugetSource%
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
echo $(NugetSource)
@ -118,7 +118,15 @@ steps:
testResultsFormat: VSTest
testResultsFiles: "**/*.trx"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: PublishTestResults@2
displayName: "Publish Test Results */coverage.cobertura.xml"
inputs:
testResultsFormat: VSTest
testResultsFiles: "*/coverage.cobertura.xml"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
displayName: "Create work item"

View File

@ -46,9 +46,7 @@ public class SP101_EQPT : EAFLoggingUnitTesting
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_0__SP101_EQPT__MoveAllFiles()
{

View File

@ -47,9 +47,7 @@ public class SP101 : EAFLoggingUnitTesting
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_0__SP101__txt()
{

View File

@ -6,7 +6,7 @@ using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1;
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_49_0;
[TestClass]
public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
@ -51,7 +51,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__MoveMatchingFiles()
public void Staging__v2_49_0__MET08DDUPSP1TBI__MoveMatchingFiles()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@ -64,7 +64,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__OpenInsightMetrologyViewer()
public void Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@ -77,7 +77,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__IQSSi()
public void Staging__v2_49_0__MET08DDUPSP1TBI__IQSSi()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@ -90,7 +90,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__OpenInsight()
public void Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsight()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@ -103,7 +103,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments()
public void Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@ -116,7 +116,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__APC()
public void Staging__v2_49_0__MET08DDUPSP1TBI__APC()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@ -129,7 +129,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__SPaCe()
public void Staging__v2_49_0__MET08DDUPSP1TBI__SPaCe()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@ -142,7 +142,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__Processed()
public void Staging__v2_49_0__MET08DDUPSP1TBI__Processed()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@ -155,7 +155,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__Archive()
public void Staging__v2_49_0__MET08DDUPSP1TBI__Archive()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@ -168,7 +168,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__Dummy()
public void Staging__v2_49_0__MET08DDUPSP1TBI__Dummy()
{
string check = "637400762024374000.zip";
MethodBase methodBase = new StackFrame().GetMethod();

View File

@ -0,0 +1,63 @@
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.Staging.v2_49_0;
[TestClass]
public class SP101 : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static SP101 EAFLoggingUnitTesting { get; private set; }
static SP101() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy";
public SP101() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public SP101(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new SP101(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 Staging__v2_49_0__SP101__txt()
{
string check = "*.txt";
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"));
}
}

View File

@ -22,15 +22,11 @@ public class SP101
_SP101 = CreateSelfDescription.Staging.v2_47_0.SP101.EAFLoggingUnitTesting;
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_0__SP101__txt() => _SP101.Staging__v2_47_0__SP101__txt();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_0__SP101__txt637955319879801344__Normal()
{

View File

@ -4,7 +4,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Staging.v2_47_1;
namespace Adaptation._Tests.Extract.Staging.v2_49_0;
[TestClass]
public class MET08DDUPSP1TBI
@ -13,31 +13,31 @@ public class MET08DDUPSP1TBI
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_47_1.MET08DDUPSP1TBI _MET08DDUPSP1TBI;
private static CreateSelfDescription.Staging.v2_49_0.MET08DDUPSP1TBI _MET08DDUPSP1TBI;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Staging.v2_47_1.MET08DDUPSP1TBI.ClassInitialize(testContext);
_MET08DDUPSP1TBI = CreateSelfDescription.Staging.v2_47_1.MET08DDUPSP1TBI.EAFLoggingUnitTesting;
CreateSelfDescription.Staging.v2_49_0.MET08DDUPSP1TBI.ClassInitialize(testContext);
_MET08DDUPSP1TBI = CreateSelfDescription.Staging.v2_49_0.MET08DDUPSP1TBI.EAFLoggingUnitTesting;
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__MoveMatchingFiles() => _MET08DDUPSP1TBI.Staging__v2_47_1__MET08DDUPSP1TBI__MoveMatchingFiles();
public void Staging__v2_49_0__MET08DDUPSP1TBI__MoveMatchingFiles() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__MoveMatchingFiles();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__MoveMatchingFiles637955319879801344__Normal()
public void Staging__v2_49_0__MET08DDUPSP1TBI__MoveMatchingFiles637955319879801344__Normal()
{
string check = "*.pdsf";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_MET08DDUPSP1TBI.Staging__v2_47_1__MET08DDUPSP1TBI__MoveMatchingFiles();
_MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__MoveMatchingFiles();
string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
@ -48,29 +48,29 @@ public class MET08DDUPSP1TBI
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__OpenInsightMetrologyViewer() => _MET08DDUPSP1TBI.Staging__v2_47_1__MET08DDUPSP1TBI__OpenInsightMetrologyViewer();
public void Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__IQSSi() => _MET08DDUPSP1TBI.Staging__v2_47_1__MET08DDUPSP1TBI__IQSSi();
public void Staging__v2_49_0__MET08DDUPSP1TBI__IQSSi() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__IQSSi();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__OpenInsight() => _MET08DDUPSP1TBI.Staging__v2_47_1__MET08DDUPSP1TBI__OpenInsight();
public void Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsight() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsight();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__OpenInsight638052814829645888__IqsSql()
public void Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsight638052814829645888__IqsSql()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
_MET08DDUPSP1TBI.Staging__v2_47_1__MET08DDUPSP1TBI__OpenInsight();
_MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsight();
string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
IFileRead fileRead = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
@ -81,36 +81,36 @@ public class MET08DDUPSP1TBI
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments() => _MET08DDUPSP1TBI.Staging__v2_47_1__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments();
public void Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__APC() => _MET08DDUPSP1TBI.Staging__v2_47_1__MET08DDUPSP1TBI__APC();
public void Staging__v2_49_0__MET08DDUPSP1TBI__APC() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__APC();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__SPaCe() => _MET08DDUPSP1TBI.Staging__v2_47_1__MET08DDUPSP1TBI__SPaCe();
public void Staging__v2_49_0__MET08DDUPSP1TBI__SPaCe() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__SPaCe();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__Processed() => _MET08DDUPSP1TBI.Staging__v2_47_1__MET08DDUPSP1TBI__Processed();
public void Staging__v2_49_0__MET08DDUPSP1TBI__Processed() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__Processed();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__Archive() => _MET08DDUPSP1TBI.Staging__v2_47_1__MET08DDUPSP1TBI__Archive();
public void Staging__v2_49_0__MET08DDUPSP1TBI__Archive() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__Archive();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_1__MET08DDUPSP1TBI__Dummy() => _MET08DDUPSP1TBI.Staging__v2_47_1__MET08DDUPSP1TBI__Dummy();
public void Staging__v2_49_0__MET08DDUPSP1TBI__Dummy() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__Dummy();
}

View File

@ -0,0 +1,47 @@
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Staging.v2_49_0;
[TestClass]
public class SP101
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_49_0.SP101 _SP101;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Staging.v2_49_0.SP101.ClassInitialize(testContext);
_SP101 = CreateSelfDescription.Staging.v2_49_0.SP101.EAFLoggingUnitTesting;
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_49_0__SP101__txt() => _SP101.Staging__v2_49_0__SP101__txt();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_49_0__SP101__txt637955319879801344__Normal()
{
string check = "*.txt";
bool validatePDSF = false;
_SP101.Staging__v2_49_0__SP101__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _SP101.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _SP101.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
}
}

View File

@ -36,39 +36,61 @@ public class Job : LoggingUnitTesting, IDisposable
LoggingUnitTesting?.Dispose();
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
[TestMethod]
public void TestJob()
public void TestJobA()
{
FileHandlers.TIBCO.Transport.Job job;
MethodBase methodBase = new StackFrame().GetMethod();
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
string conn = "Data Source=10.95.128.28\\PROD1,53959;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;";
job = new(conn, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"12-123456-1234\", \"Recipe\": \"Recipe\"}");
string lsl2SQLConnectionString = "Data Source=10.95.128.28\\PROD1,53959;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;";
job = new(lsl2SQLConnectionString, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"12-123456-1234\", \"Recipe\": \"Recipe\"}");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "21");
Assert.IsTrue(job.LotName == "123456");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4609");
job = new(conn, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"-544481-\", \"Recipe\": \"Recipe\"}");
job = new(lsl2SQLConnectionString, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"-544481-\", \"Recipe\": \"Recipe\"}");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "51");
Assert.IsTrue(job.LotName == "544481");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5158");
job = new(conn, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-544481-0000\", \"Recipe\": \"Recipe\"}");
job = new(lsl2SQLConnectionString, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-544481-0000\", \"Recipe\": \"Recipe\"}");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "51");
Assert.IsTrue(job.LotName == "544481");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5158");
job = new(conn, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"37\", \"Recipe\": \"Recipe\"}");
job = new(lsl2SQLConnectionString, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"37\", \"Recipe\": \"Recipe\"}");
Assert.IsTrue(job.ProcessType == "37");
Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "549918");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5101");
job = new(conn, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-o171308.1.51-0000\", \"Recipe\": \"Recipe\", \"Slot\": \"11\"}");
job = new(lsl2SQLConnectionString, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-o171308.1.51-0000\", \"Recipe\": \"Recipe\", \"Slot\": \"11\"}");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "54");
Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "547000");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4445");
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
job = new(conn, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-171308.1.51-0000\", \"Recipe\": \"Recipe\", \"Slot\": \"11\"}");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "54");
Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "547000");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4445");
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void TestJobB()
{
MethodBase methodBase = new StackFrame().GetMethod();
FileHandlers.TIBCO.Transport.Job job;
string metrologyFileShare = "\\\\messv02ecc1.ec.local\\EC_Metrology_Si";
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
string lsl2SQLConnectionString = "Data Source=10.95.128.28\\PROD1,53959;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;";
job = new(lsl2SQLConnectionString, metrologyFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"P1234\", \"Recipe\": \"Recipe\"}");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "21");
Assert.IsTrue(job.LotName == "123456");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4609");
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
}

View File

@ -45,9 +45,7 @@ public class MET08DDUPSP1TBI : LoggingUnitTesting, IDisposable
Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString());
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging()
{
@ -55,7 +53,7 @@ public class MET08DDUPSP1TBI : LoggingUnitTesting, IDisposable
StringBuilder results = new();
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
{
new("MET08DDUPSP1TBI", "v2.47.0"),
new("MET08DDUPSP1TBI", "v2.49.0"),
};
string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2";
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;

View File

@ -129,19 +129,68 @@ public class TXT : LoggingUnitTesting, IDisposable
Assert.IsTrue(descriptor.Zone is "1");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("P2-LOW-RR");
Assert.IsTrue(!string.IsNullOrEmpty(descriptor.Lot));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(descriptor.PSN is "RR");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(descriptor.Reactor is "P2");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(descriptor.PSN is "RR");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(descriptor.Reactor is "P2");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("i171308.1.51");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(descriptor.RDS is "i171308.1.51");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("o171308.1.51");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(descriptor.RDS is "o171308.1.51");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("O171308.1.51");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(descriptor.RDS is "O171308.1.51");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("171308.1.51");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(descriptor.RDS is "171308.1.51");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("75-QP1414-SPLIT4");
Assert.IsTrue(!string.IsNullOrEmpty(descriptor.Lot));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(descriptor.PSN is "SPLIT4");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(descriptor.Reactor is "75");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("p5801");
Assert.IsTrue(descriptor.Lot == "P5801");
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("P5801");
Assert.IsTrue(descriptor.Lot == "P5801");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging()
{
@ -149,8 +198,8 @@ public class TXT : LoggingUnitTesting, IDisposable
StringBuilder results = new();
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
{
new("SP101", "v2.47.0"),
new("SP101-EQPT", "v2.47.0"),
new("SP101", "v2.49.0"),
new("SP101-EQPT", "v2.49.0"),
};
string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2";
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;

View File

@ -171,7 +171,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Infineon.EAF.Runtime">
<Version>2.47.0</Version>
<Version>2.49.0</Version>
</PackageReference>
<PackageReference Include="System.Text.Json">
<Version>6.0.3</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
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.47.5.0")]
[assembly: AssemblyFileVersion("2.47.5.0")]
[assembly: AssemblyVersion("2.49.0.0")]
[assembly: AssemblyFileVersion("2.49.0.0")]