From 5c2a3c97e9008f72b4e9979900451d98754b0158 Mon Sep 17 00:00:00 2001 From: "phares@iscn5cg20977xq" Date: Tue, 2 Sep 2025 07:55:26 -0700 Subject: [PATCH] Switched to xml for InfinityQS export --- Adaptation/.vscode/launch.json | 39 ++---------------- Adaptation/FileHandlers/IQSSi/FileRead.cs | 15 ------- Adaptation/MET08DDUPSP1TBI.yml | 36 ----------------- .../Shared/ProcessDataStandardFormat.cs | 40 ++++++++++++++++++- 4 files changed, 41 insertions(+), 89 deletions(-) diff --git a/Adaptation/.vscode/launch.json b/Adaptation/.vscode/launch.json index f8bf7e8..81eaea2 100644 --- a/Adaptation/.vscode/launch.json +++ b/Adaptation/.vscode/launch.json @@ -1,43 +1,10 @@ { "configurations": [ - { - "mode": "debug", - "name": "Go launch file", - "program": "${file}", - "request": "launch", - "type": "go" - }, - { - "name": "node Launch Current Opened File", - "program": "${file}", - "request": "launch", - "type": "node" - }, - { - "cwd": "${workspaceFolder}", - "internalConsoleOptions": "neverOpen", - "name": "Debug File", - "program": "${file}", - "request": "launch", - "stopOnEntry": false, - "type": "bun", - "watchMode": false - }, - { - "cwd": "${workspaceFolder}", - "internalConsoleOptions": "neverOpen", - "name": "Run File", - "noDebug": true, - "program": "${file}", - "request": "launch", - "type": "bun", - "watchMode": false - }, { "name": ".NET Core Attach", - "processId": 32760, + "type": "coreclr", "request": "attach", - "type": "coreclr" + "processId": 13604 } ] -} \ No newline at end of file +} diff --git a/Adaptation/FileHandlers/IQSSi/FileRead.cs b/Adaptation/FileHandlers/IQSSi/FileRead.cs index 3c2b46a..4407e9b 100644 --- a/Adaptation/FileHandlers/IQSSi/FileRead.cs +++ b/Adaptation/FileHandlers/IQSSi/FileRead.cs @@ -186,19 +186,6 @@ public class FileRead : Shared.FileRead, IFileRead } } - private void FileCopy(string reportFullPath, DateTime dateTime, List descriptions) where T : Shared.Properties.IDescription - { - bool isDummyRun = false; - string successDirectory = string.Empty; - List<(Shared.Properties.IScopeInfo, string)> collection = new(); - string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName); - if (!Directory.Exists(duplicateDirectory)) - _ = Directory.CreateDirectory(duplicateDirectory); - string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath)); - File.Copy(reportFullPath, duplicateFile, overwrite: true); - WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile); - } - private void WriteFile(string reportFullPath, DateTime dateTime, List descriptions) where T : Shared.Properties.IDescription { bool isDummyRun = false; @@ -225,8 +212,6 @@ public class FileRead : Shared.FileRead, IFileRead if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) SaveIQSFile(reportFullPath, dateTime, descriptions, tests); if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) - FileCopy(reportFullPath, dateTime, descriptions); - if (string.IsNullOrEmpty(reportFullPath) && _IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) WriteFile(reportFullPath, dateTime, descriptions); results = new Tuple>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List()); return results; diff --git a/Adaptation/MET08DDUPSP1TBI.yml b/Adaptation/MET08DDUPSP1TBI.yml index 435707e..7b8da1f 100644 --- a/Adaptation/MET08DDUPSP1TBI.yml +++ b/Adaptation/MET08DDUPSP1TBI.yml @@ -41,24 +41,6 @@ stages: displayName: "Nuget Clear" enabled: false - - task: CopyFiles@2 - displayName: 'Copy GhostPCL Files to: D:\EAF-Mesa-Integration\copy' - inputs: - Contents: "*" - SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL' - TargetFolder: 'D:\EAF-Mesa-Integration\copy\GhostPCL' - OverWrite: true - enabled: false - - - task: CopyFiles@2 - displayName: 'Copy LincPDFC Files to: D:\EAF-Mesa-Integration\copy' - inputs: - Contents: "*" - SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC' - TargetFolder: 'D:\EAF-Mesa-Integration\copy\LincPDFC' - OverWrite: true - enabled: false - - script: | "C:\program files\dotnet\dotnet.exe" user-secrets init "C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)" @@ -202,24 +184,6 @@ stages: displayName: "Nuget Clear" enabled: false - - task: CopyFiles@2 - displayName: 'Copy GhostPCL Files to: D:\EAF-Mesa-Integration\copy' - inputs: - Contents: "*" - SourceFolder: '\\mestsa003.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL' - TargetFolder: 'D:\EAF-Mesa-Integration\copy\GhostPCL' - OverWrite: true - enabled: false - - - task: CopyFiles@2 - displayName: 'Copy LincPDFC Files to: D:\EAF-Mesa-Integration\copy' - inputs: - Contents: "*" - SourceFolder: '\\mestsa003.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC' - TargetFolder: 'D:\EAF-Mesa-Integration\copy\LincPDFC' - OverWrite: true - enabled: false - - script: | "C:\program files\dotnet\dotnet.exe" user-secrets init "C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)" diff --git a/Adaptation/Shared/ProcessDataStandardFormat.cs b/Adaptation/Shared/ProcessDataStandardFormat.cs index 0b7a561..1fb9e2a 100644 --- a/Adaptation/Shared/ProcessDataStandardFormat.cs +++ b/Adaptation/Shared/ProcessDataStandardFormat.cs @@ -872,6 +872,8 @@ internal class ProcessDataStandardFormat string tag; string value; string[] segments; + List values; + Dictionary> results = new(); ReadOnlyCollection body = processDataStandardFormat.InputPDSF is null ? processDataStandardFormat.Body : processDataStandardFormat.InputPDSF.Body; ReadOnlyCollection columns = processDataStandardFormat.InputPDSF is null ? @@ -879,7 +881,6 @@ internal class ProcessDataStandardFormat List lines = new() { "", "" }; for (int i = 0; i < body.Count; i++) { - lines.Add(" "); segments = body[i].Trim().Split('\t'); if (segments.Length != columns.Count) break; @@ -891,7 +892,42 @@ internal class ProcessDataStandardFormat .Replace("\"", """) .Replace("'", "'"); tag = Regex.Replace(columns[c].Trim('"'), @"[^a-zA-Z0-9]", "_").Split('\r')[0].Split('\n')[0]; - lines.Add(string.Concat(" <", tag, '>', value, "')); + if (i == 0) + { + if (results.ContainsKey(tag)) + continue; + results.Add(tag, new List()); + } + results[tag].Add(value); + } + } + foreach (KeyValuePair> keyValuePair in results) + { + if (body.Count < 3) + break; + if (keyValuePair.Value.Count != body.Count) + continue; + values = keyValuePair.Value.Distinct().ToList(); + if (values.Count == 2 && (string.IsNullOrEmpty(values[0]) || string.IsNullOrEmpty(values[1]))) + { + for (int i = 0; i < body.Count; i++) + keyValuePair.Value[i] = string.Empty; + foreach (string v in values) + { + if (string.IsNullOrEmpty(v)) + continue; + keyValuePair.Value[0] = v; + } + } + } + for (int i = 0; i < body.Count; i++) + { + lines.Add(" "); + foreach (KeyValuePair> keyValuePair in results) + { + if (keyValuePair.Value.Count != body.Count) + continue; + lines.Add(string.Concat(" <", keyValuePair.Key, '>', keyValuePair.Value[i], "')); } lines.Add(" "); }