Compare commits
	
		
			2 Commits
		
	
	
		
			4c31d530b0
			...
			d3b9f841d6
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| d3b9f841d6 | |||
| 54d9c3f714 | 
| @ -121,6 +121,7 @@ dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]cs | |||||||
| dotnet_diagnostic.IDE0300.severity = none # IDE0300: Collection initialization can be simplified | dotnet_diagnostic.IDE0300.severity = none # IDE0300: Collection initialization can be simplified | ||||||
| dotnet_diagnostic.IDE0301.severity = none #IDE0301: Collection initialization can be simplified | dotnet_diagnostic.IDE0301.severity = none #IDE0301: Collection initialization can be simplified | ||||||
| dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified | dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified | ||||||
|  | dotnet_diagnostic.MSTEST0037.severity = error # MSTEST0037: Use proper 'Assert' methods | ||||||
| dotnet_diagnostic.SYSLIB1045.severity = none # SYSLIB1045: diagnostics for regex source generation | dotnet_diagnostic.SYSLIB1045.severity = none # SYSLIB1045: diagnostics for regex source generation | ||||||
| dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning | dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning | ||||||
| dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case | dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case | ||||||
|  | |||||||
							
								
								
									
										20
									
								
								Adaptation/.vscode/tasks.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								Adaptation/.vscode/tasks.json
									
									
									
									
										vendored
									
									
								
							| @ -82,6 +82,26 @@ | |||||||
|             "command": "code ../MET08AWCT.csproj", |             "command": "code ../MET08AWCT.csproj", | ||||||
|             "problemMatcher": [] |             "problemMatcher": [] | ||||||
|         }, |         }, | ||||||
|  |         { | ||||||
|  |             "label": "Readme", | ||||||
|  |             "type": "shell", | ||||||
|  |             "command": "code ../README.md", | ||||||
|  |             "problemMatcher": [] | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |             "label": "File-Folder-Helper AOT s X Day-Helper-2025-03-20", | ||||||
|  |             "type": "shell", | ||||||
|  |             "command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe", | ||||||
|  |             "args": [ | ||||||
|  |                 "s", | ||||||
|  |                 "X", | ||||||
|  |                 "L:/DevOps/EAF-Mesa-Integration/MET08AWCT", | ||||||
|  |                 "Day-Helper-2025-03-20", | ||||||
|  |                 "false", | ||||||
|  |                 "4" | ||||||
|  |             ], | ||||||
|  |             "problemMatcher": [] | ||||||
|  |         }, | ||||||
|         { |         { | ||||||
|             "label": "Git Config", |             "label": "Git Config", | ||||||
|             "type": "shell", |             "type": "shell", | ||||||
|  | |||||||
| @ -26,7 +26,7 @@ public class FileRead : Shared.FileRead, IFileRead | |||||||
|     private static PropertyInfo? _PropertyInfo; |     private static PropertyInfo? _PropertyInfo; | ||||||
|     private static NetworkStream? _NetworkStream; |     private static NetworkStream? _NetworkStream; | ||||||
|  |  | ||||||
|     public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : |     public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : | ||||||
|         base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) |         base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) | ||||||
|     { |     { | ||||||
|         if (_FileConnectorConfiguration.FileScanningIntervalInSeconds is null) |         if (_FileConnectorConfiguration.FileScanningIntervalInSeconds is null) | ||||||
|  | |||||||
| @ -9,7 +9,7 @@ namespace Adaptation.FileHandlers; | |||||||
| public class CellInstanceConnectionName | public class CellInstanceConnectionName | ||||||
| { | { | ||||||
|  |  | ||||||
|     internal static IFileRead Get(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, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, int? connectionCount) |     internal static IFileRead Get(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, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, int? connectionCount) | ||||||
|     { |     { | ||||||
|         IFileRead result = cellInstanceConnectionName switch |         IFileRead result = cellInstanceConnectionName switch | ||||||
|         { |         { | ||||||
|  | |||||||
| @ -23,7 +23,7 @@ public class FileRead : Shared.FileRead, IFileRead | |||||||
|     private int _LastDummyRunIndex; |     private int _LastDummyRunIndex; | ||||||
|     private readonly string[] _CellNames; |     private readonly string[] _CellNames; | ||||||
|  |  | ||||||
|     public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : |     public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : | ||||||
|         base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) |         base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) | ||||||
|     { |     { | ||||||
|         _MinFileLength = 10; |         _MinFileLength = 10; | ||||||
|  | |||||||
| @ -27,7 +27,7 @@ public class FileRead : Shared.FileRead, IFileRead | |||||||
|     private static PropertyInfo? _PropertyInfo; |     private static PropertyInfo? _PropertyInfo; | ||||||
|     private static NetworkStream? _NetworkStream; |     private static NetworkStream? _NetworkStream; | ||||||
|  |  | ||||||
|     public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : |     public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : | ||||||
|         base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) |         base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) | ||||||
|     { |     { | ||||||
|         if (_FileConnectorConfiguration.FileScanningIntervalInSeconds is null) |         if (_FileConnectorConfiguration.FileScanningIntervalInSeconds is null) | ||||||
|  | |||||||
| @ -1,163 +1 @@ | |||||||
| trigger: | # dotnet nuget push --source https://tfs.intra.infineon.com/tfs/FactoryIntegration/fccf8303-9cf7-4788-a9e0-4042541503fa/_packaging/EAF-Mesa-Integration/nuget/v3/index.json --api-key az D:\vsts-agent-win-x64-2.210.1-eaf\nuget\infineon.mesa.pdf.text.stripper.4.8.0.1.nupkg | ||||||
|   branches: |  | ||||||
|     include: |  | ||||||
|       - Development |  | ||||||
|   paths: |  | ||||||
|     include: |  | ||||||
|       - "Adaptation/*" |  | ||||||
|  |  | ||||||
| pool: |  | ||||||
|   name: eaf |  | ||||||
|   demands: MET08AWCT-Development |  | ||||||
|  |  | ||||||
| steps: |  | ||||||
|   - script: | |  | ||||||
|       set coreVersion=net7.0 |  | ||||||
|       echo %coreVersion% |  | ||||||
|       echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion% |  | ||||||
|       echo $(CoreVersion) |  | ||||||
|     displayName: CoreVersion |  | ||||||
|  |  | ||||||
|   - script: | |  | ||||||
|       set configuration=Debug |  | ||||||
|       echo %configuration% |  | ||||||
|       echo ##vso[task.setvariable variable=Configuration;]%configuration% |  | ||||||
|       echo $(Configuration) |  | ||||||
|     displayName: Configuration |  | ||||||
|  |  | ||||||
|   - script: | |  | ||||||
|       set nugetSource=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/index.json;D:/vsts-agent-win-x64-2.210.1-eaf/nuget |  | ||||||
|       echo %nugetSource% |  | ||||||
|       echo ##vso[task.setvariable variable=NugetSource;]%nugetSource% |  | ||||||
|       echo $(NugetSource) |  | ||||||
|     displayName: NugetSource |  | ||||||
|  |  | ||||||
|   - script: | |  | ||||||
|       set gitCommit=$(Build.SourceVersion) |  | ||||||
|       set gitCommitSeven=%gitCommit:~0,7% |  | ||||||
|       echo %gitCommitSeven% |  | ||||||
|       echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven% |  | ||||||
|       echo $(GitCommitSeven) |  | ||||||
|     displayName: GitCommitSeven |  | ||||||
|  |  | ||||||
|   - script: | |  | ||||||
|       echo $(Build.BuildId) |  | ||||||
|       echo $(Build.Reason) |  | ||||||
|       echo $(Build.Repository.Id) |  | ||||||
|       echo $(Build.Repository.Name) |  | ||||||
|       echo $(Build.SourceVersion) |  | ||||||
|       echo $(CoreVersion) |  | ||||||
|       echo $(Configuration) |  | ||||||
|       echo $(NugetSource) |  | ||||||
|       echo $(GitCommitSeven) |  | ||||||
|       REM echo $(pipelinePassword) |  | ||||||
|     displayName: "Echo Check" |  | ||||||
|  |  | ||||||
|   - script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear' |  | ||||||
|     displayName: "Nuget Clear" |  | ||||||
|     enabled: false |  | ||||||
|  |  | ||||||
|   - script: | |  | ||||||
|       "C:\program files\dotnet\dotnet.exe" user-secrets init |  | ||||||
|       "C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)" |  | ||||||
|       "C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)" |  | ||||||
|       "C:\program files\dotnet\dotnet.exe" user-secrets list |  | ||||||
|     workingDirectory: Adaptation |  | ||||||
|     displayName: "Safe storage of app secrets - Adaptation" |  | ||||||
|  |  | ||||||
|   - script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)' |  | ||||||
|     workingDirectory: Adaptation |  | ||||||
|     displayName: "Core Build - Adaptation" |  | ||||||
|  |  | ||||||
|   - powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse } |  | ||||||
|     workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)" |  | ||||||
|     displayName: "PowerShell Script" |  | ||||||
|     continueOnError: true |  | ||||||
|  |  | ||||||
|   - script: "dotnet test --configuration $(Configuration)" |  | ||||||
|     workingDirectory: Adaptation |  | ||||||
|     displayName: "Core Test" |  | ||||||
|  |  | ||||||
|   - script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)' |  | ||||||
|     displayName: "Move Results" |  | ||||||
|  |  | ||||||
|   - script: '"C:\program files\dotnet\dotnet.exe" tool restore' |  | ||||||
|     workingDirectory: Adaptation |  | ||||||
|     displayName: "Tool Restore" |  | ||||||
|     enabled: false |  | ||||||
|  |  | ||||||
|   - script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark' |  | ||||||
|     workingDirectory: Adaptation |  | ||||||
|     displayName: "Report Generator" |  | ||||||
|     enabled: false |  | ||||||
|  |  | ||||||
|   - task: PublishTestResults@2 |  | ||||||
|     displayName: "Publish Test Results **/*.trx" |  | ||||||
|     inputs: |  | ||||||
|       testResultsFormat: VSTest |  | ||||||
|       testResultsFiles: "**/*.trx" |  | ||||||
|       testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)" |  | ||||||
|       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" |  | ||||||
|     inputs: |  | ||||||
|       teamProject: "Mesa_FI" |  | ||||||
|       workItemType: Bug |  | ||||||
|       title: $(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration) |  | ||||||
|       assignedTo: "$(Build.RequestedForId)" |  | ||||||
|     enabled: false |  | ||||||
|  |  | ||||||
|   - script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Adaptation --source $(NugetSource)' |  | ||||||
|     workingDirectory: Adaptation |  | ||||||
|     displayName: "Core Publish" |  | ||||||
|     enabled: false |  | ||||||
|  |  | ||||||
|   - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources="$(NugetSource)"' |  | ||||||
|     displayName: "MSBuild Restore" |  | ||||||
|  |  | ||||||
|   - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8' |  | ||||||
|     displayName: MSBuild |  | ||||||
|  |  | ||||||
|   - script: 'echo $(Build.SourceVersion)-$(Build.BuildId)-$(Build.Repository.Name)>bin\$(Configuration)\$(Build.Repository.Name).txt' |  | ||||||
|     displayName: "Commit Id" |  | ||||||
|  |  | ||||||
|   - task: CopyFiles@2 |  | ||||||
|     displayName: 'Copy Files to: D:\Framework4.8' |  | ||||||
|     inputs: |  | ||||||
|       Contents: "*$(Build.Repository.Name)*" |  | ||||||
|       SourceFolder: 'bin\$(Configuration)' |  | ||||||
|       TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)' |  | ||||||
|       OverWrite: true |  | ||||||
|     enabled: false |  | ||||||
|  |  | ||||||
|   - task: CopyFiles@2 |  | ||||||
|     displayName: 'Copy Files to: Local D EAF Deployment Storage' |  | ||||||
|     inputs: |  | ||||||
|       Contents: "*$(Build.Repository.Name)*" |  | ||||||
|       SourceFolder: 'bin\$(Configuration)' |  | ||||||
|       TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)' |  | ||||||
|       OverWrite: true |  | ||||||
|     enabled: false |  | ||||||
|  |  | ||||||
|   - script: | |  | ||||||
|       "C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration) |  | ||||||
|     workingDirectory: Adaptation |  | ||||||
|     displayName: "Core Clean - Tests" |  | ||||||
|  |  | ||||||
|   - script: | |  | ||||||
|       "C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration) |  | ||||||
|     workingDirectory: Adaptation |  | ||||||
|     displayName: "Core Clean - Adaptation" |  | ||||||
|  |  | ||||||
|   - script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt' |  | ||||||
|     displayName: "Force Fail" |  | ||||||
|     enabled: false |  | ||||||
| @ -69,7 +69,7 @@ | |||||||
|         <PackageReference Include="System.Text.Json" Version="9.0.0" /> |         <PackageReference Include="System.Text.Json" Version="9.0.0" /> | ||||||
|     </ItemGroup> |     </ItemGroup> | ||||||
|     <ItemGroup> |     <ItemGroup> | ||||||
|         <PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.1"><NoWarn>NU1701</NoWarn></PackageReference> |         <PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.2"><NoWarn>NU1701</NoWarn></PackageReference> | ||||||
|     </ItemGroup> |     </ItemGroup> | ||||||
|     <ItemGroup> |     <ItemGroup> | ||||||
|         <PackageReference Include="Infineon.Yoda.DotNetCore" Version="5.4.3" /> |         <PackageReference Include="Infineon.Yoda.DotNetCore" Version="5.4.3" /> | ||||||
|  | |||||||
| @ -1,3 +1,9 @@ | |||||||
|  | # D: | ||||||
|  | # cd D:\EAF-Mesa-Integration | ||||||
|  | # config --url https://tfs.intra.infineon.com/tfs/FactoryIntegration --pool "EAF Mesa Integration" --agent mestsa003-meseafsvc --work _work --runAsService --auth negotiate --userName infineon\phares | ||||||
|  | # D: | ||||||
|  | # cd D:\EAF-Mesa-Integration | ||||||
|  | # config --url https://tfs.intra.infineon.com/tfs/FactoryIntegration --pool "EAF Mesa Integration" --agent mestsa07ec-ecmeseaf --work _work --runAsService --auth negotiate --userName infineon\phares | ||||||
| trigger: | trigger: | ||||||
|   branches: |   branches: | ||||||
|     include: |     include: | ||||||
| @ -6,159 +12,273 @@ trigger: | |||||||
|     include: |     include: | ||||||
|       - "Adaptation/*" |       - "Adaptation/*" | ||||||
|  |  | ||||||
| pool: | stages: | ||||||
|   name: eaf |   - stage: DevServer | ||||||
|   demands: MET08AWCT |     displayName: DevServer | ||||||
|  |  | ||||||
| steps: |     pool: | ||||||
|   - script: | |       name: EAF Mesa Integration | ||||||
|       set coreVersion=net7.0 |       demands: MET08AWCT-Development | ||||||
|       echo %coreVersion% |  | ||||||
|       echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion% |  | ||||||
|       echo $(CoreVersion) |  | ||||||
|     displayName: CoreVersion |  | ||||||
|  |  | ||||||
|   - script: | |     variables: | ||||||
|       set configuration=Release |       coreVersion: "net8.0" | ||||||
|       echo %configuration% |       nugetSource: "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/" | ||||||
|       echo ##vso[task.setvariable variable=Configuration;]%configuration% |  | ||||||
|       echo $(Configuration) |  | ||||||
|     displayName: Configuration |  | ||||||
|  |  | ||||||
|   - script: | |     jobs: | ||||||
|       REM set nugetSource=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/ |       - job: SetupEnvironment | ||||||
|       set nugetSource=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/index.json;D:/vsts-agent-win-x64-2.210.1-eaf/nuget |         steps: | ||||||
|       echo %nugetSource% |           - script: | | ||||||
|       echo ##vso[task.setvariable variable=NugetSource;]%nugetSource% |               echo $(Build.BuildId) | ||||||
|       echo $(NugetSource) |               echo $(Build.Reason) | ||||||
|     displayName: NugetSource |               echo $(Build.Repository.Id) | ||||||
|  |               echo $(Build.Repository.Name) | ||||||
|  |               echo $(Build.SourceVersion) | ||||||
|  |               echo $(CoreVersion) | ||||||
|  |               echo $(NugetSource) | ||||||
|  |             displayName: "Echo Check" | ||||||
|  |  | ||||||
|   - script: | |           - script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear' | ||||||
|       set gitCommit=$(Build.SourceVersion) |             displayName: "Nuget Clear" | ||||||
|       set gitCommitSeven=%gitCommit:~0,7% |             enabled: false | ||||||
|       echo %gitCommitSeven% |  | ||||||
|       echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven% |  | ||||||
|       echo $(GitCommitSeven) |  | ||||||
|     displayName: GitCommitSeven |  | ||||||
|  |  | ||||||
|   - script: | |           - script: | | ||||||
|       echo $(Build.BuildId) |               "C:\program files\dotnet\dotnet.exe" user-secrets init | ||||||
|       echo $(Build.Reason) |               "C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)" | ||||||
|       echo $(Build.Repository.Id) |               "C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommit" "$(Build.SourceVersion)" | ||||||
|       echo $(Build.Repository.Name) |               "C:\program files\dotnet\dotnet.exe" user-secrets list | ||||||
|       echo $(Build.SourceVersion) |             workingDirectory: Adaptation | ||||||
|       echo $(CoreVersion) |             displayName: "Safe storage of app secrets - Adaptation" | ||||||
|       echo $(Configuration) |  | ||||||
|       echo $(NugetSource) |  | ||||||
|       echo $(GitCommitSeven) |  | ||||||
|       REM echo $(pipelinePassword) |  | ||||||
|     displayName: "Echo Check" |  | ||||||
|  |  | ||||||
|   - script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear' |       - job: BuildDebug | ||||||
|     displayName: "Nuget Clear" |         dependsOn: | ||||||
|     enabled: false |           - SetupEnvironment | ||||||
|  |         steps: | ||||||
|  |           - script: | | ||||||
|  |               set configuration=Debug | ||||||
|  |               echo %configuration% | ||||||
|  |               echo ##vso[task.setvariable variable=Configuration;]%configuration% | ||||||
|  |               echo $(Configuration) | ||||||
|  |             displayName: Configuration | ||||||
|  |  | ||||||
|   - script: | |           - script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)' | ||||||
|       "C:\program files\dotnet\dotnet.exe" user-secrets init |             workingDirectory: Adaptation | ||||||
|       "C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)" |             displayName: "Core Build - Adaptation" | ||||||
|       "C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)" |  | ||||||
|       "C:\program files\dotnet\dotnet.exe" user-secrets list |  | ||||||
|     workingDirectory: Adaptation |  | ||||||
|     displayName: "Safe storage of app secrets - Adaptation" |  | ||||||
|  |  | ||||||
|   - script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)' |       - job: BuildRelease | ||||||
|     workingDirectory: Adaptation |         dependsOn: | ||||||
|     displayName: "Core Build - Adaptation" |           - SetupEnvironment | ||||||
|  |         steps: | ||||||
|  |           - script: | | ||||||
|  |               set configuration=Release | ||||||
|  |               echo %configuration% | ||||||
|  |               echo ##vso[task.setvariable variable=Configuration;]%configuration% | ||||||
|  |               echo $(Configuration) | ||||||
|  |             displayName: Configuration | ||||||
|  |  | ||||||
|   - powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse } |           - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)' | ||||||
|     workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)" |             displayName: "MSBuild Restore" | ||||||
|     displayName: "PowerShell Script" |  | ||||||
|     continueOnError: true |  | ||||||
|  |  | ||||||
|   - script: "dotnet test --configuration $(Configuration) --runtime win-x86" |           - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8' | ||||||
|     workingDirectory: Adaptation |             displayName: MSBuild | ||||||
|     displayName: "Core Test" |  | ||||||
|  |  | ||||||
|   - script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)' |           - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8' | ||||||
|     displayName: "Move Results" |             displayName: MSBuild | ||||||
|  |  | ||||||
|   - script: '"C:\program files\dotnet\dotnet.exe" tool restore' |           - script: 'echo $(Build.Repository.Name)-$(Build.BuildId)-$(Build.SourceVersion)>bin\$(Configuration)\$(Build.Repository.Name).txt' | ||||||
|     workingDirectory: Adaptation |             displayName: "Commit Id" | ||||||
|     displayName: "Tool Restore" |  | ||||||
|     enabled: false |  | ||||||
|  |  | ||||||
|   - script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark' |           - task: CopyFiles@2 | ||||||
|     workingDirectory: Adaptation |             displayName: 'Copy Files to: D:\EAF' | ||||||
|     displayName: "Report Generator" |             inputs: | ||||||
|     enabled: false |               Contents: "*$(Build.Repository.Name)*" | ||||||
|  |               SourceFolder: 'bin\$(Configuration)' | ||||||
|  |               TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)' | ||||||
|  |               OverWrite: true | ||||||
|  |             enabled: true | ||||||
|  |  | ||||||
|   - task: PublishTestResults@2 |       - job: TestDebug | ||||||
|     displayName: "Publish Test Results **/*.trx" |         dependsOn: | ||||||
|     inputs: |           - SetupEnvironment | ||||||
|       testResultsFormat: VSTest |           - BuildDebug | ||||||
|       testResultsFiles: "**/*.trx" |           - BuildRelease | ||||||
|       testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)" |         steps: | ||||||
|       searchFolder: "$(System.DefaultWorkingDirectory)/TestResults" |           - script: | | ||||||
|  |               set configuration=Debug | ||||||
|  |               echo %configuration% | ||||||
|  |               echo ##vso[task.setvariable variable=Configuration;]%configuration% | ||||||
|  |               echo $(Configuration) | ||||||
|  |             displayName: Configuration | ||||||
|  |  | ||||||
|   - task: PublishTestResults@2 |           - powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse } | ||||||
|     displayName: "Publish Test Results */coverage.cobertura.xml" |             workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)" | ||||||
|     inputs: |             displayName: "PowerShell Script" | ||||||
|       testResultsFormat: VSTest |             continueOnError: true | ||||||
|       testResultsFiles: "*/coverage.cobertura.xml" |  | ||||||
|       testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)" |  | ||||||
|       searchFolder: "$(System.DefaultWorkingDirectory)/TestResults" |  | ||||||
|  |  | ||||||
|   - task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1 |           - script: "dotnet test --configuration $(Configuration)" | ||||||
|     displayName: "Create work item" |             workingDirectory: Adaptation | ||||||
|     inputs: |             displayName: "Core Test" | ||||||
|       teamProject: "Mesa_FI" |  | ||||||
|       workItemType: Bug |  | ||||||
|       title: $(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration) |  | ||||||
|       assignedTo: "$(Build.RequestedForId)" |  | ||||||
|     enabled: false |  | ||||||
|  |  | ||||||
|   - script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Adaptation --source $(NugetSource)' |           - script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)' | ||||||
|     workingDirectory: Adaptation |             displayName: "Move Results" | ||||||
|     displayName: "Core Publish" |  | ||||||
|     enabled: false |  | ||||||
|  |  | ||||||
|   - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources="$(NugetSource)"' |           - script: '"C:\program files\dotnet\dotnet.exe" tool restore' | ||||||
|     displayName: "MSBuild Restore" |             workingDirectory: Adaptation | ||||||
|  |             displayName: "Tool Restore" | ||||||
|  |             enabled: false | ||||||
|  |  | ||||||
|   - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8' |           - script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark' | ||||||
|     displayName: MSBuild |             workingDirectory: Adaptation | ||||||
|  |             displayName: "Report Generator" | ||||||
|  |             enabled: false | ||||||
|  |  | ||||||
|   - script: 'echo $(Build.SourceVersion)-$(Build.BuildId)-$(Build.Repository.Name)>bin\$(Configuration)\$(Build.Repository.Name).txt' |           - task: PublishTestResults@2 | ||||||
|     displayName: "Commit Id" |             displayName: "Publish Test Results **/*.trx" | ||||||
|  |             inputs: | ||||||
|  |               testResultsFormat: VSTest | ||||||
|  |               testResultsFiles: "**/*.trx" | ||||||
|  |               testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)" | ||||||
|  |               searchFolder: "$(System.DefaultWorkingDirectory)/TestResults" | ||||||
|  |  | ||||||
|   - task: CopyFiles@2 |           - task: PublishTestResults@2 | ||||||
|     displayName: 'Copy Files to: D:\Framework4.8' |             displayName: "Publish Test Results */coverage.cobertura.xml" | ||||||
|     inputs: |             inputs: | ||||||
|       Contents: "*$(Build.Repository.Name)*" |               testResultsFormat: VSTest | ||||||
|       SourceFolder: 'bin\$(Configuration)' |               testResultsFiles: "*/coverage.cobertura.xml" | ||||||
|       TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)' |               testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)" | ||||||
|       OverWrite: true |               searchFolder: "$(System.DefaultWorkingDirectory)/TestResults" | ||||||
|  |  | ||||||
|   - task: CopyFiles@2 |           - script: | | ||||||
|     displayName: 'Copy Files to: Local D EAF Deployment Storage' |               "C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration) | ||||||
|     inputs: |             workingDirectory: Adaptation | ||||||
|       Contents: "*$(Build.Repository.Name)*" |             displayName: "Core Clean - Adaptation" | ||||||
|       SourceFolder: 'bin\$(Configuration)' |  | ||||||
|       TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)' |  | ||||||
|       OverWrite: true |  | ||||||
|  |  | ||||||
|   - script: | |           - script: 'echo $(Build.BuildId)-$(Build.SourceVersion)-bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt' | ||||||
|       "C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration) |             displayName: "Force Fail" | ||||||
|     workingDirectory: Adaptation |             enabled: false | ||||||
|     displayName: "Core Clean - Tests" |  | ||||||
|     continueOnError: true |  | ||||||
|  |  | ||||||
|   - script: | |   - stage: ProductionServer | ||||||
|       "C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration) |     displayName: ProductionServer | ||||||
|     workingDirectory: Adaptation |  | ||||||
|     displayName: "Core Clean - Adaptation" |  | ||||||
|     continueOnError: true |  | ||||||
|  |  | ||||||
|   - script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt' |     pool: | ||||||
|     displayName: "Force Fail" |       name: EAF Mesa Integration | ||||||
|     enabled: false |       demands: MET08AWCT | ||||||
|  |  | ||||||
|  |     variables: | ||||||
|  |       coreVersion: "net8.0" | ||||||
|  |       nugetSource: "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/" | ||||||
|  |  | ||||||
|  |     jobs: | ||||||
|  |       - job: SetupEnvironment | ||||||
|  |         steps: | ||||||
|  |           - script: | | ||||||
|  |               echo $(Build.BuildId) | ||||||
|  |               echo $(Build.Reason) | ||||||
|  |               echo $(Build.Repository.Id) | ||||||
|  |               echo $(Build.Repository.Name) | ||||||
|  |               echo $(Build.SourceVersion) | ||||||
|  |               echo $(CoreVersion) | ||||||
|  |               echo $(NugetSource) | ||||||
|  |             displayName: "Echo Check" | ||||||
|  |  | ||||||
|  |           - script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear' | ||||||
|  |             displayName: "Nuget Clear" | ||||||
|  |             enabled: false | ||||||
|  |  | ||||||
|  |           - script: | | ||||||
|  |               "C:\program files\dotnet\dotnet.exe" user-secrets init | ||||||
|  |               "C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)" | ||||||
|  |               "C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommit" "$(Build.SourceVersion)" | ||||||
|  |               "C:\program files\dotnet\dotnet.exe" user-secrets list | ||||||
|  |             workingDirectory: Adaptation | ||||||
|  |             displayName: "Safe storage of app secrets - Adaptation" | ||||||
|  |  | ||||||
|  |       - job: BuildRelease | ||||||
|  |         dependsOn: | ||||||
|  |           - SetupEnvironment | ||||||
|  |         steps: | ||||||
|  |           - script: | | ||||||
|  |               set configuration=Release | ||||||
|  |               echo %configuration% | ||||||
|  |               echo ##vso[task.setvariable variable=Configuration;]%configuration% | ||||||
|  |               echo $(Configuration) | ||||||
|  |             displayName: Configuration | ||||||
|  |  | ||||||
|  |           - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)' | ||||||
|  |             displayName: "MSBuild Restore" | ||||||
|  |  | ||||||
|  |           - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8' | ||||||
|  |             displayName: MSBuild | ||||||
|  |  | ||||||
|  |           - script: 'echo $(Build.Repository.Name)-$(Build.BuildId)-$(Build.SourceVersion)>bin\$(Configuration)\$(Build.Repository.Name).txt' | ||||||
|  |             displayName: "Commit Id" | ||||||
|  |  | ||||||
|  |           - task: CopyFiles@2 | ||||||
|  |             displayName: 'Copy Files to: D:\EAF' | ||||||
|  |             inputs: | ||||||
|  |               Contents: "*$(Build.Repository.Name)*" | ||||||
|  |               SourceFolder: 'bin\$(Configuration)' | ||||||
|  |               TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)' | ||||||
|  |               OverWrite: true | ||||||
|  |  | ||||||
|  |           - script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)' | ||||||
|  |             workingDirectory: Adaptation | ||||||
|  |             displayName: "Core Build - Adaptation" | ||||||
|  |  | ||||||
|  |       - job: TestRelease | ||||||
|  |         dependsOn: | ||||||
|  |           - SetupEnvironment | ||||||
|  |           - BuildRelease | ||||||
|  |         steps: | ||||||
|  |           - script: | | ||||||
|  |               set configuration=Release | ||||||
|  |               echo %configuration% | ||||||
|  |               echo ##vso[task.setvariable variable=Configuration;]%configuration% | ||||||
|  |               echo $(Configuration) | ||||||
|  |             displayName: Configuration | ||||||
|  |  | ||||||
|  |           - powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse } | ||||||
|  |             workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)" | ||||||
|  |             displayName: "PowerShell Script" | ||||||
|  |             continueOnError: true | ||||||
|  |  | ||||||
|  |           - script: "dotnet test --configuration $(Configuration)" | ||||||
|  |             workingDirectory: Adaptation | ||||||
|  |             displayName: "Core Test" | ||||||
|  |  | ||||||
|  |           - script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)' | ||||||
|  |             displayName: "Move Results" | ||||||
|  |  | ||||||
|  |           - script: '"C:\program files\dotnet\dotnet.exe" tool restore' | ||||||
|  |             workingDirectory: Adaptation | ||||||
|  |             displayName: "Tool Restore" | ||||||
|  |             enabled: false | ||||||
|  |  | ||||||
|  |           - script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark' | ||||||
|  |             workingDirectory: Adaptation | ||||||
|  |             displayName: "Report Generator" | ||||||
|  |             enabled: false | ||||||
|  |  | ||||||
|  |           - task: PublishTestResults@2 | ||||||
|  |             displayName: "Publish Test Results **/*.trx" | ||||||
|  |             inputs: | ||||||
|  |               testResultsFormat: VSTest | ||||||
|  |               testResultsFiles: "**/*.trx" | ||||||
|  |               testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)" | ||||||
|  |               searchFolder: "$(System.DefaultWorkingDirectory)/TestResults" | ||||||
|  |  | ||||||
|  |           - task: PublishTestResults@2 | ||||||
|  |             displayName: "Publish Test Results */coverage.cobertura.xml" | ||||||
|  |             inputs: | ||||||
|  |               testResultsFormat: VSTest | ||||||
|  |               testResultsFiles: "*/coverage.cobertura.xml" | ||||||
|  |               testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)" | ||||||
|  |               searchFolder: "$(System.DefaultWorkingDirectory)/TestResults" | ||||||
|  |  | ||||||
|  |           - script: | | ||||||
|  |               "C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration) | ||||||
|  |             workingDirectory: Adaptation | ||||||
|  |             displayName: "Core Clean - Adaptation" | ||||||
|  |  | ||||||
|  |           - script: 'echo $(Build.BuildId)-$(Build.SourceVersion)-bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt' | ||||||
|  |             displayName: "Force Fail" | ||||||
|  |             enabled: true | ||||||
|  | |||||||
| @ -12,7 +12,7 @@ public class Description : IDescription, Properties.IDescription | |||||||
|     public int Test { get; set; } |     public int Test { get; set; } | ||||||
|     public int Count { get; set; } |     public int Count { get; set; } | ||||||
|     public int Index { get; set; } |     public int Index { get; set; } | ||||||
|     public string Lot { get; set; } |     public string RDS { get; set; } | ||||||
|     // |     // | ||||||
|     public string EventName { get; set; } |     public string EventName { get; set; } | ||||||
|     public string NullData { get; set; } |     public string NullData { get; set; } | ||||||
| @ -141,7 +141,7 @@ public class Description : IDescription, Properties.IDescription | |||||||
|                     MID = logistics.MID, |                     MID = logistics.MID, | ||||||
|                     // |                     // | ||||||
|                     Date = DateTime.Now.ToString(GetDateFormat()), |                     Date = DateTime.Now.ToString(GetDateFormat()), | ||||||
|                     Lot = string.Empty, |                     RDS = string.Empty, | ||||||
|                 }; |                 }; | ||||||
|                 results.Add(description); |                 results.Add(description); | ||||||
|             } |             } | ||||||
|  | |||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -35,6 +35,9 @@ public class Logistics : ILogistics | |||||||
|     public long Sequence => _Sequence; |     public long Sequence => _Sequence; | ||||||
|     public double TotalSecondsSinceLastWriteTimeFromSequence => _TotalSecondsSinceLastWriteTimeFromSequence; |     public double TotalSecondsSinceLastWriteTimeFromSequence => _TotalSecondsSinceLastWriteTimeFromSequence; | ||||||
|  |  | ||||||
|  |     private static string DefaultMesEntity(DateTime dateTime) => | ||||||
|  |         string.Concat(dateTime.Ticks, "_MES_ENTITY"); | ||||||
|  |  | ||||||
|     public Logistics(IFileRead fileRead) |     public Logistics(IFileRead fileRead) | ||||||
|     { |     { | ||||||
|         DateTime dateTime = DateTime.Now; |         DateTime dateTime = DateTime.Now; | ||||||
| @ -84,13 +87,13 @@ public class Logistics : ILogistics | |||||||
|         _Logistics2 = new List<Logistics2>(); |         _Logistics2 = new List<Logistics2>(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public Logistics(string reportFullPath, string logistics) |     internal Logistics(string reportFullPath, ProcessDataStandardFormat processDataStandardFormat) | ||||||
|     { |     { | ||||||
|         string key; |         string key; | ||||||
|         DateTime dateTime; |         DateTime dateTime; | ||||||
|         string[] segments; |         string[] segments; | ||||||
|         _FileInfo = new(reportFullPath); |         _FileInfo = new(reportFullPath); | ||||||
|         _Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList(); |         _Logistics1 = processDataStandardFormat.Logistics.ToList(); | ||||||
|         if (Logistics1.Count == 0 || !Logistics1[0].StartsWith("LOGISTICS_1")) |         if (Logistics1.Count == 0 || !Logistics1[0].StartsWith("LOGISTICS_1")) | ||||||
|         { |         { | ||||||
|             _NullData = null; |             _NullData = null; | ||||||
| @ -190,8 +193,6 @@ public class Logistics : ILogistics | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private static string DefaultMesEntity(DateTime dateTime) => string.Concat(dateTime.Ticks, "_MES_ENTITY"); |  | ||||||
|  |  | ||||||
|     internal void Update(string mid, string processJobID) |     internal void Update(string mid, string processJobID) | ||||||
|     { |     { | ||||||
|         _MID = mid; |         _MID = mid; | ||||||
|  | |||||||
| @ -6,23 +6,25 @@ public partial class WS | |||||||
|     public class Attachment |     public class Attachment | ||||||
|     { |     { | ||||||
|  |  | ||||||
|         public string SubGroupId { get; set; } | #nullable enable | ||||||
|         public long HeaderId { get; set; } |  | ||||||
|         public string HeaderIdDirectory { get; set; } |  | ||||||
|         public string UniqueId { get; set; } |  | ||||||
|         public string DestinationFileName { get; set; } |  | ||||||
|         public string SourceFileName { get; set; } |  | ||||||
|         public string AttachmentId { get; set; } |  | ||||||
|  |  | ||||||
|         public Attachment(string subGroupId, long headerId, string headerIdDirectory, string uniqueId, string destinationFileName, string sourceFileName) |         public long HeaderId { get; set; } | ||||||
|  |         public string UniqueId { get; set; } | ||||||
|  |         public string SubGroupId { get; set; } | ||||||
|  |         public string AttachmentId { get; set; } | ||||||
|  |         public string SourceFileName { get; set; } | ||||||
|  |         public string HeaderIdDirectory { get; set; } | ||||||
|  |         public string DestinationFileName { get; set; } | ||||||
|  |  | ||||||
|  |         public Attachment(Results? results, string headerIdDirectory, string uniqueId, string destinationFileName, string sourceFileName) | ||||||
|         { |         { | ||||||
|             SubGroupId = subGroupId; |  | ||||||
|             HeaderId = headerId; |  | ||||||
|             HeaderIdDirectory = headerIdDirectory; |  | ||||||
|             UniqueId = uniqueId; |             UniqueId = uniqueId; | ||||||
|             DestinationFileName = destinationFileName; |  | ||||||
|             SourceFileName = sourceFileName; |             SourceFileName = sourceFileName; | ||||||
|  |             HeaderIdDirectory = headerIdDirectory; | ||||||
|  |             DestinationFileName = destinationFileName; | ||||||
|             AttachmentId = System.Guid.NewGuid().ToString(); |             AttachmentId = System.Guid.NewGuid().ToString(); | ||||||
|  |             HeaderId = results?.HeaderId is null ? -1 : results.HeaderId.Value; | ||||||
|  |             SubGroupId = results?.SubgroupId is null ? string.Empty : results.SubgroupId.Value.ToString(); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -1,27 +1,75 @@ | |||||||
| using System.Collections.Generic; | using System; | ||||||
|  | using System.Collections.Generic; | ||||||
|  | using System.Text; | ||||||
| using System.Text.Json; | using System.Text.Json; | ||||||
|  | using System.Text.Json.Serialization; | ||||||
|  |  | ||||||
| namespace Adaptation.Shared.Metrology; | namespace Adaptation.Shared.Metrology; | ||||||
|  |  | ||||||
| public partial class WS | public partial class WS | ||||||
| { | { | ||||||
|     // this class represents the response from the Inbound API endpoint |  | ||||||
|     public class Results |     public class Results | ||||||
|     { |     { | ||||||
|         // true or false if data was written to the database |  | ||||||
|         public bool Success { get; set; } |  | ||||||
|  |  | ||||||
|         // if true, contains ID of the Header record in the database | #nullable enable | ||||||
|         public long HeaderID { get; set; } |  | ||||||
|  |  | ||||||
|         // if false, this collection will contain a list of errors |         [JsonConstructor] | ||||||
|         public List<string> Errors { get; set; } |         public Results(List<string>? errors, | ||||||
|  |                        long? headerId, | ||||||
|  |                        long? subgroupId, | ||||||
|  |                        bool? success, | ||||||
|  |                        List<string>? warnings) | ||||||
|  |         { | ||||||
|  |             Errors = errors; | ||||||
|  |             Success = success; | ||||||
|  |             HeaderId = headerId; | ||||||
|  |             Warnings = warnings; | ||||||
|  |             SubgroupId = subgroupId; | ||||||
|  |         } | ||||||
|  |  | ||||||
|         // this collection will contain a list of warnings, they will not prevent data from being saved |         [JsonPropertyName("errors")] public List<string>? Errors { get; set; } | ||||||
|         public List<string> Warnings { get; set; } |         [JsonPropertyName("headerID")] public long? HeaderId { get; set; } | ||||||
|  |         [JsonPropertyName("subgroupId")] public long? SubgroupId { get; set; } | ||||||
|  |         [JsonPropertyName("success")] public bool? Success { get; set; } | ||||||
|  |         [JsonPropertyName("warnings")] public List<string>? Warnings { get; set; } | ||||||
|  |  | ||||||
|  |         public override string ToString() | ||||||
|  |         { | ||||||
|  |             string result = JsonSerializer.Serialize(this, ResultsSourceGenerationContext.Default.Results); | ||||||
|  |             return result; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         internal static Results Get(Results results, long? subgroupId) => | ||||||
|  |             new(results.Errors, results.HeaderId, subgroupId, results.Success, results.Warnings); | ||||||
|  |  | ||||||
|  |         internal static Results Get(string resultsJson, Exception e) | ||||||
|  |         { | ||||||
|  |             Results results; | ||||||
|  |             Exception? exception = e; | ||||||
|  |             List<string> errors = new(); | ||||||
|  |             StringBuilder stringBuilder = new(); | ||||||
|  |             while (exception is not null) | ||||||
|  |             { | ||||||
|  |                 _ = stringBuilder.AppendLine(exception.Message); | ||||||
|  |                 exception = exception.InnerException; | ||||||
|  |             } | ||||||
|  |             errors.Add(resultsJson); | ||||||
|  |             errors.Add(stringBuilder.ToString()); | ||||||
|  |             results = new(errors: errors, | ||||||
|  |                           headerId: null, | ||||||
|  |                           subgroupId: null, | ||||||
|  |                           success: false, | ||||||
|  |                           warnings: new()); | ||||||
|  |             return results; | ||||||
|  |         } | ||||||
|  |  | ||||||
|         // this is just a helper function to make displaying the results easier |  | ||||||
|         public override string ToString() => JsonSerializer.Serialize(this, GetType()); |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | [JsonSourceGenerationOptions(WriteIndented = true)] | ||||||
|  | [JsonSerializable(typeof(WS.Results))] | ||||||
|  | internal partial class ResultsSourceGenerationContext : JsonSerializerContext | ||||||
|  | { | ||||||
| } | } | ||||||
| @ -10,9 +10,11 @@ namespace Adaptation.Shared.Metrology; | |||||||
| public partial class WS | public partial class WS | ||||||
| { | { | ||||||
|  |  | ||||||
|  | #nullable enable | ||||||
|  |  | ||||||
|     public static (string, Results) SendData(string url, long sequence, string directory, object payload, int timeoutSeconds = 120) |     public static (string, Results) SendData(string url, long sequence, string directory, object payload, int timeoutSeconds = 120) | ||||||
|     { |     { | ||||||
|         Results results = new(); |         Results? wsResults = null; | ||||||
|         string resultsJson = string.Empty; |         string resultsJson = string.Empty; | ||||||
|         try |         try | ||||||
|         { |         { | ||||||
| @ -30,29 +32,20 @@ public partial class WS | |||||||
|                 }; |                 }; | ||||||
|                 HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result; |                 HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result; | ||||||
|                 resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result; |                 resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result; | ||||||
|                 results = JsonSerializer.Deserialize<Results>(resultsJson, new JsonSerializerOptions { PropertyNameCaseInsensitive = true }); |                 wsResults = JsonSerializer.Deserialize(resultsJson, ResultsSourceGenerationContext.Default.Results); | ||||||
|                 string checkDirectory = Path.Combine(directory, $"-{results.HeaderID}"); |                 if (wsResults is null) | ||||||
|  |                     throw new NullReferenceException(nameof(wsResults)); | ||||||
|  |                 string checkDirectory = Path.Combine(directory, $"-{wsResults.HeaderId}"); | ||||||
|                 if (!Directory.Exists(checkDirectory)) |                 if (!Directory.Exists(checkDirectory)) | ||||||
|                     _ = Directory.CreateDirectory(checkDirectory); |                     _ = Directory.CreateDirectory(checkDirectory); | ||||||
|                 File.WriteAllText(Path.Combine(checkDirectory, $"{sequence}.json"), json); |                 File.WriteAllText(Path.Combine(checkDirectory, $"{sequence}.json"), json); | ||||||
|             } |             } | ||||||
|             if (!results.Success) |             if (wsResults.Success is null || !wsResults.Success.Value) | ||||||
|                 results.Errors.Add(results.ToString()); |                 wsResults.Errors?.Add(wsResults.ToString()); | ||||||
|         } |         } | ||||||
|         catch (Exception e) |         catch (Exception e) | ||||||
|         { |         { wsResults ??= Results.Get(resultsJson, e); } | ||||||
|             Exception exception = e; |         return new(resultsJson, wsResults); | ||||||
|             StringBuilder stringBuilder = new(); |  | ||||||
|             while (exception is not null) |  | ||||||
|             { |  | ||||||
|                 _ = stringBuilder.AppendLine(exception.Message); |  | ||||||
|                 exception = exception.InnerException; |  | ||||||
|             } |  | ||||||
|             results.Errors ??= new List<string>(); |  | ||||||
|             results.Errors.Add(resultsJson); |  | ||||||
|             results.Errors.Add(stringBuilder.ToString()); |  | ||||||
|         } |  | ||||||
|         return new(resultsJson, results); |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public static void AttachFile(string url, Attachment attachment, int timeoutSeconds = 60) |     public static void AttachFile(string url, Attachment attachment, int timeoutSeconds = 60) | ||||||
| @ -69,16 +62,20 @@ public partial class WS | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public static void AttachFiles(string url, List<Attachment> headerAttachments = null, List<Attachment> dataAttachments = null) |     public static void AttachFiles(string url, List<Attachment>? headerAttachments = null, List<Attachment>? dataAttachments = null) | ||||||
|     { |     { | ||||||
|         string directory; |         string directory; | ||||||
|         try |         try | ||||||
|         { |         { | ||||||
|  |             string? directoryName; | ||||||
|             if (headerAttachments is not null) |             if (headerAttachments is not null) | ||||||
|             { |             { | ||||||
|                 foreach (Attachment attachment in headerAttachments) |                 foreach (Attachment attachment in headerAttachments) | ||||||
|                 { |                 { | ||||||
|                     directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory), attachment.AttachmentId) ?? throw new Exception(); |                     directoryName = Path.GetDirectoryName(attachment.HeaderIdDirectory); | ||||||
|  |                     if (string.IsNullOrEmpty(directoryName)) | ||||||
|  |                         continue; | ||||||
|  |                     directory = Path.Combine(directoryName, attachment.AttachmentId) ?? throw new Exception(); | ||||||
|                     if (!Directory.Exists(directory)) |                     if (!Directory.Exists(directory)) | ||||||
|                         _ = Directory.CreateDirectory(directory); |                         _ = Directory.CreateDirectory(directory); | ||||||
|                     File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true); |                     File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true); | ||||||
| @ -88,7 +85,10 @@ public partial class WS | |||||||
|             { |             { | ||||||
|                 foreach (Attachment attachment in dataAttachments) |                 foreach (Attachment attachment in dataAttachments) | ||||||
|                 { |                 { | ||||||
|                     directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory.Replace("Header", "Data")), attachment.AttachmentId) ?? throw new Exception(); |                     directoryName = Path.GetDirectoryName(attachment.HeaderIdDirectory.Replace("Header", "Data")); | ||||||
|  |                     if (string.IsNullOrEmpty(directoryName)) | ||||||
|  |                         continue; | ||||||
|  |                     directory = Path.Combine(directoryName, attachment.AttachmentId) ?? throw new Exception(); | ||||||
|                     if (!Directory.Exists(directory)) |                     if (!Directory.Exists(directory)) | ||||||
|                         _ = Directory.CreateDirectory(directory); |                         _ = Directory.CreateDirectory(directory); | ||||||
|                     File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true); |                     File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true); | ||||||
| @ -108,7 +108,7 @@ public partial class WS | |||||||
|         } |         } | ||||||
|         catch (Exception e) |         catch (Exception e) | ||||||
|         { |         { | ||||||
|             Exception exception = e; |             Exception? exception = e; | ||||||
|             StringBuilder stringBuilder = new(); |             StringBuilder stringBuilder = new(); | ||||||
|             while (exception is not null) |             while (exception is not null) | ||||||
|             { |             { | ||||||
|  | |||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										33
									
								
								Adaptation/Shared/ProcessDataStandardFormatMapping.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								Adaptation/Shared/ProcessDataStandardFormatMapping.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,33 @@ | |||||||
|  | using System.Collections.ObjectModel; | ||||||
|  |  | ||||||
|  | namespace Adaptation.Shared; | ||||||
|  |  | ||||||
|  | public class ProcessDataStandardFormatMapping | ||||||
|  | { | ||||||
|  |  | ||||||
|  |     public ReadOnlyCollection<string> BackfillColumns { get; private set; } | ||||||
|  |     public ReadOnlyCollection<int> ColumnIndices { get; private set; } | ||||||
|  |     public ReadOnlyCollection<string> IgnoreColumns { get; private set; } | ||||||
|  |     public ReadOnlyCollection<string> IndexOnlyColumns { get; private set; } | ||||||
|  |     public ReadOnlyDictionary<string, string> KeyValuePairs { get; private set; } | ||||||
|  |     public ReadOnlyCollection<string> NewColumnNames { get; private set; } | ||||||
|  |     public ReadOnlyCollection<string> OldColumnNames { get; private set; } | ||||||
|  |  | ||||||
|  |     public ProcessDataStandardFormatMapping(ReadOnlyCollection<string> backfillColumns, | ||||||
|  |                                             ReadOnlyCollection<int> columnIndices, | ||||||
|  |                                             ReadOnlyCollection<string> ignoreColumns, | ||||||
|  |                                             ReadOnlyCollection<string> indexOnlyColumns, | ||||||
|  |                                             ReadOnlyDictionary<string, string> keyValuePairs, | ||||||
|  |                                             ReadOnlyCollection<string> newColumnNames, | ||||||
|  |                                             ReadOnlyCollection<string> oldColumnNames) | ||||||
|  |     { | ||||||
|  |         BackfillColumns = backfillColumns; | ||||||
|  |         ColumnIndices = columnIndices; | ||||||
|  |         IgnoreColumns = ignoreColumns; | ||||||
|  |         IndexOnlyColumns = indexOnlyColumns; | ||||||
|  |         KeyValuePairs = keyValuePairs; | ||||||
|  |         NewColumnNames = newColumnNames; | ||||||
|  |         OldColumnNames = oldColumnNames; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -6,6 +6,6 @@ public interface IDescription | |||||||
|     int Test { get; } |     int Test { get; } | ||||||
|     int Count { get; } |     int Count { get; } | ||||||
|     int Index { get; } |     int Index { get; } | ||||||
|     string Lot { get; } |     string RDS { get; } | ||||||
|  |  | ||||||
| } | } | ||||||
| @ -1,4 +1,4 @@ | |||||||
| #if true | #if v2_59_0 | ||||||
| using Adaptation._Tests.Shared; | using Adaptation._Tests.Shared; | ||||||
| using Microsoft.Extensions.Logging; | using Microsoft.Extensions.Logging; | ||||||
| using Microsoft.VisualStudio.TestTools.UnitTesting; | using Microsoft.VisualStudio.TestTools.UnitTesting; | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| #if true | #if v2_59_0 | ||||||
| using Adaptation._Tests.Shared; | using Adaptation._Tests.Shared; | ||||||
| using Microsoft.Extensions.Logging; | using Microsoft.Extensions.Logging; | ||||||
| using Microsoft.VisualStudio.TestTools.UnitTesting; | using Microsoft.VisualStudio.TestTools.UnitTesting; | ||||||
|  | |||||||
| @ -0,0 +1,63 @@ | |||||||
|  | #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.Production.v2_60_0; | ||||||
|  |  | ||||||
|  | [TestClass] | ||||||
|  | public class MET08AWCT : EAFLoggingUnitTesting | ||||||
|  | { | ||||||
|  |  | ||||||
|  | #pragma warning disable CA2254 | ||||||
|  | #pragma warning disable IDE0060 | ||||||
|  |  | ||||||
|  |     internal static string DummyRoot { get; private set; } | ||||||
|  |     internal static MET08AWCT EAFLoggingUnitTesting { get; private set; } | ||||||
|  |  | ||||||
|  |     public MET08AWCT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) | ||||||
|  |     { | ||||||
|  |         if (EAFLoggingUnitTesting is null) | ||||||
|  |             throw new Exception(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public MET08AWCT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) | ||||||
|  |     { | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     [ClassInitialize] | ||||||
|  |     public static void ClassInitialize(TestContext testContext) | ||||||
|  |     { | ||||||
|  |         EAFLoggingUnitTesting ??= new MET08AWCT(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 Production__v2_60_0__MET08AWCT__ZipFilesByDate() | ||||||
|  |     { | ||||||
|  |         string check = "*.pdsf"; | ||||||
|  |         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 | ||||||
| @ -0,0 +1,65 @@ | |||||||
|  | #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.Production.v2_60_0; | ||||||
|  |  | ||||||
|  | [TestClass] | ||||||
|  | public class WC6INCH1_EQPT : EAFLoggingUnitTesting | ||||||
|  | { | ||||||
|  |  | ||||||
|  | #pragma warning disable CA2254 | ||||||
|  | #pragma warning disable IDE0060 | ||||||
|  |  | ||||||
|  |     internal static string DummyRoot { get; private set; } | ||||||
|  |     internal static WC6INCH1_EQPT EAFLoggingUnitTesting { get; private set; } | ||||||
|  |  | ||||||
|  |     static WC6INCH1_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; | ||||||
|  |  | ||||||
|  |     public WC6INCH1_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) | ||||||
|  |     { | ||||||
|  |         if (EAFLoggingUnitTesting is null) | ||||||
|  |             throw new Exception(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public WC6INCH1_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) | ||||||
|  |     { | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     [ClassInitialize] | ||||||
|  |     public static void ClassInitialize(TestContext testContext) | ||||||
|  |     { | ||||||
|  |         EAFLoggingUnitTesting ??= new WC6INCH1_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 Production__v2_60_0__WC6INCH1_EQPT__ConvertExcelToJson() | ||||||
|  |     { | ||||||
|  |         string check = "*.wc"; | ||||||
|  |         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 | ||||||
| @ -1,4 +1,4 @@ | |||||||
| #if true | #if v2_59_0 | ||||||
| using Microsoft.VisualStudio.TestTools.UnitTesting; | using Microsoft.VisualStudio.TestTools.UnitTesting; | ||||||
|  |  | ||||||
| namespace Adaptation._Tests.Extract.Production.v2_59_0; | namespace Adaptation._Tests.Extract.Production.v2_59_0; | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| #if true | #if v2_59_0 | ||||||
| using Adaptation.Shared; | using Adaptation.Shared; | ||||||
| using Adaptation.Shared.Methods; | using Adaptation.Shared.Methods; | ||||||
| using Microsoft.VisualStudio.TestTools.UnitTesting; | using Microsoft.VisualStudio.TestTools.UnitTesting; | ||||||
|  | |||||||
							
								
								
									
										29
									
								
								Adaptation/_Tests/Extract/Production/v2.60.0/MET08AWCT.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								Adaptation/_Tests/Extract/Production/v2.60.0/MET08AWCT.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,29 @@ | |||||||
|  | #if true | ||||||
|  | using Microsoft.VisualStudio.TestTools.UnitTesting; | ||||||
|  |  | ||||||
|  | namespace Adaptation._Tests.Extract.Production.v2_60_0; | ||||||
|  |  | ||||||
|  | [TestClass] | ||||||
|  | public class MET08AWCT | ||||||
|  | { | ||||||
|  |  | ||||||
|  | #pragma warning disable CA2254 | ||||||
|  | #pragma warning disable IDE0060 | ||||||
|  |  | ||||||
|  |     private static CreateSelfDescription.Production.v2_60_0.MET08AWCT _MET08AWCT; | ||||||
|  |  | ||||||
|  |     [ClassInitialize] | ||||||
|  |     public static void ClassInitialize(TestContext testContext) | ||||||
|  |     { | ||||||
|  |         CreateSelfDescription.Production.v2_60_0.MET08AWCT.ClassInitialize(testContext); | ||||||
|  |         _MET08AWCT = CreateSelfDescription.Production.v2_60_0.MET08AWCT.EAFLoggingUnitTesting; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | #if DEBUG | ||||||
|  |     [Ignore] | ||||||
|  | #endif | ||||||
|  |     [TestMethod] | ||||||
|  |     public void Production__v2_60_0__MET08AWCT__ZipFilesByDate() => _MET08AWCT.Production__v2_60_0__MET08AWCT__ZipFilesByDate(); | ||||||
|  |  | ||||||
|  | } | ||||||
|  | #endif | ||||||
| @ -0,0 +1,62 @@ | |||||||
|  | #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.Production.v2_60_0; | ||||||
|  |  | ||||||
|  | [TestClass] | ||||||
|  | public class WC6INCH1_EQPT | ||||||
|  | { | ||||||
|  |  | ||||||
|  | #pragma warning disable CA2254 | ||||||
|  | #pragma warning disable IDE0060 | ||||||
|  |  | ||||||
|  |     private static CreateSelfDescription.Production.v2_60_0.WC6INCH1_EQPT _WC6INCH1_EQPT; | ||||||
|  |  | ||||||
|  |     [ClassInitialize] | ||||||
|  |     public static void ClassInitialize(TestContext testContext) | ||||||
|  |     { | ||||||
|  |         CreateSelfDescription.Production.v2_60_0.WC6INCH1_EQPT.ClassInitialize(testContext); | ||||||
|  |         _WC6INCH1_EQPT = CreateSelfDescription.Production.v2_60_0.WC6INCH1_EQPT.EAFLoggingUnitTesting; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private static void NonThrowTryCatch() | ||||||
|  |     { | ||||||
|  |         try | ||||||
|  |         { throw new Exception(); } | ||||||
|  |         catch (Exception) { } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | #if DEBUG | ||||||
|  |     [Ignore] | ||||||
|  | #endif | ||||||
|  |     [TestMethod] | ||||||
|  |     public void Production__v2_60_0__WC6INCH1_EQPT__ConvertExcelToJson() => _WC6INCH1_EQPT.Production__v2_60_0__WC6INCH1_EQPT__ConvertExcelToJson(); | ||||||
|  |  | ||||||
|  |     [Ignore] | ||||||
|  |     [TestMethod] | ||||||
|  |     public void Production__v2_60_0__WC6INCH1_EQPT__ConvertExcelToJson637961178824025822__Normal() | ||||||
|  |     { | ||||||
|  |         string check = "*.wc"; | ||||||
|  |         bool validatePDSF = false; | ||||||
|  |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
|  |         _WC6INCH1_EQPT.Production__v2_60_0__WC6INCH1_EQPT__ConvertExcelToJson(); | ||||||
|  |         Assert.IsFalse(string.IsNullOrEmpty(_WC6INCH1_EQPT.AdaptationTesting.TestContext.FullyQualifiedTestClassName)); | ||||||
|  |         string[] variables = _WC6INCH1_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); | ||||||
|  |         IFileRead fileRead = _WC6INCH1_EQPT.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 | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -51,7 +51,7 @@ public class MET08AWCT : LoggingUnitTesting, IDisposable | |||||||
|     public void TestDateTime() |     public void TestDateTime() | ||||||
|     { |     { | ||||||
|         DateTime dateTime = DateTime.Now; |         DateTime dateTime = DateTime.Now; | ||||||
|         Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString()); |         Assert.AreEqual(dateTime.ToString(), dateTime.ToString("M/d/yyyy h:mm:ss tt")); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| #if DEBUG | #if DEBUG | ||||||
| @ -64,7 +64,7 @@ public class MET08AWCT : LoggingUnitTesting, IDisposable | |||||||
|         StringBuilder results = new(); |         StringBuilder results = new(); | ||||||
|         (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] |         (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] | ||||||
|         { |         { | ||||||
|             new("MET08AWCT", "v2.59.0"), |             new("MET08AWCT", "v2.60.0"), | ||||||
|         }; |         }; | ||||||
|         string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2"; |         string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2"; | ||||||
|         Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; |         Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; | ||||||
|  | |||||||
| @ -51,7 +51,7 @@ public class WC : LoggingUnitTesting, IDisposable | |||||||
|     public void TestDateTime() |     public void TestDateTime() | ||||||
|     { |     { | ||||||
|         DateTime dateTime = DateTime.Now; |         DateTime dateTime = DateTime.Now; | ||||||
|         Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString()); |         Assert.AreEqual(dateTime.ToString(), dateTime.ToString("M/d/yyyy h:mm:ss tt")); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| #if DEBUG | #if DEBUG | ||||||
| @ -64,13 +64,13 @@ public class WC : LoggingUnitTesting, IDisposable | |||||||
|         StringBuilder results = new(); |         StringBuilder results = new(); | ||||||
|         (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] |         (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] | ||||||
|         { |         { | ||||||
|             new("WC6INCH1-EQPT", "v2.59.0"), |             new("WC6INCH1-EQPT", "v2.60.0"), | ||||||
|             new("WC6INCH2-EQPT", "v2.59.0"), |             new("WC6INCH2-EQPT", "v2.60.0"), | ||||||
|             new("WC6INCH3-EQPT", "v2.59.0"), |             new("WC6INCH3-EQPT", "v2.60.0"), | ||||||
|             new("WC6INCH4-EQPT", "v2.59.0"), |             new("WC6INCH4-EQPT", "v2.60.0"), | ||||||
|             new("WC8INCH1-EQPT", "v2.59.0"), |             new("WC8INCH1-EQPT", "v2.60.0"), | ||||||
|             new("WC8INCH2-EQPT", "v2.59.0"), |             new("WC8INCH2-EQPT", "v2.60.0"), | ||||||
|             new("WC8INCH3-EQPT", "v2.59.0"), |             new("WC8INCH3-EQPT", "v2.60.0"), | ||||||
|         }; |         }; | ||||||
|         string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2"; |         string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2"; | ||||||
|         Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; |         Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; | ||||||
|  | |||||||
| @ -37,7 +37,7 @@ public partial class FileRead : FileReaderHandler, ISMTP | |||||||
|     private FilePathGenerator _FilePathGeneratorForTarget; |     private FilePathGenerator _FilePathGeneratorForTarget; | ||||||
|     private readonly List<EquipmentParameter> _EquipmentParameters; |     private readonly List<EquipmentParameter> _EquipmentParameters; | ||||||
|     private static readonly Dictionary<string, List<long>> _DummyRuns; |     private static readonly Dictionary<string, List<long>> _DummyRuns; | ||||||
|     private static readonly Dictionary<long, List<string>> _StaticRuns; |     private static readonly Dictionary<long, List<Adaptation.Shared.Metrology.WS.Results>> _StaticRuns; | ||||||
|  |  | ||||||
|     static FileRead() |     static FileRead() | ||||||
|     { |     { | ||||||
|  | |||||||
| @ -138,6 +138,7 @@ | |||||||
|     <Compile Include="Adaptation\Shared\Metrology\WS.Results.cs" /> |     <Compile Include="Adaptation\Shared\Metrology\WS.Results.cs" /> | ||||||
|     <Compile Include="Adaptation\Shared\ParameterType.cs" /> |     <Compile Include="Adaptation\Shared\ParameterType.cs" /> | ||||||
|     <Compile Include="Adaptation\Shared\ProcessDataStandardFormat.cs" /> |     <Compile Include="Adaptation\Shared\ProcessDataStandardFormat.cs" /> | ||||||
|  |     <Compile Include="Adaptation\Shared\ProcessDataStandardFormatMapping.cs" /> | ||||||
|     <Compile Include="Adaptation\Shared\Properties\IDescription.cs" /> |     <Compile Include="Adaptation\Shared\Properties\IDescription.cs" /> | ||||||
|     <Compile Include="Adaptation\Shared\Properties\IFileRead.cs" /> |     <Compile Include="Adaptation\Shared\Properties\IFileRead.cs" /> | ||||||
|     <Compile Include="Adaptation\Shared\Properties\ILogistics.cs" /> |     <Compile Include="Adaptation\Shared\Properties\ILogistics.cs" /> | ||||||
| @ -159,13 +160,13 @@ | |||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <PackageReference Include="Infineon.EAF.Runtime"> |     <PackageReference Include="Infineon.EAF.Runtime"> | ||||||
|       <Version>2.59.0</Version> |       <Version>2.60.0</Version> | ||||||
|     </PackageReference> |     </PackageReference> | ||||||
|     <PackageReference Include="Microsoft.AspNet.WebApi.Core"> |     <PackageReference Include="Microsoft.AspNet.WebApi.Core"> | ||||||
|       <Version>5.2.7</Version> |       <Version>5.2.7</Version> | ||||||
|     </PackageReference> |     </PackageReference> | ||||||
|     <PackageReference Include="System.Text.Json"> |     <PackageReference Include="System.Text.Json"> | ||||||
|       <Version>8.0.3</Version> |       <Version>8.0.5</Version> | ||||||
|     </PackageReference> |     </PackageReference> | ||||||
|     <PackageReference Include="System.Net.WebSockets"> |     <PackageReference Include="System.Net.WebSockets"> | ||||||
|       <Version>4.3.0</Version> |       <Version>4.3.0</Version> | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user