MET08RESIHGCV - v2.39.0 - DevOps - Dummy
This commit is contained in:
parent
7ca6604f52
commit
92727df943
6
Adaptation/.vscode/settings.json
vendored
6
Adaptation/.vscode/settings.json
vendored
@ -2,9 +2,11 @@
|
|||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"Ccomp",
|
"Ccomp",
|
||||||
"EQPT",
|
"EQPT",
|
||||||
|
"gpcl",
|
||||||
"HGCV",
|
"HGCV",
|
||||||
"horiz",
|
"horiz",
|
||||||
"IKVM",
|
"IKVM",
|
||||||
|
"ipdsf",
|
||||||
"ISMTP",
|
"ISMTP",
|
||||||
"JOBID",
|
"JOBID",
|
||||||
"linc",
|
"linc",
|
||||||
@ -14,8 +16,10 @@
|
|||||||
"PDFC",
|
"PDFC",
|
||||||
"pdmodel",
|
"pdmodel",
|
||||||
"PDSF",
|
"PDSF",
|
||||||
|
"pdsfc",
|
||||||
"RESIHGCV",
|
"RESIHGCV",
|
||||||
"Rhosl"
|
"Rhosl",
|
||||||
|
"Villach"
|
||||||
],
|
],
|
||||||
"workbench.colorCustomizations": {
|
"workbench.colorCustomizations": {
|
||||||
"activityBar.activeBackground": "#79b2e4",
|
"activityBar.activeBackground": "#79b2e4",
|
||||||
|
@ -220,61 +220,47 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string pathSegment;
|
string sourceParentDirectory;
|
||||||
string monARessource;
|
string targetParentDirectory;
|
||||||
DateTime dateTime = DateTime.Now;
|
DateTime dateTime = DateTime.Now;
|
||||||
if (!_FileConnectorConfiguration.TargetFileLocation.Contains(_FileConnectorConfiguration.SourceFileLocation))
|
if (!string.IsNullOrEmpty(Path.GetFileName(_FileConnectorConfiguration.SourceFileLocation)))
|
||||||
throw new Exception("Target must start with source");
|
sourceParentDirectory = Path.GetDirectoryName(_FileConnectorConfiguration.SourceFileLocation);
|
||||||
|
else
|
||||||
|
sourceParentDirectory = Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.SourceFileLocation));
|
||||||
|
if (!string.IsNullOrEmpty(Path.GetFileName(_FileConnectorConfiguration.TargetFileLocation)))
|
||||||
|
targetParentDirectory = Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation);
|
||||||
|
else
|
||||||
|
targetParentDirectory = Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation));
|
||||||
|
if (sourceParentDirectory != targetParentDirectory)
|
||||||
|
throw new Exception("Target and source must have the same parent for Si Dummy FileConnectorConfiguration!");
|
||||||
bool check = dateTime.Hour > 7 && dateTime.Hour < 18 && dateTime.DayOfWeek != DayOfWeek.Sunday && dateTime.DayOfWeek != DayOfWeek.Saturday;
|
bool check = dateTime.Hour > 7 && dateTime.Hour < 18 && dateTime.DayOfWeek != DayOfWeek.Sunday && dateTime.DayOfWeek != DayOfWeek.Saturday;
|
||||||
if (!_IsEAFHosted || check)
|
if (!_IsEAFHosted || check)
|
||||||
{
|
{
|
||||||
string checkSegment;
|
string monARessource;
|
||||||
string checkDirectory;
|
|
||||||
string sourceFileFilter;
|
string sourceFileFilter;
|
||||||
string sourceArchiveFile;
|
string sourceArchiveFile;
|
||||||
string sourceFileLocation;
|
|
||||||
string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||||
string traceDummyDirectory = Path.Combine(Path.GetPathRoot(_TracePath), "TracesDummy", _CellInstanceName, "Source", $"{dateTime:yyyy}___Week_{weekOfYear}");
|
string traceDummyDirectory = Path.Combine(Path.GetPathRoot(_TracePath), "TracesDummy", _CellInstanceName, "Source", $"{dateTime:yyyy}___Week_{weekOfYear}");
|
||||||
if (!Directory.Exists(traceDummyDirectory))
|
if (!Directory.Exists(traceDummyDirectory))
|
||||||
_ = Directory.CreateDirectory(traceDummyDirectory);
|
_ = Directory.CreateDirectory(traceDummyDirectory);
|
||||||
string traceDummyFile = Path.Combine(traceDummyDirectory, $"{dateTime.Ticks} - {_CellInstanceName}.txt");
|
string traceDummyFile = Path.Combine(traceDummyDirectory, $"{dateTime.Ticks} - {_CellInstanceName}.txt");
|
||||||
File.AppendAllText(traceDummyFile, string.Empty);
|
File.AppendAllText(traceDummyFile, string.Empty);
|
||||||
if (_FileConnectorConfiguration.SourceFileLocation.EndsWith("\\"))
|
|
||||||
sourceFileLocation = _FileConnectorConfiguration.SourceFileLocation;
|
|
||||||
else
|
|
||||||
sourceFileLocation = string.Concat(_FileConnectorConfiguration.SourceFileLocation, '\\');
|
|
||||||
for (int i = 0; i < _FileConnectorConfiguration.SourceFileFilters.Count; i++)
|
for (int i = 0; i < _FileConnectorConfiguration.SourceFileFilters.Count; i++)
|
||||||
{
|
{
|
||||||
_LastDummyRunIndex += 1;
|
_LastDummyRunIndex += 1;
|
||||||
if (_LastDummyRunIndex >= _FileConnectorConfiguration.SourceFileFilters.Count)
|
if (_LastDummyRunIndex >= _FileConnectorConfiguration.SourceFileFilters.Count)
|
||||||
_LastDummyRunIndex = 0;
|
_LastDummyRunIndex = 0;
|
||||||
sourceFileFilter = _FileConnectorConfiguration.SourceFileFilters[_LastDummyRunIndex];
|
sourceFileFilter = _FileConnectorConfiguration.SourceFileFilters[_LastDummyRunIndex];
|
||||||
sourceArchiveFile = Path.GetFullPath(string.Concat(sourceFileLocation, sourceFileFilter));
|
sourceArchiveFile = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, sourceFileFilter);
|
||||||
if (File.Exists(sourceArchiveFile))
|
if (File.Exists(sourceArchiveFile))
|
||||||
{
|
{
|
||||||
checkSegment = _FileConnectorConfiguration.TargetFileLocation.Substring(sourceFileLocation.Length);
|
|
||||||
checkDirectory = Path.GetDirectoryName(sourceArchiveFile);
|
|
||||||
for (int z = 0; z < int.MaxValue; z++)
|
|
||||||
{
|
|
||||||
if (checkDirectory.Length < sourceFileLocation.Length || !checkDirectory.StartsWith(sourceFileLocation))
|
|
||||||
break;
|
|
||||||
checkDirectory = Path.GetDirectoryName(checkDirectory);
|
|
||||||
if (Directory.Exists(Path.Combine(checkDirectory, checkSegment)))
|
|
||||||
{
|
|
||||||
checkDirectory = Path.Combine(checkDirectory, checkSegment);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!checkDirectory.EndsWith(checkSegment))
|
|
||||||
throw new Exception("Could not determine dummy target directory for extract!");
|
|
||||||
if (!long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence))
|
if (!long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence))
|
||||||
throw new Exception("Invalid file name for source archive file!");
|
throw new Exception("Invalid file name for source archive file!");
|
||||||
pathSegment = checkDirectory.Substring(sourceFileLocation.Length);
|
monARessource = GetCellName(sourceArchiveFile);
|
||||||
monARessource = GetCellName(pathSegment);
|
|
||||||
if (string.IsNullOrEmpty(monARessource))
|
if (string.IsNullOrEmpty(monARessource))
|
||||||
throw new Exception("Could not determine which cell archive file is associated with!");
|
throw new Exception("Could not determine which cell archive file is associated with!");
|
||||||
if (_IsEAFHosted)
|
if (_IsEAFHosted)
|
||||||
CallbackFileExists(sourceArchiveFile, traceDummyFile, checkDirectory, monARessource, sequence);
|
CallbackFileExists(sourceArchiveFile, traceDummyFile, _FileConnectorConfiguration.TargetFileLocation, monARessource, sequence);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), true, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), true, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 15;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
_Logistics = new Logistics(this);
|
_Logistics = new Logistics(this);
|
||||||
if (_FileParameter is null)
|
if (_FileParameter is null)
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
<SccLocalPath>SAK</SccLocalPath>
|
<SccLocalPath>SAK</SccLocalPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<LangVersion>10.0</LangVersion>
|
||||||
|
<Nullable>disable</Nullable>
|
||||||
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -29,4 +29,28 @@ public class HGCV3
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_39_0__HGCV3__pcl() => _HGCV3.Staging__v2_39_0__HGCV3__pcl();
|
public void Staging__v2_39_0__HGCV3__pcl() => _HGCV3.Staging__v2_39_0__HGCV3__pcl();
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__HGCV3__pcl637812984345592512__MinFileLength()
|
||||||
|
{
|
||||||
|
string check = "*.pcl";
|
||||||
|
_HGCV3.Staging__v2_39_0__HGCV3__pcl();
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
string[] variables = _HGCV3.AdaptationTesting.GetVariables(methodBase, check);
|
||||||
|
IFileRead fileRead = _HGCV3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = Helpers.Metrology.ReExtractComapareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__HGCV3__pcl637816384579205568__Normal()
|
||||||
|
{
|
||||||
|
string check = "*.pcl";
|
||||||
|
_HGCV3.Staging__v2_39_0__HGCV3__pcl();
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
string[] variables = _HGCV3.AdaptationTesting.GetVariables(methodBase, check);
|
||||||
|
IFileRead fileRead = _HGCV3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = Helpers.Metrology.ReExtractComapareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -65,4 +65,7 @@ public class MET08RESIHGCV
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV________() => _MET08RESIHGCV.Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV________();
|
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV________() => _MET08RESIHGCV.Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV________();
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV________637816296802048814__Normal() => _MET08RESIHGCV.Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV________();
|
||||||
|
|
||||||
}
|
}
|
@ -10,6 +10,9 @@
|
|||||||
"AW-CreateSelfDescription.Staging.v2_39_0-HGCV2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~HGCV2\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"AW-CreateSelfDescription.Staging.v2_39_0-HGCV2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~HGCV2\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"AY-CreateSelfDescription.Staging.v2_39_0-HGCV3": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~HGCV3\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"AY-CreateSelfDescription.Staging.v2_39_0-HGCV3": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~HGCV3\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"AZ-CreateSelfDescription.Staging.v2_39_0": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"AZ-CreateSelfDescription.Staging.v2_39_0": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
|
"BA-Extract.Staging.v2_39_0-HGCV3-Staging__v2_39_0__HGCV3__pcl637812984345592512__MinFileLength": "dotnet test --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~HGCV3 & Staging__v2_39_0__HGCV3__pcl637812984345592512__MinFileLength\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
|
"BB-Extract.Staging.v2_39_0-HGCV3-Staging__v2_39_0__HGCV3__pcl637816384579205568__Normal": "dotnet test --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~HGCV3 & Staging__v2_39_0__HGCV3__pcl637816384579205568__Normal\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
|
"BC-Extract.Staging.v2_39_0-MET08RESIHGCV-Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV________637816296802048814__Normal": "dotnet test --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~MET08RESIHGCV & Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV________637816296802048814__Normal\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"BS-Extract.Staging.v2_39_0-MET08RESIHGCV": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~MET08RESIHGCV\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"BS-Extract.Staging.v2_39_0-MET08RESIHGCV": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~MET08RESIHGCV\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"BU-Extract.Staging.v2_39_0-HGCV1": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~HGCV1\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"BU-Extract.Staging.v2_39_0-HGCV1": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~HGCV1\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"BW-Extract.Staging.v2_39_0-HGCV2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~HGCV2\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"BW-Extract.Staging.v2_39_0-HGCV2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~HGCV2\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user