From 1c248a5067d8c475a11c9493df555dc250012a14 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Fri, 27 Aug 2021 17:47:00 -0700 Subject: [PATCH 01/13] Publish CI Artifacts (#1202) --- eng/pipelines/templates/Build.template.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eng/pipelines/templates/Build.template.yml b/eng/pipelines/templates/Build.template.yml index 071585efa..fe7d6e070 100644 --- a/eng/pipelines/templates/Build.template.yml +++ b/eng/pipelines/templates/Build.template.yml @@ -17,5 +17,11 @@ steps: parameters: Configuration: ${{ parameters.Configuration }} +# Used for localization +- template: ../steps/CollectAndPublishBinaries.yml + parameters: + TargetFolder: '$(Build.StagingDirectory)\drop' + ArtifactName: '${{ parameters.Configuration }}' + - template: ../tasks/MicroBuildCleanup.yml ... \ No newline at end of file From a2a26ea534d316fc7c6197bb2745814c2605d74a Mon Sep 17 00:00:00 2001 From: csigs Date: Tue, 31 Aug 2021 12:56:25 -0700 Subject: [PATCH 02/13] LEGO: check in for main to temporary branch. (#1210) --- loc/lcl/CHS/Microsoft.SSHDebugPS.dll.lcl | 83 ++++++++- loc/lcl/CHS/OpenFolderSchema.json.lcl | 215 +++++++++++++++-------- loc/lcl/CHT/Microsoft.SSHDebugPS.dll.lcl | 83 ++++++++- loc/lcl/CHT/OpenFolderSchema.json.lcl | 215 +++++++++++++++-------- loc/lcl/CSY/Microsoft.SSHDebugPS.dll.lcl | 86 ++++++++- loc/lcl/CSY/OpenFolderSchema.json.lcl | 215 +++++++++++++++-------- loc/lcl/DEU/Microsoft.SSHDebugPS.dll.lcl | 83 ++++++++- loc/lcl/DEU/OpenFolderSchema.json.lcl | 215 +++++++++++++++-------- loc/lcl/ESN/Microsoft.SSHDebugPS.dll.lcl | 83 ++++++++- loc/lcl/ESN/OpenFolderSchema.json.lcl | 215 +++++++++++++++-------- loc/lcl/FRA/Microsoft.SSHDebugPS.dll.lcl | 83 ++++++++- loc/lcl/FRA/OpenFolderSchema.json.lcl | 215 +++++++++++++++-------- loc/lcl/ITA/Microsoft.SSHDebugPS.dll.lcl | 83 ++++++++- loc/lcl/ITA/OpenFolderSchema.json.lcl | 215 +++++++++++++++-------- loc/lcl/JPN/Microsoft.SSHDebugPS.dll.lcl | 83 ++++++++- loc/lcl/JPN/OpenFolderSchema.json.lcl | 215 +++++++++++++++-------- loc/lcl/KOR/Microsoft.SSHDebugPS.dll.lcl | 83 ++++++++- loc/lcl/KOR/OpenFolderSchema.json.lcl | 215 +++++++++++++++-------- loc/lcl/PLK/Microsoft.SSHDebugPS.dll.lcl | 86 ++++++++- loc/lcl/PLK/OpenFolderSchema.json.lcl | 215 +++++++++++++++-------- loc/lcl/PTB/Microsoft.SSHDebugPS.dll.lcl | 86 ++++++++- loc/lcl/PTB/OpenFolderSchema.json.lcl | 215 +++++++++++++++-------- loc/lcl/RUS/Microsoft.SSHDebugPS.dll.lcl | 84 ++++++++- loc/lcl/RUS/OpenFolderSchema.json.lcl | 215 +++++++++++++++-------- loc/lcl/TRK/Microsoft.SSHDebugPS.dll.lcl | 86 ++++++++- loc/lcl/TRK/OpenFolderSchema.json.lcl | 215 +++++++++++++++-------- 26 files changed, 2926 insertions(+), 961 deletions(-) diff --git a/loc/lcl/CHS/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/CHS/Microsoft.SSHDebugPS.dll.lcl index ccb50c6bb..52b61863f 100644 --- a/loc/lcl/CHS/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/CHS/Microsoft.SSHDebugPS.dll.lcl @@ -247,6 +247,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -283,6 +319,12 @@ + + + + + + ]]> @@ -292,6 +334,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -301,6 +367,15 @@ + + + + + + + + + @@ -769,7 +844,7 @@ - + @@ -777,7 +852,7 @@ - + @@ -792,7 +867,7 @@ - + @@ -807,7 +882,7 @@ - + diff --git a/loc/lcl/CHS/OpenFolderSchema.json.lcl b/loc/lcl/CHS/OpenFolderSchema.json.lcl index e106ec7cf..3eed67250 100644 --- a/loc/lcl/CHS/OpenFolderSchema.json.lcl +++ b/loc/lcl/CHS/OpenFolderSchema.json.lcl @@ -10,6 +10,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -40,7 +67,7 @@ - + @@ -73,7 +100,7 @@ - + @@ -118,7 +145,7 @@ - + @@ -187,50 +214,62 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + @@ -245,13 +284,13 @@ - + - + @@ -266,13 +305,13 @@ - + - + @@ -287,43 +326,43 @@ - + - + - + - + - + - + - + @@ -341,7 +380,7 @@ - + @@ -356,13 +395,13 @@ - + - + @@ -380,7 +419,7 @@ - + @@ -398,13 +437,13 @@ - + - + @@ -419,7 +458,7 @@ - + @@ -437,7 +476,7 @@ - + @@ -455,7 +494,7 @@ - + @@ -473,25 +512,25 @@ - + - + - + - + @@ -509,7 +548,7 @@ - + @@ -527,7 +566,7 @@ - + @@ -545,11 +584,20 @@ - + + + + + + + + + + @@ -563,25 +611,25 @@ - + - + - + - + @@ -596,7 +644,7 @@ - + @@ -614,17 +662,32 @@ - + - + + + + + + + + + + + + + + + + @@ -635,7 +698,7 @@ - + @@ -650,7 +713,7 @@ - + @@ -665,7 +728,7 @@ - + @@ -683,7 +746,7 @@ - + @@ -701,13 +764,13 @@ - + - + @@ -743,11 +806,23 @@ - + + + + + + + + + + + + + @@ -761,13 +836,13 @@ - + - + @@ -791,13 +866,13 @@ - + - + @@ -812,31 +887,31 @@ - + - + - + - + - + @@ -860,13 +935,13 @@ - + - + @@ -881,43 +956,43 @@ - + - + - + - + - + - + - + diff --git a/loc/lcl/CHT/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/CHT/Microsoft.SSHDebugPS.dll.lcl index 26bbb8a9c..a1267d4a2 100644 --- a/loc/lcl/CHT/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/CHT/Microsoft.SSHDebugPS.dll.lcl @@ -247,6 +247,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -283,6 +319,12 @@ + + + + + + ]]> @@ -292,6 +334,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -301,6 +367,15 @@ + + + + + + + + + @@ -769,7 +844,7 @@ - + @@ -777,7 +852,7 @@ - + @@ -792,7 +867,7 @@ - + @@ -807,7 +882,7 @@ - + diff --git a/loc/lcl/CHT/OpenFolderSchema.json.lcl b/loc/lcl/CHT/OpenFolderSchema.json.lcl index e468e74a6..094c6c48c 100644 --- a/loc/lcl/CHT/OpenFolderSchema.json.lcl +++ b/loc/lcl/CHT/OpenFolderSchema.json.lcl @@ -10,6 +10,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -40,7 +67,7 @@ - + @@ -73,7 +100,7 @@ - + @@ -118,7 +145,7 @@ - + @@ -187,50 +214,62 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + @@ -245,13 +284,13 @@ - + - + @@ -266,13 +305,13 @@ - + - + @@ -287,43 +326,43 @@ - + - + - + - + - + - + - + @@ -341,7 +380,7 @@ - + @@ -356,13 +395,13 @@ - + - + @@ -380,7 +419,7 @@ - + @@ -398,13 +437,13 @@ - + - + @@ -419,7 +458,7 @@ - + @@ -437,7 +476,7 @@ - + @@ -455,7 +494,7 @@ - + @@ -473,25 +512,25 @@ - + - + - + - + @@ -509,7 +548,7 @@ - + @@ -527,7 +566,7 @@ - + @@ -545,11 +584,20 @@ - + + + + + + + + + + @@ -563,25 +611,25 @@ - + - + - + - + @@ -596,7 +644,7 @@ - + @@ -614,17 +662,32 @@ - + - + + + + + + + + + + + + + + + + @@ -635,7 +698,7 @@ - + @@ -650,7 +713,7 @@ - + @@ -665,7 +728,7 @@ - + @@ -683,7 +746,7 @@ - + @@ -701,13 +764,13 @@ - + - + @@ -743,11 +806,23 @@ - + + + + + + + + + + + + + @@ -761,13 +836,13 @@ - + - + @@ -791,13 +866,13 @@ - + - + @@ -812,31 +887,31 @@ - + - + - + - + - + @@ -860,13 +935,13 @@ - + - + @@ -881,43 +956,43 @@ - + - + - + - + - + - + - + diff --git a/loc/lcl/CSY/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/CSY/Microsoft.SSHDebugPS.dll.lcl index 198da66b0..64b3cae58 100644 --- a/loc/lcl/CSY/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/CSY/Microsoft.SSHDebugPS.dll.lcl @@ -247,6 +247,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -283,6 +319,15 @@ + + + + + + + + + ]]> @@ -292,6 +337,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -301,6 +370,15 @@ + + + + + + + + + @@ -769,7 +847,7 @@ - + @@ -777,7 +855,7 @@ - + @@ -792,7 +870,7 @@ - + @@ -807,7 +885,7 @@ - + diff --git a/loc/lcl/CSY/OpenFolderSchema.json.lcl b/loc/lcl/CSY/OpenFolderSchema.json.lcl index 8091205be..37a7836aa 100644 --- a/loc/lcl/CSY/OpenFolderSchema.json.lcl +++ b/loc/lcl/CSY/OpenFolderSchema.json.lcl @@ -10,6 +10,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -40,7 +67,7 @@ - + @@ -73,7 +100,7 @@ - + @@ -118,7 +145,7 @@ - + @@ -187,50 +214,62 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + @@ -245,13 +284,13 @@ - + - + @@ -266,13 +305,13 @@ - + - + @@ -287,43 +326,43 @@ - + - + - + - + - + - + - + @@ -341,7 +380,7 @@ - + @@ -356,13 +395,13 @@ - + - + @@ -380,7 +419,7 @@ - + @@ -398,13 +437,13 @@ - + - + @@ -419,7 +458,7 @@ - + @@ -437,7 +476,7 @@ - + @@ -455,7 +494,7 @@ - + @@ -473,25 +512,25 @@ - + - + - + - + @@ -509,7 +548,7 @@ - + @@ -527,7 +566,7 @@ - + @@ -545,11 +584,20 @@ - + + + + + + + + + + @@ -563,25 +611,25 @@ - + - + - + - + @@ -596,7 +644,7 @@ - + @@ -614,17 +662,32 @@ - + - + + + + + + + + + + + + + + + + @@ -635,7 +698,7 @@ - + @@ -650,7 +713,7 @@ - + @@ -665,7 +728,7 @@ - + @@ -683,7 +746,7 @@ - + @@ -701,13 +764,13 @@ - + - + @@ -743,11 +806,23 @@ - + + + + + + + + + + + + + @@ -761,13 +836,13 @@ - + - + @@ -791,13 +866,13 @@ - + - + @@ -812,31 +887,31 @@ - + - + - + - + - + @@ -860,13 +935,13 @@ - + - + @@ -881,43 +956,43 @@ - + - + - + - + - + - + - + diff --git a/loc/lcl/DEU/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/DEU/Microsoft.SSHDebugPS.dll.lcl index 1b0c00b83..7746cf63a 100644 --- a/loc/lcl/DEU/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/DEU/Microsoft.SSHDebugPS.dll.lcl @@ -247,6 +247,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -283,6 +319,12 @@ + + + + + + ]]> @@ -292,6 +334,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -301,6 +367,15 @@ + + + + + + + + + @@ -769,7 +844,7 @@ - + @@ -777,7 +852,7 @@ - + @@ -792,7 +867,7 @@ - + @@ -807,7 +882,7 @@ - + diff --git a/loc/lcl/DEU/OpenFolderSchema.json.lcl b/loc/lcl/DEU/OpenFolderSchema.json.lcl index 4bb2bfe73..22155594a 100644 --- a/loc/lcl/DEU/OpenFolderSchema.json.lcl +++ b/loc/lcl/DEU/OpenFolderSchema.json.lcl @@ -10,6 +10,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -40,7 +67,7 @@ - + @@ -73,7 +100,7 @@ - + @@ -118,7 +145,7 @@ - + @@ -187,50 +214,62 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + @@ -245,13 +284,13 @@ - + - + @@ -266,13 +305,13 @@ - + - + @@ -287,43 +326,43 @@ - + - + - + - + - + - + - + @@ -341,7 +380,7 @@ - + @@ -356,13 +395,13 @@ - + - + @@ -380,7 +419,7 @@ - + @@ -398,13 +437,13 @@ - + - + @@ -419,7 +458,7 @@ - + @@ -437,7 +476,7 @@ - + @@ -455,7 +494,7 @@ - + @@ -473,25 +512,25 @@ - + - + - + - + @@ -509,7 +548,7 @@ - + @@ -527,7 +566,7 @@ - + @@ -545,11 +584,20 @@ - + + + + + + + + + + @@ -563,25 +611,25 @@ - + - + - + - + @@ -596,7 +644,7 @@ - + @@ -614,17 +662,32 @@ - + - + + + + + + + + + + + + + + + + @@ -635,7 +698,7 @@ - + @@ -650,7 +713,7 @@ - + @@ -665,7 +728,7 @@ - + @@ -683,7 +746,7 @@ - + @@ -701,13 +764,13 @@ - + - + @@ -743,11 +806,23 @@ - + + + + + + + + + + + + + @@ -761,13 +836,13 @@ - + - + @@ -791,13 +866,13 @@ - + - + @@ -812,31 +887,31 @@ - + - + - + - + - + @@ -860,13 +935,13 @@ - + - + @@ -881,43 +956,43 @@ - + - + - + - + - + - + - + diff --git a/loc/lcl/ESN/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/ESN/Microsoft.SSHDebugPS.dll.lcl index 5dc0d3ff7..0a6d757bc 100644 --- a/loc/lcl/ESN/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/ESN/Microsoft.SSHDebugPS.dll.lcl @@ -247,6 +247,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -283,6 +319,12 @@ + + + + + + ]]> @@ -292,6 +334,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -301,6 +367,15 @@ + + + + + + + + + @@ -769,7 +844,7 @@ - + @@ -777,7 +852,7 @@ - + @@ -792,7 +867,7 @@ - + @@ -807,7 +882,7 @@ - + diff --git a/loc/lcl/ESN/OpenFolderSchema.json.lcl b/loc/lcl/ESN/OpenFolderSchema.json.lcl index 9aa6ca651..3fba543f3 100644 --- a/loc/lcl/ESN/OpenFolderSchema.json.lcl +++ b/loc/lcl/ESN/OpenFolderSchema.json.lcl @@ -10,6 +10,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -37,7 +64,7 @@ - + @@ -70,7 +97,7 @@ - + @@ -115,7 +142,7 @@ - + @@ -181,50 +208,62 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + @@ -239,13 +278,13 @@ - + - + @@ -260,13 +299,13 @@ - + - + @@ -281,43 +320,43 @@ - + - + - + - + - + - + - + @@ -332,7 +371,7 @@ - + @@ -347,13 +386,13 @@ - + - + @@ -368,7 +407,7 @@ - + @@ -383,13 +422,13 @@ - + - + @@ -404,7 +443,7 @@ - + @@ -419,7 +458,7 @@ - + @@ -434,7 +473,7 @@ - + @@ -449,25 +488,25 @@ - + - + - + - + @@ -482,7 +521,7 @@ - + @@ -497,7 +536,7 @@ - + @@ -512,11 +551,20 @@ - + + + + + + + + + + @@ -527,25 +575,25 @@ - + - + - + - + @@ -560,7 +608,7 @@ - + @@ -575,17 +623,32 @@ - + - + + + + + + + + + + + + + + + + @@ -596,7 +659,7 @@ - + @@ -611,7 +674,7 @@ - + @@ -626,7 +689,7 @@ - + @@ -641,7 +704,7 @@ - + @@ -656,13 +719,13 @@ - + - + @@ -695,11 +758,23 @@ - + + + + + + + + + + + + + @@ -710,13 +785,13 @@ - + - + @@ -740,13 +815,13 @@ - + - + @@ -761,31 +836,31 @@ - + - + - + - + - + @@ -809,13 +884,13 @@ - + - + @@ -830,43 +905,43 @@ - + - + - + - + - + - + - + diff --git a/loc/lcl/FRA/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/FRA/Microsoft.SSHDebugPS.dll.lcl index 0ca13ac3b..5bf0ba6e1 100644 --- a/loc/lcl/FRA/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/FRA/Microsoft.SSHDebugPS.dll.lcl @@ -247,6 +247,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -283,6 +319,12 @@ + + + + + + ]]> @@ -292,6 +334,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -301,6 +367,15 @@ + + + + + + + + + @@ -769,7 +844,7 @@ - + @@ -777,7 +852,7 @@ - + @@ -792,7 +867,7 @@ - + @@ -807,7 +882,7 @@ - + diff --git a/loc/lcl/FRA/OpenFolderSchema.json.lcl b/loc/lcl/FRA/OpenFolderSchema.json.lcl index 546b75a40..7b3517ab4 100644 --- a/loc/lcl/FRA/OpenFolderSchema.json.lcl +++ b/loc/lcl/FRA/OpenFolderSchema.json.lcl @@ -10,6 +10,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -40,7 +67,7 @@ - + @@ -73,7 +100,7 @@ - + @@ -118,7 +145,7 @@ - + @@ -187,50 +214,62 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + @@ -245,13 +284,13 @@ - + - + @@ -266,13 +305,13 @@ - + - + @@ -287,43 +326,43 @@ - + - + - + - + - + - + - + @@ -341,7 +380,7 @@ - + @@ -356,13 +395,13 @@ - + - + @@ -380,7 +419,7 @@ - + @@ -398,13 +437,13 @@ - + - + @@ -419,7 +458,7 @@ - + @@ -437,7 +476,7 @@ - + @@ -455,7 +494,7 @@ - + @@ -473,25 +512,25 @@ - + - + - + - + @@ -509,7 +548,7 @@ - + @@ -527,7 +566,7 @@ - + @@ -545,11 +584,20 @@ - + + + + + + + + + + @@ -563,25 +611,25 @@ - + - + - + - + @@ -596,7 +644,7 @@ - + @@ -614,17 +662,32 @@ - + - + + + + + + + + + + + + + + + + @@ -635,7 +698,7 @@ - + @@ -650,7 +713,7 @@ - + @@ -665,7 +728,7 @@ - + @@ -683,7 +746,7 @@ - + @@ -701,13 +764,13 @@ - + - + @@ -743,11 +806,23 @@ - + + + + + + + + + + + + + @@ -761,13 +836,13 @@ - + - + @@ -791,13 +866,13 @@ - + - + @@ -812,31 +887,31 @@ - + - + - + - + - + @@ -860,13 +935,13 @@ - + - + @@ -881,43 +956,43 @@ - + - + - + - + - + - + - + diff --git a/loc/lcl/ITA/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/ITA/Microsoft.SSHDebugPS.dll.lcl index 9291fc77c..2072d6537 100644 --- a/loc/lcl/ITA/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/ITA/Microsoft.SSHDebugPS.dll.lcl @@ -247,6 +247,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -283,6 +319,12 @@ + + + + + + ]]> @@ -292,6 +334,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -301,6 +367,15 @@ + + + + + + + + + @@ -769,7 +844,7 @@ - + @@ -777,7 +852,7 @@ - + @@ -792,7 +867,7 @@ - + @@ -807,7 +882,7 @@ - + diff --git a/loc/lcl/ITA/OpenFolderSchema.json.lcl b/loc/lcl/ITA/OpenFolderSchema.json.lcl index 6c713286f..cabdec440 100644 --- a/loc/lcl/ITA/OpenFolderSchema.json.lcl +++ b/loc/lcl/ITA/OpenFolderSchema.json.lcl @@ -10,6 +10,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -40,7 +67,7 @@ - + @@ -73,7 +100,7 @@ - + @@ -118,7 +145,7 @@ - + @@ -187,50 +214,62 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + @@ -245,13 +284,13 @@ - + - + @@ -266,13 +305,13 @@ - + - + @@ -287,43 +326,43 @@ - + - + - + - + - + - + - + @@ -341,7 +380,7 @@ - + @@ -356,13 +395,13 @@ - + - + @@ -380,7 +419,7 @@ - + @@ -398,13 +437,13 @@ - + - + @@ -419,7 +458,7 @@ - + @@ -437,7 +476,7 @@ - + @@ -455,7 +494,7 @@ - + @@ -473,25 +512,25 @@ - + - + - + - + @@ -509,7 +548,7 @@ - + @@ -527,7 +566,7 @@ - + @@ -545,11 +584,20 @@ - + + + + + + + + + + @@ -563,25 +611,25 @@ - + - + - + - + @@ -596,7 +644,7 @@ - + @@ -614,17 +662,32 @@ - + - + + + + + + + + + + + + + + + + @@ -635,7 +698,7 @@ - + @@ -650,7 +713,7 @@ - + @@ -665,7 +728,7 @@ - + @@ -683,7 +746,7 @@ - + @@ -701,13 +764,13 @@ - + - + @@ -743,11 +806,23 @@ - + + + + + + + + + + + + + @@ -761,13 +836,13 @@ - + - + @@ -791,13 +866,13 @@ - + - + @@ -812,31 +887,31 @@ - + - + - + - + - + @@ -860,13 +935,13 @@ - + - + @@ -881,43 +956,43 @@ - + - + - + - + - + - + - + diff --git a/loc/lcl/JPN/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/JPN/Microsoft.SSHDebugPS.dll.lcl index 97a06a0ca..c92c263ae 100644 --- a/loc/lcl/JPN/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/JPN/Microsoft.SSHDebugPS.dll.lcl @@ -247,6 +247,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -283,6 +319,12 @@ + + + + + + ]]> @@ -292,6 +334,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -301,6 +367,15 @@ + + + + + + + + + @@ -769,7 +844,7 @@ - + @@ -777,7 +852,7 @@ - + @@ -792,7 +867,7 @@ - + @@ -807,7 +882,7 @@ - + diff --git a/loc/lcl/JPN/OpenFolderSchema.json.lcl b/loc/lcl/JPN/OpenFolderSchema.json.lcl index 00d9b7e9b..7ffd2b3d3 100644 --- a/loc/lcl/JPN/OpenFolderSchema.json.lcl +++ b/loc/lcl/JPN/OpenFolderSchema.json.lcl @@ -10,6 +10,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -40,7 +67,7 @@ - + @@ -73,7 +100,7 @@ - + @@ -118,7 +145,7 @@ - + @@ -187,50 +214,62 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + @@ -245,13 +284,13 @@ - + - + @@ -266,13 +305,13 @@ - + - + @@ -287,43 +326,43 @@ - + - + - + - + - + - + - + @@ -341,7 +380,7 @@ - + @@ -356,13 +395,13 @@ - + - + @@ -380,7 +419,7 @@ - + @@ -398,13 +437,13 @@ - + - + @@ -419,7 +458,7 @@ - + @@ -437,7 +476,7 @@ - + @@ -455,7 +494,7 @@ - + @@ -473,25 +512,25 @@ - + - + - + - + @@ -509,7 +548,7 @@ - + @@ -527,7 +566,7 @@ - + @@ -545,11 +584,20 @@ - + + + + + + + + + + @@ -563,25 +611,25 @@ - + - + - + - + @@ -596,7 +644,7 @@ - + @@ -614,17 +662,32 @@ - + - + + + + + + + + + + + + + + + + @@ -635,7 +698,7 @@ - + @@ -650,7 +713,7 @@ - + @@ -665,7 +728,7 @@ - + @@ -683,7 +746,7 @@ - + @@ -701,13 +764,13 @@ - + - + @@ -743,11 +806,23 @@ - + + + + + + + + + + + + + @@ -761,13 +836,13 @@ - + - + @@ -791,13 +866,13 @@ - + - + @@ -812,31 +887,31 @@ - + - + - + - + - + @@ -860,13 +935,13 @@ - + - + @@ -881,43 +956,43 @@ - + - + - + - + - + - + - + diff --git a/loc/lcl/KOR/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/KOR/Microsoft.SSHDebugPS.dll.lcl index b58d334f4..62fdb025f 100644 --- a/loc/lcl/KOR/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/KOR/Microsoft.SSHDebugPS.dll.lcl @@ -247,6 +247,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -283,6 +319,12 @@ + + + + + + ]]> @@ -292,6 +334,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -301,6 +367,15 @@ + + + + + + + + + @@ -769,7 +844,7 @@ - + @@ -777,7 +852,7 @@ - + @@ -792,7 +867,7 @@ - + @@ -807,7 +882,7 @@ - + diff --git a/loc/lcl/KOR/OpenFolderSchema.json.lcl b/loc/lcl/KOR/OpenFolderSchema.json.lcl index 4ec4a054c..b87880e33 100644 --- a/loc/lcl/KOR/OpenFolderSchema.json.lcl +++ b/loc/lcl/KOR/OpenFolderSchema.json.lcl @@ -10,6 +10,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -40,7 +67,7 @@ - + @@ -73,7 +100,7 @@ - + @@ -118,7 +145,7 @@ - + @@ -187,50 +214,62 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + @@ -245,13 +284,13 @@ - + - + @@ -266,13 +305,13 @@ - + - + @@ -287,43 +326,43 @@ - + - + - + - + - + - + - + @@ -341,7 +380,7 @@ - + @@ -356,13 +395,13 @@ - + - + @@ -380,7 +419,7 @@ - + @@ -398,13 +437,13 @@ - + - + @@ -419,7 +458,7 @@ - + @@ -437,7 +476,7 @@ - + @@ -455,7 +494,7 @@ - + @@ -473,25 +512,25 @@ - + - + - + - + @@ -509,7 +548,7 @@ - + @@ -527,7 +566,7 @@ - + @@ -545,11 +584,20 @@ - + + + + + + + + + + @@ -563,25 +611,25 @@ - + - + - + - + @@ -596,7 +644,7 @@ - + @@ -614,17 +662,32 @@ - + - + + + + + + + + + + + + + + + + @@ -635,7 +698,7 @@ - + @@ -650,7 +713,7 @@ - + @@ -665,7 +728,7 @@ - + @@ -683,7 +746,7 @@ - + @@ -701,13 +764,13 @@ - + - + @@ -743,11 +806,23 @@ - + + + + + + + + + + + + + @@ -761,13 +836,13 @@ - + - + @@ -791,13 +866,13 @@ - + - + @@ -812,31 +887,31 @@ - + - + - + - + - + @@ -860,13 +935,13 @@ - + - + @@ -881,43 +956,43 @@ - + - + - + - + - + - + - + diff --git a/loc/lcl/PLK/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/PLK/Microsoft.SSHDebugPS.dll.lcl index fcc7bdd72..69c4f0bc2 100644 --- a/loc/lcl/PLK/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/PLK/Microsoft.SSHDebugPS.dll.lcl @@ -247,6 +247,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -283,6 +319,15 @@ + + + + + + + + + ]]> @@ -292,6 +337,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -301,6 +370,15 @@ + + + + + + + + + @@ -769,7 +847,7 @@ - + @@ -777,7 +855,7 @@ - + @@ -792,7 +870,7 @@ - + @@ -807,7 +885,7 @@ - + diff --git a/loc/lcl/PLK/OpenFolderSchema.json.lcl b/loc/lcl/PLK/OpenFolderSchema.json.lcl index 68cf86dcf..824db11f1 100644 --- a/loc/lcl/PLK/OpenFolderSchema.json.lcl +++ b/loc/lcl/PLK/OpenFolderSchema.json.lcl @@ -10,6 +10,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -40,7 +67,7 @@ - + @@ -73,7 +100,7 @@ - + @@ -118,7 +145,7 @@ - + @@ -187,50 +214,62 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + @@ -245,13 +284,13 @@ - + - + @@ -266,13 +305,13 @@ - + - + @@ -287,43 +326,43 @@ - + - + - + - + - + - + - + @@ -341,7 +380,7 @@ - + @@ -356,13 +395,13 @@ - + - + @@ -380,7 +419,7 @@ - + @@ -398,13 +437,13 @@ - + - + @@ -419,7 +458,7 @@ - + @@ -437,7 +476,7 @@ - + @@ -455,7 +494,7 @@ - + @@ -473,25 +512,25 @@ - + - + - + - + @@ -509,7 +548,7 @@ - + @@ -527,7 +566,7 @@ - + @@ -545,11 +584,20 @@ - + + + + + + + + + + @@ -563,25 +611,25 @@ - + - + - + - + @@ -596,7 +644,7 @@ - + @@ -614,17 +662,32 @@ - + - + + + + + + + + + + + + + + + + @@ -635,7 +698,7 @@ - + @@ -650,7 +713,7 @@ - + @@ -665,7 +728,7 @@ - + @@ -683,7 +746,7 @@ - + @@ -701,13 +764,13 @@ - + - + @@ -743,11 +806,23 @@ - + + + + + + + + + + + + + @@ -761,13 +836,13 @@ - + - + @@ -791,13 +866,13 @@ - + - + @@ -812,31 +887,31 @@ - + - + - + - + - + @@ -860,13 +935,13 @@ - + - + @@ -881,43 +956,43 @@ - + - + - + - + - + - + - + diff --git a/loc/lcl/PTB/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/PTB/Microsoft.SSHDebugPS.dll.lcl index 8de8ebb39..8f1f8a373 100644 --- a/loc/lcl/PTB/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/PTB/Microsoft.SSHDebugPS.dll.lcl @@ -247,6 +247,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -283,6 +319,15 @@ + + + + + + + + + ]]> @@ -292,6 +337,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -301,6 +370,15 @@ + + + + + + + + + @@ -769,7 +847,7 @@ - + @@ -777,7 +855,7 @@ - + @@ -792,7 +870,7 @@ - + @@ -807,7 +885,7 @@ - + diff --git a/loc/lcl/PTB/OpenFolderSchema.json.lcl b/loc/lcl/PTB/OpenFolderSchema.json.lcl index 2f6d76397..7d77fa863 100644 --- a/loc/lcl/PTB/OpenFolderSchema.json.lcl +++ b/loc/lcl/PTB/OpenFolderSchema.json.lcl @@ -10,6 +10,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -40,7 +67,7 @@ - + @@ -73,7 +100,7 @@ - + @@ -118,7 +145,7 @@ - + @@ -187,50 +214,62 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + @@ -245,13 +284,13 @@ - + - + @@ -266,13 +305,13 @@ - + - + @@ -287,43 +326,43 @@ - + - + - + - + - + - + - + @@ -341,7 +380,7 @@ - + @@ -356,13 +395,13 @@ - + - + @@ -380,7 +419,7 @@ - + @@ -398,13 +437,13 @@ - + - + @@ -419,7 +458,7 @@ - + @@ -437,7 +476,7 @@ - + @@ -455,7 +494,7 @@ - + @@ -473,25 +512,25 @@ - + - + - + - + @@ -509,7 +548,7 @@ - + @@ -527,7 +566,7 @@ - + @@ -545,11 +584,20 @@ - + + + + + + + + + + @@ -563,25 +611,25 @@ - + - + - + - + @@ -596,7 +644,7 @@ - + @@ -614,17 +662,32 @@ - + - + + + + + + + + + + + + + + + + @@ -635,7 +698,7 @@ - + @@ -650,7 +713,7 @@ - + @@ -665,7 +728,7 @@ - + @@ -683,7 +746,7 @@ - + @@ -701,13 +764,13 @@ - + - + @@ -743,11 +806,23 @@ - + + + + + + + + + + + + + @@ -761,13 +836,13 @@ - + - + @@ -791,13 +866,13 @@ - + - + @@ -812,31 +887,31 @@ - + - + - + - + - + @@ -860,13 +935,13 @@ - + - + @@ -881,43 +956,43 @@ - + - + - + - + - + - + - + diff --git a/loc/lcl/RUS/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/RUS/Microsoft.SSHDebugPS.dll.lcl index 19d8f8604..e27735d1c 100644 --- a/loc/lcl/RUS/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/RUS/Microsoft.SSHDebugPS.dll.lcl @@ -247,6 +247,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -283,6 +319,15 @@ + + + + + + + + + ]]> @@ -292,6 +337,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -301,6 +370,15 @@ + + + + + + + + + @@ -769,7 +847,7 @@ - + @@ -795,7 +873,7 @@ - + @@ -810,7 +888,7 @@ - + diff --git a/loc/lcl/RUS/OpenFolderSchema.json.lcl b/loc/lcl/RUS/OpenFolderSchema.json.lcl index a7f1633db..e23b5580b 100644 --- a/loc/lcl/RUS/OpenFolderSchema.json.lcl +++ b/loc/lcl/RUS/OpenFolderSchema.json.lcl @@ -10,6 +10,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -37,7 +64,7 @@ - + @@ -70,7 +97,7 @@ - + @@ -115,7 +142,7 @@ - + @@ -181,50 +208,62 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + @@ -239,13 +278,13 @@ - + - + @@ -260,13 +299,13 @@ - + - + @@ -281,43 +320,43 @@ - + - + - + - + - + - + - + @@ -332,7 +371,7 @@ - + @@ -347,13 +386,13 @@ - + - + @@ -368,7 +407,7 @@ - + @@ -383,13 +422,13 @@ - + - + @@ -404,7 +443,7 @@ - + @@ -419,7 +458,7 @@ - + @@ -434,7 +473,7 @@ - + @@ -449,25 +488,25 @@ - + - + - + - + @@ -482,7 +521,7 @@ - + @@ -497,7 +536,7 @@ - + @@ -512,11 +551,20 @@ - + + + + + + + + + + @@ -527,25 +575,25 @@ - + - + - + - + @@ -560,7 +608,7 @@ - + @@ -575,17 +623,32 @@ - + - + + + + + + + + + + + + + + + + @@ -596,7 +659,7 @@ - + @@ -611,7 +674,7 @@ - + @@ -626,7 +689,7 @@ - + @@ -641,7 +704,7 @@ - + @@ -656,13 +719,13 @@ - + - + @@ -695,11 +758,23 @@ - + + + + + + + + + + + + + @@ -710,13 +785,13 @@ - + - + @@ -740,13 +815,13 @@ - + - + @@ -761,31 +836,31 @@ - + - + - + - + - + @@ -809,13 +884,13 @@ - + - + @@ -830,43 +905,43 @@ - + - + - + - + - + - + - + diff --git a/loc/lcl/TRK/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/TRK/Microsoft.SSHDebugPS.dll.lcl index 19f2dd536..d5e538f47 100644 --- a/loc/lcl/TRK/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/TRK/Microsoft.SSHDebugPS.dll.lcl @@ -247,6 +247,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -283,6 +319,15 @@ + + + + + + + + + ]]> @@ -292,6 +337,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -301,6 +370,15 @@ + + + + + + + + + @@ -769,7 +847,7 @@ - + @@ -777,7 +855,7 @@ - + @@ -792,7 +870,7 @@ - + @@ -807,7 +885,7 @@ - + diff --git a/loc/lcl/TRK/OpenFolderSchema.json.lcl b/loc/lcl/TRK/OpenFolderSchema.json.lcl index d30d026c4..64f62e58b 100644 --- a/loc/lcl/TRK/OpenFolderSchema.json.lcl +++ b/loc/lcl/TRK/OpenFolderSchema.json.lcl @@ -10,6 +10,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -40,7 +67,7 @@ - + @@ -73,7 +100,7 @@ - + @@ -118,7 +145,7 @@ - + @@ -187,50 +214,62 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + @@ -245,13 +284,13 @@ - + - + @@ -266,13 +305,13 @@ - + - + @@ -287,43 +326,43 @@ - + - + - + - + - + - + - + @@ -341,7 +380,7 @@ - + @@ -356,13 +395,13 @@ - + - + @@ -380,7 +419,7 @@ - + @@ -398,13 +437,13 @@ - + - + @@ -419,7 +458,7 @@ - + @@ -437,7 +476,7 @@ - + @@ -455,7 +494,7 @@ - + @@ -473,25 +512,25 @@ - + - + - + - + @@ -509,7 +548,7 @@ - + @@ -527,7 +566,7 @@ - + @@ -545,11 +584,20 @@ - + + + + + + + + + + @@ -563,25 +611,25 @@ - + - + - + - + @@ -596,7 +644,7 @@ - + @@ -614,17 +662,32 @@ - + - + + + + + + + + + + + + + + + + @@ -635,7 +698,7 @@ - + @@ -650,7 +713,7 @@ - + @@ -665,7 +728,7 @@ - + @@ -683,7 +746,7 @@ - + @@ -701,13 +764,13 @@ - + - + @@ -743,11 +806,23 @@ - + + + + + + + + + + + + + @@ -761,13 +836,13 @@ - + - + @@ -791,13 +866,13 @@ - + - + @@ -812,31 +887,31 @@ - + - + - + - + - + @@ -860,13 +935,13 @@ - + - + @@ -881,43 +956,43 @@ - + - + - + - + - + - + - + From 4808cbd1f757d93f07decc25aca310aa7c5f7fc1 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Tue, 31 Aug 2021 13:39:01 -0700 Subject: [PATCH 03/13] Fix LogPoint Issue + Add IgnoreResponseOrder in DAR (#1208) * Fix LogPoint Issue Customer reported in v1.6.0 that LogPoints stopped working. This was due to IDebugBreakpointEvent2.EnumBreakpoints returning the same IEnumDebugBoundBreakpoints2. The fix was to save IDebugBoundBreakpoint2[] in the event and return a new IEnumDebugBoundBreakpoints2 object per call. Added a test for logpoints and fixed up ConsoleEvent to be OutputEvent since thats what it should actually be. Added flag IgnoreResponseOrder to allow looking at historical responses to find out if the expected response occurred before. --- src/MIDebugEngine/AD7.Impl/AD7Events.cs | 6 +- .../Engine.Impl/EngineCallback.cs | 4 +- test/CppTests/Tests/BreakpointTests.cs | 43 +++++++++++ .../DebugAdapterRunner/DebugAdapterCommand.cs | 77 +++++++++++++++++-- .../DebugAdapterResponse.cs | 5 +- .../OpenDebug/Commands/Command.cs | 2 +- .../Commands/SetBreakpointsCommand.cs | 20 ++--- .../OpenDebug/Events/ConsoleEvent.cs | 34 -------- .../OpenDebug/Events/OutputEvent.cs | 44 +++++++++++ test/DebuggerTesting/OpenDebug/IResponse.cs | 5 ++ test/DebuggerTesting/OpenDebug/Response.cs | 6 +- test/DebuggerTesting/OpenDebug/RunBuilder.cs | 4 +- 12 files changed, 190 insertions(+), 60 deletions(-) delete mode 100644 test/DebuggerTesting/OpenDebug/Events/ConsoleEvent.cs create mode 100644 test/DebuggerTesting/OpenDebug/Events/OutputEvent.cs diff --git a/src/MIDebugEngine/AD7.Impl/AD7Events.cs b/src/MIDebugEngine/AD7.Impl/AD7Events.cs index 022d24908..961627246 100644 --- a/src/MIDebugEngine/AD7.Impl/AD7Events.cs +++ b/src/MIDebugEngine/AD7.Impl/AD7Events.cs @@ -541,9 +541,9 @@ internal sealed class AD7BreakpointEvent : AD7StoppingEvent, IDebugBreakpointEve { public const string IID = "501C1E21-C557-48B8-BA30-A1EAB0BC4A74"; - private IEnumDebugBoundBreakpoints2 _boundBreakpoints; + IDebugBoundBreakpoint2[] _boundBreakpoints; - public AD7BreakpointEvent(IEnumDebugBoundBreakpoints2 boundBreakpoints) + public AD7BreakpointEvent(IDebugBoundBreakpoint2[] boundBreakpoints) { _boundBreakpoints = boundBreakpoints; } @@ -552,7 +552,7 @@ public AD7BreakpointEvent(IEnumDebugBoundBreakpoints2 boundBreakpoints) int IDebugBreakpointEvent2.EnumBreakpoints(out IEnumDebugBoundBreakpoints2 ppEnum) { - ppEnum = _boundBreakpoints; + ppEnum = new AD7BoundBreakpointsEnum(_boundBreakpoints); return Constants.S_OK; } diff --git a/src/MIDebugEngine/Engine.Impl/EngineCallback.cs b/src/MIDebugEngine/Engine.Impl/EngineCallback.cs index e6813ffde..d87a541e8 100644 --- a/src/MIDebugEngine/Engine.Impl/EngineCallback.cs +++ b/src/MIDebugEngine/Engine.Impl/EngineCallback.cs @@ -199,9 +199,7 @@ public void OnBreakpoint(DebuggedThread thread, ReadOnlyCollection clien // should notify each bound breakpoint that it has been hit and evaluate conditions here. // The sample engine does not support these features. - AD7BoundBreakpointsEnum boundBreakpointsEnum = new AD7BoundBreakpointsEnum(boundBreakpoints); - - AD7BreakpointEvent eventObject = new AD7BreakpointEvent(boundBreakpointsEnum); + AD7BreakpointEvent eventObject = new AD7BreakpointEvent(boundBreakpoints); AD7Thread ad7Thread = (AD7Thread)thread.Client; Send(eventObject, AD7BreakpointEvent.IID, ad7Thread); diff --git a/test/CppTests/Tests/BreakpointTests.cs b/test/CppTests/Tests/BreakpointTests.cs index 40a99c9e8..daee25269 100644 --- a/test/CppTests/Tests/BreakpointTests.cs +++ b/test/CppTests/Tests/BreakpointTests.cs @@ -154,6 +154,49 @@ public void FunctionBreakpointsBasic(ITestSettings settings) } } + [Theory] + [DependsOnTest(nameof(CompileKitchenSinkForBreakpointTests))] + [RequiresTestSettings] + public void LineLogBreakpointsBasic(ITestSettings settings) + { + this.TestPurpose("Tests basic operation of line breakpoints with a LogPoint"); + this.WriteSettings(settings); + + IDebuggee debuggee = SinkHelper.Open(this, settings.CompilerSettings, DebuggeeMonikers.KitchenSink.Breakpoint); + + using (IDebuggerRunner runner = CreateDebugAdapterRunner(settings)) + { + this.Comment("Configure launch"); + runner.Launch(settings.DebuggerSettings, debuggee, "-fCalling"); + + // These keep track of all the breakpoints in a source file + SourceBreakpoints callingBreakpoints = debuggee.Breakpoints(SinkHelper.Calling, 48); + + this.Comment("Set initial breakpoints"); + runner.SetBreakpoints(callingBreakpoints); + + this.Comment("Launch and run until first breakpoint"); + runner.Expects.HitBreakpointEvent(SinkHelper.Calling, 48) + .AfterConfigurationDone(); + + string logMessage = "Log Message"; + + this.Comment("Set a logpoint while in break mode"); + callingBreakpoints.Add(52, null, logMessage); + runner.SetBreakpoints(callingBreakpoints); + + this.Comment("Continue til end with newly-added logpoint"); + // ignoringResponseOrder: true here since sometimes the ContinuedResponse occurs after the OutputEvent and + // DAR does not look at previous messages unless marked ignoreResponseOrder. + runner.Expects.OutputEvent("^" + logMessage + "\\b", CategoryValue.Console, ignoreResponseOrder: true) + .ExitedEvent() + .TerminatedEvent() + .AfterContinue(); + + runner.DisconnectAndVerify(); + } + } + [Theory] [DependsOnTest(nameof(CompileKitchenSinkForBreakpointTests))] [RequiresTestSettings] diff --git a/test/DebugAdapterRunner/DebugAdapterCommand.cs b/test/DebugAdapterRunner/DebugAdapterCommand.cs index 529d11b98..e7f091a97 100644 --- a/test/DebugAdapterRunner/DebugAdapterCommand.cs +++ b/test/DebugAdapterRunner/DebugAdapterCommand.cs @@ -130,6 +130,19 @@ private byte[] ReadBlockFromStream(Stream stream, Process debugAdapter, int leng return messageBuffer; } + private struct ResponsePair + { + /// + /// Boolean to indicate if this response has a match. + /// + public bool FoundMatch { get; set; } + + /// + /// The response + /// + public object Response { get; set; } + } + public override void Run(DebugAdapterRunner runner) { // Send the request @@ -138,12 +151,44 @@ public override void Run(DebugAdapterRunner runner) runner.DebugAdapter.StandardInput.Write(request); // Process + validate responses - List responseList = new List(); + List responseList = new List(); int currentExpectedResponseIndex = 0; + int previousExpectedResponseIndex = 0; // Loop until we have received as many expected responses as expected while (currentExpectedResponseIndex < this.ExpectedResponses.Count) { + // Check if previous messages contained the expected response + if (previousExpectedResponseIndex != currentExpectedResponseIndex) + { + DebugAdapterResponse expected = this.ExpectedResponses[currentExpectedResponseIndex]; + // Only search responses in history list if we can ignore the response order. + if (expected.IgnoreResponseOrder) + { + for (int i = 0; i < responseList.Count; i++) + { + ResponsePair responsePair = responseList[i]; + // Make sure we have not seen this response and check to see if it the response we are expecting. + if (!responsePair.FoundMatch && Utils.CompareObjects(expected.Response, responsePair.Response, expected.IgnoreOrder)) + { + expected.Match = responsePair.Response; + responsePair.FoundMatch = true; + break; + } + } + + // We found an expected response from a previous response. + // Continue to next expectedResponse. + if (expected.Match != null) + { + currentExpectedResponseIndex++; + continue; + } + } + } + + previousExpectedResponseIndex = currentExpectedResponseIndex; + string receivedMessage = null; Exception getMessageExeception = null; try @@ -200,7 +245,19 @@ public override void Run(DebugAdapterRunner runner) messageStart = "Exception while reading message from debug adpter. " + getMessageExeception.Message; } - string expectedResponseText = JsonConvert.SerializeObject(this.ExpectedResponses[currentExpectedResponseIndex].Response); + string expectedResponseText = string.Empty; + for (int i = 0; i < ExpectedResponses.Count; i++) + { + string status; + if (i < currentExpectedResponseIndex) + status = "Found"; + else if (i == currentExpectedResponseIndex) + status = "Not Found"; + else + status = "Not searched yet"; + expectedResponseText += string.Format(CultureInfo.CurrentCulture, "{0}. {1}: {2}\n", (i + 1), status, JsonConvert.SerializeObject(ExpectedResponses[i].Response)); + } + string actualResponseText = string.Empty; for (int i = 0; i < responseList.Count; i++) @@ -208,7 +265,7 @@ public override void Run(DebugAdapterRunner runner) actualResponseText += string.Format(CultureInfo.CurrentCulture, "{0}. {1}\n", (i + 1), JsonConvert.SerializeObject(responseList[i])); } - string errorMessage = string.Format(CultureInfo.CurrentCulture, "{0}\nExpected = {1}\nActual Responses =\n{2}", + string errorMessage = string.Format(CultureInfo.CurrentCulture, "{0}\nExpected =\n{1}\nActual Responses =\n{2}", messageStart, expectedResponseText, actualResponseText); throw new DARException(errorMessage); @@ -221,7 +278,6 @@ public override void Run(DebugAdapterRunner runner) if (dispatcherMessage.type == "event") { DispatcherEvent dispatcherEvent = JsonConvert.DeserializeObject(receivedMessage); - responseList.Add(dispatcherEvent); if (dispatcherEvent.eventType == "stopped") { @@ -234,11 +290,16 @@ public override void Run(DebugAdapterRunner runner) expected.Match = dispatcherEvent; currentExpectedResponseIndex++; } + + responseList.Add(new ResponsePair() + { + FoundMatch = expected.Match != null, + Response = dispatcherEvent + }); } else if (dispatcherMessage.type == "response") { DispatcherResponse dispatcherResponse = JsonConvert.DeserializeObject(receivedMessage); - responseList.Add(dispatcherResponse); var expected = this.ExpectedResponses[currentExpectedResponseIndex]; if (Utils.CompareObjects(expected.Response, dispatcherResponse, expected.IgnoreOrder)) @@ -246,6 +307,12 @@ public override void Run(DebugAdapterRunner runner) expected.Match = dispatcherResponse; currentExpectedResponseIndex++; } + + responseList.Add(new ResponsePair() + { + FoundMatch = expected.Match != null, + Response = dispatcherResponse + }); } else if (dispatcherMessage.type == "request") { diff --git a/test/DebugAdapterRunner/DebugAdapterResponse.cs b/test/DebugAdapterRunner/DebugAdapterResponse.cs index 0d2346974..531a3c32a 100644 --- a/test/DebugAdapterRunner/DebugAdapterResponse.cs +++ b/test/DebugAdapterRunner/DebugAdapterResponse.cs @@ -16,11 +16,14 @@ public class DebugAdapterResponse public dynamic Match { get; internal set; } public bool IgnoreOrder { get; private set; } - public DebugAdapterResponse(object response, bool ignoreOrder = false) + public bool IgnoreResponseOrder { get; private set; } + + public DebugAdapterResponse(object response, bool ignoreOrder = false, bool ignoreResponseOrder = false) { Response = response; Match = null; IgnoreOrder = ignoreOrder; + IgnoreResponseOrder = ignoreResponseOrder; } } } diff --git a/test/DebuggerTesting/OpenDebug/Commands/Command.cs b/test/DebuggerTesting/OpenDebug/Commands/Command.cs index a81cd2d3d..d2ff16008 100644 --- a/test/DebuggerTesting/OpenDebug/Commands/Command.cs +++ b/test/DebuggerTesting/OpenDebug/Commands/Command.cs @@ -199,7 +199,7 @@ private void Run(DarRunner darRunner, ILoggingComponent log, params IEvent[] exp // Create a DAR Response from an expected response private static DebugAdapterResponse GetDarResponse(IResponse response) { - return new DebugAdapterResponse(response.DynamicResponse, response.IgnoreOrder); + return new DebugAdapterResponse(response.DynamicResponse, response.IgnoreOrder, response.IgnoreResponseOrder); } #region ActualResponse diff --git a/test/DebuggerTesting/OpenDebug/Commands/SetBreakpointsCommand.cs b/test/DebuggerTesting/OpenDebug/Commands/SetBreakpointsCommand.cs index d647327ca..d16f9fabd 100644 --- a/test/DebuggerTesting/OpenDebug/Commands/SetBreakpointsCommand.cs +++ b/test/DebuggerTesting/OpenDebug/Commands/SetBreakpointsCommand.cs @@ -18,10 +18,12 @@ public sealed class SetBreakpointsCommandArgs : JsonValue { public sealed class SourceBreakpoint { - public SourceBreakpoint(int line, int? column, string condition) + public SourceBreakpoint(int line, int? column, string condition, string logMessage) { this.line = line; + this.column = column; this.condition = condition; + this.logMessage = logMessage; } public int line; @@ -31,6 +33,9 @@ public SourceBreakpoint(int line, int? column, string condition) [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public string condition; + + [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] + public string logMessage; } public Source source = new Source(); @@ -58,7 +63,7 @@ public SourceBreakpoints(string sourceRoot, string relativePath) { Parameter.ThrowIfNull(sourceRoot, nameof(sourceRoot)); Parameter.ThrowIfNull(relativePath, nameof(relativePath)); - this.Breakpoints = new Dictionary(); + this.Breakpoints = new Dictionary(); this.RelativePath = relativePath; this.FullPath = Path.Combine(sourceRoot, relativePath); } @@ -67,11 +72,11 @@ public SourceBreakpoints(string sourceRoot, string relativePath) #region Add/Remove - public SourceBreakpoints Add(int lineNumber, string condition = null) + public SourceBreakpoints Add(int lineNumber, string condition = null, string logMessage = null) { if (this.Breakpoints.ContainsKey(lineNumber)) throw new RunnerException("Breakpoint line {0} already added to file {1}.", lineNumber, this.RelativePath); - this.Breakpoints.Add(lineNumber, condition); + this.Breakpoints.Add(lineNumber, new SetBreakpointsCommandArgs.SourceBreakpoint(lineNumber, null, condition, logMessage)); return this; } @@ -97,7 +102,7 @@ public SourceBreakpoints Remove(int lineNumber) /// Keep the breakpoint info in a dictionary indexed by line number. /// Store the condition as the value. /// - public IDictionary Breakpoints { get; private set; } + public IDictionary Breakpoints { get; private set; } } #endregion @@ -112,10 +117,7 @@ public SetBreakpointsCommand(SourceBreakpoints sourceBreakpoints) : this() { this.Args.source.path = sourceBreakpoints.FullPath; - IDictionary breakpoints = sourceBreakpoints.Breakpoints; - this.Args.breakpoints = breakpoints.Select(x => - new SetBreakpointsCommandArgs.SourceBreakpoint(x.Key, null, x.Value) - ).ToArray(); + this.Args.breakpoints = sourceBreakpoints.Breakpoints.Select(x => x.Value).ToArray(); this.Args.lines = this.Args.breakpoints.Select(x => x.line).ToArray(); } diff --git a/test/DebuggerTesting/OpenDebug/Events/ConsoleEvent.cs b/test/DebuggerTesting/OpenDebug/Events/ConsoleEvent.cs deleted file mode 100644 index 300c61d59..000000000 --- a/test/DebuggerTesting/OpenDebug/Events/ConsoleEvent.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Newtonsoft.Json; - -namespace DebuggerTesting.OpenDebug.Events -{ - - #region ConsoleEventValue - - public sealed class ConsoleEventValue : EventValue - { - public sealed class Body - { - [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] - public string output; - - public string category; - } - - public Body body = new Body(); - } - - #endregion - - public class ConsoleEvent : Event - { - public ConsoleEvent(string text) : base("console") - { - this.ExpectedResponse.body.category = "console"; - this.ExpectedResponse.body.output = text; - } - } -} diff --git a/test/DebuggerTesting/OpenDebug/Events/OutputEvent.cs b/test/DebuggerTesting/OpenDebug/Events/OutputEvent.cs new file mode 100644 index 000000000..eba4a4c51 --- /dev/null +++ b/test/DebuggerTesting/OpenDebug/Events/OutputEvent.cs @@ -0,0 +1,44 @@ +// // Copyright (c) Microsoft. All rights reserved. +// // Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +namespace DebuggerTesting.OpenDebug.Events +{ + public enum CategoryValue + { + Console = 0, + Stdout = 1, + Stderr = 2, + Telemetry = 3, + Unknown = Int32.MaxValue + } + + public sealed class OutputEventValue : EventValue + { + public sealed class Body + { + public string output; + + public string category; + } + + public Body body = new Body(); + } + + public sealed class OutputEvent : Event + { + public OutputEvent(string text, CategoryValue category, bool ignoreResponseOrder) : base("output") + { + this.IgnoreResponseOrder = ignoreResponseOrder; + this.ExpectedResponse.body.category = GetCategory(category); + this.ExpectedResponse.body.output = text; + } + + private static string GetCategory(CategoryValue category) + { + Parameter.ThrowIfIsInvalid(category, CategoryValue.Unknown, nameof(category)); + return category.ToString().ToLowerInvariant(); + } + } +} diff --git a/test/DebuggerTesting/OpenDebug/IResponse.cs b/test/DebuggerTesting/OpenDebug/IResponse.cs index c8b9ddb3f..4d7558d6d 100644 --- a/test/DebuggerTesting/OpenDebug/IResponse.cs +++ b/test/DebuggerTesting/OpenDebug/IResponse.cs @@ -17,5 +17,10 @@ public interface IResponse /// Set to true if the order of the items in the response is not important (like variable lists) /// bool IgnoreOrder { get; } + + /// + /// Set to true if the order of the response is not important (like output events) + /// + bool IgnoreResponseOrder { get; } } } diff --git a/test/DebuggerTesting/OpenDebug/Response.cs b/test/DebuggerTesting/OpenDebug/Response.cs index d56ad11dc..7b4921649 100644 --- a/test/DebuggerTesting/OpenDebug/Response.cs +++ b/test/DebuggerTesting/OpenDebug/Response.cs @@ -31,9 +31,11 @@ public Response() public bool IgnoreOrder { get; protected set; } - #endregion + public bool IgnoreResponseOrder { get; protected set; } - public T ExpectedResponse { get; protected set; } + #endregion + + public T ExpectedResponse { get; protected set; } public override string ToString() { diff --git a/test/DebuggerTesting/OpenDebug/RunBuilder.cs b/test/DebuggerTesting/OpenDebug/RunBuilder.cs index 6e0df5945..a5e4bd130 100644 --- a/test/DebuggerTesting/OpenDebug/RunBuilder.cs +++ b/test/DebuggerTesting/OpenDebug/RunBuilder.cs @@ -106,9 +106,9 @@ public static IRunBuilder FunctionBreakpointChangedEvent(this IRunBuilder runBui return runBuilder.Event(new BreakpointEvent(reason, startLine, endLine)); } - public static IRunBuilder ConsoleEvent(this IRunBuilder runBuilder, string text) + public static IRunBuilder OutputEvent(this IRunBuilder runBuilder, string text, CategoryValue category, bool ignoreResponseOrder = false) { - return runBuilder.Event(new ConsoleEvent(text)); + return runBuilder.Event(new OutputEvent(text, category, ignoreResponseOrder)); } #endregion From 7277802a3a4e2b762644ebe69fc77f132551ebf6 Mon Sep 17 00:00:00 2001 From: csigs Date: Tue, 31 Aug 2021 17:28:13 -0700 Subject: [PATCH 04/13] LEGO: check in for main to temporary branch. (#1212) --- loc/lcl/DEU/Microsoft.SSHDebugPS.dll.lcl | 14 ++++++++---- loc/lcl/DEU/OpenFolderSchema.json.lcl | 28 ++++++++++++++++++++++-- loc/lcl/PTB/Microsoft.SSHDebugPS.dll.lcl | 9 +++++--- loc/lcl/PTB/OpenFolderSchema.json.lcl | 26 +++++++++++++++++++++- 4 files changed, 67 insertions(+), 10 deletions(-) diff --git a/loc/lcl/DEU/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/DEU/Microsoft.SSHDebugPS.dll.lcl index 7746cf63a..0ae56658c 100644 --- a/loc/lcl/DEU/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/DEU/Microsoft.SSHDebugPS.dll.lcl @@ -251,7 +251,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -322,6 +322,9 @@ + + + @@ -338,7 +341,7 @@ - + @@ -346,6 +349,9 @@ + + + @@ -353,7 +359,7 @@ - + diff --git a/loc/lcl/DEU/OpenFolderSchema.json.lcl b/loc/lcl/DEU/OpenFolderSchema.json.lcl index 22155594a..d00b8ffe8 100644 --- a/loc/lcl/DEU/OpenFolderSchema.json.lcl +++ b/loc/lcl/DEU/OpenFolderSchema.json.lcl @@ -15,6 +15,9 @@ + + + @@ -24,6 +27,9 @@ + + + @@ -33,6 +39,9 @@ + + + @@ -259,12 +268,18 @@ + + + + + + @@ -593,7 +608,7 @@ - + @@ -677,7 +692,7 @@ - + @@ -685,6 +700,9 @@ + + + @@ -814,12 +832,18 @@ + + + + + + diff --git a/loc/lcl/PTB/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/PTB/Microsoft.SSHDebugPS.dll.lcl index 8f1f8a373..044d484da 100644 --- a/loc/lcl/PTB/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/PTB/Microsoft.SSHDebugPS.dll.lcl @@ -260,7 +260,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -341,7 +341,7 @@ - + @@ -349,6 +349,9 @@ + + + diff --git a/loc/lcl/PTB/OpenFolderSchema.json.lcl b/loc/lcl/PTB/OpenFolderSchema.json.lcl index 7d77fa863..1b3f98944 100644 --- a/loc/lcl/PTB/OpenFolderSchema.json.lcl +++ b/loc/lcl/PTB/OpenFolderSchema.json.lcl @@ -15,6 +15,9 @@ + + + @@ -24,6 +27,9 @@ + + + @@ -33,6 +39,9 @@ + + + @@ -259,12 +268,18 @@ + + + + + + @@ -593,7 +608,7 @@ - + @@ -685,6 +700,9 @@ + + + @@ -814,12 +832,18 @@ + + + + + + From 2b0c756684fdd0103a932806007e4faf74074ec4 Mon Sep 17 00:00:00 2001 From: csigs Date: Wed, 1 Sep 2021 09:27:28 -0700 Subject: [PATCH 05/13] LEGO: check in for main to temporary branch. (#1213) --- loc/lcl/CSY/Microsoft.SSHDebugPS.dll.lcl | 19 +++++++++-------- loc/lcl/CSY/OpenFolderSchema.json.lcl | 26 +++++++++++++++++++++++- loc/lcl/KOR/Microsoft.SSHDebugPS.dll.lcl | 20 +++++++++++------- loc/lcl/KOR/OpenFolderSchema.json.lcl | 26 +++++++++++++++++++++++- loc/lcl/PLK/Microsoft.SSHDebugPS.dll.lcl | 17 +++++++++------- loc/lcl/PLK/OpenFolderSchema.json.lcl | 26 +++++++++++++++++++++++- 6 files changed, 109 insertions(+), 25 deletions(-) diff --git a/loc/lcl/CSY/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/CSY/Microsoft.SSHDebugPS.dll.lcl index 64b3cae58..a5d509749 100644 --- a/loc/lcl/CSY/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/CSY/Microsoft.SSHDebugPS.dll.lcl @@ -251,7 +251,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -269,7 +269,7 @@ - + @@ -278,7 +278,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -341,7 +341,7 @@ - + @@ -349,6 +349,9 @@ + + + @@ -356,7 +359,7 @@ - + @@ -374,7 +377,7 @@ - + diff --git a/loc/lcl/CSY/OpenFolderSchema.json.lcl b/loc/lcl/CSY/OpenFolderSchema.json.lcl index 37a7836aa..e444a35ba 100644 --- a/loc/lcl/CSY/OpenFolderSchema.json.lcl +++ b/loc/lcl/CSY/OpenFolderSchema.json.lcl @@ -15,6 +15,9 @@ + + + @@ -24,6 +27,9 @@ + + + @@ -33,6 +39,9 @@ + + + @@ -259,12 +268,18 @@ + + + + + + @@ -677,7 +692,7 @@ - + @@ -685,6 +700,9 @@ + + + @@ -814,12 +832,18 @@ + + + + + + diff --git a/loc/lcl/KOR/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/KOR/Microsoft.SSHDebugPS.dll.lcl index 62fdb025f..36922ddbc 100644 --- a/loc/lcl/KOR/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/KOR/Microsoft.SSHDebugPS.dll.lcl @@ -251,7 +251,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -269,7 +269,7 @@ - + @@ -278,7 +278,7 @@ - + @@ -322,6 +322,9 @@ + + + @@ -338,7 +341,7 @@ - + @@ -346,6 +349,9 @@ + + + @@ -353,7 +359,7 @@ - + @@ -371,7 +377,7 @@ - + diff --git a/loc/lcl/KOR/OpenFolderSchema.json.lcl b/loc/lcl/KOR/OpenFolderSchema.json.lcl index b87880e33..fcc9775b5 100644 --- a/loc/lcl/KOR/OpenFolderSchema.json.lcl +++ b/loc/lcl/KOR/OpenFolderSchema.json.lcl @@ -15,6 +15,9 @@ + + + @@ -24,6 +27,9 @@ + + + @@ -33,6 +39,9 @@ + + + @@ -259,12 +268,18 @@ + + + + + + @@ -677,7 +692,7 @@ - + @@ -685,6 +700,9 @@ + + + @@ -814,12 +832,18 @@ + + + + + + diff --git a/loc/lcl/PLK/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/PLK/Microsoft.SSHDebugPS.dll.lcl index 69c4f0bc2..99ff217c4 100644 --- a/loc/lcl/PLK/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/PLK/Microsoft.SSHDebugPS.dll.lcl @@ -251,7 +251,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -269,7 +269,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -341,7 +341,7 @@ - + @@ -349,6 +349,9 @@ + + + @@ -356,7 +359,7 @@ - + @@ -374,7 +377,7 @@ - + diff --git a/loc/lcl/PLK/OpenFolderSchema.json.lcl b/loc/lcl/PLK/OpenFolderSchema.json.lcl index 824db11f1..3835e1c6d 100644 --- a/loc/lcl/PLK/OpenFolderSchema.json.lcl +++ b/loc/lcl/PLK/OpenFolderSchema.json.lcl @@ -15,6 +15,9 @@ + + + @@ -24,6 +27,9 @@ + + + @@ -33,6 +39,9 @@ + + + @@ -259,12 +268,18 @@ + + + + + + @@ -677,7 +692,7 @@ - + @@ -685,6 +700,9 @@ + + + @@ -814,12 +832,18 @@ + + + + + + From 645853b97778fc47e524b6407d7e6843ed0909a2 Mon Sep 17 00:00:00 2001 From: csigs Date: Wed, 1 Sep 2021 09:27:51 -0700 Subject: [PATCH 06/13] LEGO: check in for main to temporary branch. (#1214) --- loc/lcl/RUS/Microsoft.SSHDebugPS.dll.lcl | 19 +++++++++------- loc/lcl/RUS/OpenFolderSchema.json.lcl | 28 ++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/loc/lcl/RUS/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/RUS/Microsoft.SSHDebugPS.dll.lcl index e27735d1c..8d2e58087 100644 --- a/loc/lcl/RUS/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/RUS/Microsoft.SSHDebugPS.dll.lcl @@ -251,7 +251,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -269,7 +269,7 @@ - + @@ -278,7 +278,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -341,7 +341,7 @@ - + @@ -349,6 +349,9 @@ + + + @@ -356,7 +359,7 @@ - + @@ -374,7 +377,7 @@ - + diff --git a/loc/lcl/RUS/OpenFolderSchema.json.lcl b/loc/lcl/RUS/OpenFolderSchema.json.lcl index e23b5580b..23799a41e 100644 --- a/loc/lcl/RUS/OpenFolderSchema.json.lcl +++ b/loc/lcl/RUS/OpenFolderSchema.json.lcl @@ -15,6 +15,9 @@ + + + @@ -24,6 +27,9 @@ + + + @@ -33,6 +39,9 @@ + + + @@ -253,12 +262,18 @@ + + + + + + @@ -560,7 +575,7 @@ - + @@ -638,7 +653,7 @@ - + @@ -646,6 +661,9 @@ + + + @@ -766,12 +784,18 @@ + + + + + + From 2bf9ba5c464a054519f3a10c27534d85bf6731f7 Mon Sep 17 00:00:00 2001 From: csigs Date: Wed, 1 Sep 2021 09:52:31 -0700 Subject: [PATCH 07/13] LEGO: check in for main to temporary branch. (#1215) --- loc/lcl/CHT/Microsoft.SSHDebugPS.dll.lcl | 20 +++++++++++------- loc/lcl/CHT/OpenFolderSchema.json.lcl | 26 +++++++++++++++++++++++- loc/lcl/JPN/Microsoft.SSHDebugPS.dll.lcl | 18 ++++++++++------ loc/lcl/JPN/OpenFolderSchema.json.lcl | 26 +++++++++++++++++++++++- 4 files changed, 75 insertions(+), 15 deletions(-) diff --git a/loc/lcl/CHT/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/CHT/Microsoft.SSHDebugPS.dll.lcl index a1267d4a2..bf7a6b3b1 100644 --- a/loc/lcl/CHT/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/CHT/Microsoft.SSHDebugPS.dll.lcl @@ -251,7 +251,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -269,7 +269,7 @@ - + @@ -278,7 +278,7 @@ - + @@ -322,6 +322,9 @@ + + + @@ -338,7 +341,7 @@ - + @@ -346,6 +349,9 @@ + + + @@ -353,7 +359,7 @@ - + @@ -371,7 +377,7 @@ - + diff --git a/loc/lcl/CHT/OpenFolderSchema.json.lcl b/loc/lcl/CHT/OpenFolderSchema.json.lcl index 094c6c48c..d05fe03da 100644 --- a/loc/lcl/CHT/OpenFolderSchema.json.lcl +++ b/loc/lcl/CHT/OpenFolderSchema.json.lcl @@ -15,6 +15,9 @@ + + + @@ -24,6 +27,9 @@ + + + @@ -33,6 +39,9 @@ + + + @@ -259,12 +268,18 @@ + + + + + + @@ -677,7 +692,7 @@ - + @@ -685,6 +700,9 @@ + + + @@ -814,12 +832,18 @@ + + + + + + diff --git a/loc/lcl/JPN/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/JPN/Microsoft.SSHDebugPS.dll.lcl index c92c263ae..68dc203e3 100644 --- a/loc/lcl/JPN/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/JPN/Microsoft.SSHDebugPS.dll.lcl @@ -251,7 +251,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -269,7 +269,7 @@ - + @@ -278,7 +278,7 @@ - + @@ -322,6 +322,9 @@ + + + @@ -338,7 +341,7 @@ - + @@ -346,6 +349,9 @@ + + + @@ -353,7 +359,7 @@ - + diff --git a/loc/lcl/JPN/OpenFolderSchema.json.lcl b/loc/lcl/JPN/OpenFolderSchema.json.lcl index 7ffd2b3d3..319c23253 100644 --- a/loc/lcl/JPN/OpenFolderSchema.json.lcl +++ b/loc/lcl/JPN/OpenFolderSchema.json.lcl @@ -15,6 +15,9 @@ + + + @@ -24,6 +27,9 @@ + + + @@ -33,6 +39,9 @@ + + + @@ -259,12 +268,18 @@ + + + + + + @@ -677,7 +692,7 @@ - + @@ -685,6 +700,9 @@ + + + @@ -814,12 +832,18 @@ + + + + + + From 0302dfc086caca2d1dfaf30d4cace3ad98d34888 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Wed, 1 Sep 2021 15:34:48 -0700 Subject: [PATCH 08/13] Normalize Building MIEngine for VS/VSCode (#1216) * Normalize Building MIEngine for VS/VSCode This PR adds ./eng/Scripts that can be used to build MIDebugEngine / MIDebugEngine-Unix on Windows/macOS/Linux similar to how the CI does it. CI-Test.[cmd|ps1] is not added because setup is a bit more complicated than linux/macOS. --- .github/workflows/pull-request.yml | 36 +++++++------------- eng/Scripts/CI-Build.cmd | 15 +++++++++ eng/Scripts/CI-Build.ps1 | 54 ++++++++++++++++++++++++++++++ eng/Scripts/CI-Build.sh | 21 ++++++++++++ eng/Scripts/CI-Test.sh | 22 ++++++++++++ tools/DownloadLldbMI.sh | 4 ++- 6 files changed, 127 insertions(+), 25 deletions(-) create mode 100644 eng/Scripts/CI-Build.cmd create mode 100644 eng/Scripts/CI-Build.ps1 create mode 100755 eng/Scripts/CI-Build.sh create mode 100755 eng/Scripts/CI-Test.sh diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 45a0003ef..2bd14f48e 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -29,11 +29,9 @@ jobs: - name: Setup NuGet.exe for use with actions uses: NuGet/setup-nuget@v1.0.5 - - name: Restore the application - run: NuGet.exe restore ${{ github.workspace }}\src\MIDebugEngine.sln - - - name: Build the application - run: msbuild ${{ github.workspace }}\src\MIDebugEngine.sln /p:Configuration=$env:Configuration + - name: Build MIDebugEngine + run: | + ${{ github.workspace }}/eng/Scripts/CI-Build.cmd -c $env:Configuration -t vs env: Configuration: ${{ matrix.configuration }} @@ -63,17 +61,12 @@ jobs: - name: Setup NuGet.exe for use with actions uses: NuGet/setup-nuget@v1.0.5 - - name: Restore the application - run: NuGet.exe restore ${{ github.workspace }}\src\MIDebugEngine.sln - - - name: Build the application - run: msbuild ${{ github.workspace }}\src\MIDebugEngine.sln /p:Configuration=Debug + - name: Build MIDebugEngine + run: | + ${{ github.workspace }}/eng/Scripts/CI-Build.cmd -t vscode - - name: Build OpenDebugAD7 + - name: Copy Test Configuration run: | - dotnet publish ${{ github.workspace }}\src\OpenDebugAD7\OpenDebugAD7.csproj -c Debug -r win-x64 --self-contained -o ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\extension\debugAdapters - copy ${{ github.workspace }}\bin\Debug\Microsoft.MIDebugEngine.dll ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\extension\debugAdapters/. - copy ${{ github.workspace }}\bin\Debug\Microsoft.MICore.dll ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\extension\debugAdapters\. copy ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\CppTests\TestConfigurations\config_msys_gdb.xml ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\CppTests\config.xml - name: Setup MSYS2 @@ -120,12 +113,12 @@ jobs: # echo 1 | sudo tee /proc/sys/kernel/core_uses_pid # ulimit -S -c unlimited # sudo sysctl -w kernel.core_pattern=${{ github.workspace }}/core.%e + - run: | - ${{ github.workspace }}/PublishOpenDebugAD7.sh -c Debug -o ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters - cp ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/TestConfigurations/config_gdb.xml ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml + ${{ github.workspace }}/eng/Scripts/CI-Build.sh - run: | - dotnet test ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/CppTests.dll --logger "trx;LogFileName=${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx" + ${{ github.workspace }}/eng/Scripts/CI-Test.sh - name: 'Upload Test Results' uses: actions/upload-artifact@v2 @@ -151,15 +144,10 @@ jobs: run: dotnet build ${{ github.workspace }}/src/MIDebugEngine-Unix.sln - run: | - ${{ github.workspace }}/PublishOpenDebugAD7.sh -c Debug -o ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters - cp ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/TestConfigurations/config_lldb.xml ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml - - - name: Download LLDB-MI - run: | - ${{ github.workspace }}/tools/DownloadLldbMI.sh ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters + ${{ github.workspace }}/eng/Scripts/CI-Build.sh - run: | - dotnet test ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/CppTests.dll --logger "trx;LogFileName=${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx" + ${{ github.workspace }}/eng/Scripts/CI-Test.sh - name: 'Upload Test Results' uses: actions/upload-artifact@v2 diff --git a/eng/Scripts/CI-Build.cmd b/eng/Scripts/CI-Build.cmd new file mode 100644 index 000000000..597fdfd10 --- /dev/null +++ b/eng/Scripts/CI-Build.cmd @@ -0,0 +1,15 @@ +@echo off +setlocal + +if "%~1"=="/?" goto Help +if "%~1"=="-?" goto Help +if "%~1"=="-h" goto Help + +@SET Args= %* +@SET Args=%Args: /= -% +powershell -NoProfile -ExecutionPolicy bypass -File %~dp0CI-Build.ps1 %Args% +@exit /B %ERRORLEVEL% +goto :EOF + +:Help +call powershell -NoProfile -ExecutionPolicy ByPass -Command "get-help %~dp0CI-Build.ps1 -detailed" \ No newline at end of file diff --git a/eng/Scripts/CI-Build.ps1 b/eng/Scripts/CI-Build.ps1 new file mode 100644 index 000000000..4347ebcb7 --- /dev/null +++ b/eng/Scripts/CI-Build.ps1 @@ -0,0 +1,54 @@ +param( +[ValidateSet("Debug", "Release")] +[Alias("c")] +[string]$Configuration="Debug", + +[ValidateSet("win-x86", "win10-arm64")] +[Alias("r")] +[string]$RID="win-x86", + +[ValidateSet("vs", "vscode")] +[Alias("t")] +[string]$TargetPlatform="vs" +) + +$ErrorActionPreference="Stop" + +$RootPath = Resolve-Path -Path "$PSScriptRoot\..\.." + +$msbuildPath = (Get-Command msbuild.exe -ErrorAction Ignore).Path + +if (!$msbuildPath) { + throw "Please run the script from a developer command prompt or have msbuild.exe in your PATH" +} + +msbuild /t:Restore $RootPath\src\MIDebugEngine.sln /p:Configuration=$Configuration +if ($lastexitcode -ne 0) +{ + throw "Failed to restore packages for MIDebugEngine.sln" +} +msbuild $RootPath\src\MIDebugEngine.sln /p:Configuration=$Configuration +if ($lastexitcode -ne 0) +{ + throw "Failed to build MIDebugEngine.sln" +} + + +if ($TargetPlatform -eq "vscode") +{ + $dotnetPath = (Get-Command dotnet.exe -ErrorAction Ignore).Path; + + if (!$dotnetPath) { + throw "Missing .NET SDK. Please install the SDK at https://dotnet.microsoft.com/download" + } + + dotnet publish $RootPath\src\OpenDebugAD7\OpenDebugAD7.csproj -c $Configuration -r $RID --self-contained -o $RootPath\bin\DebugAdapterProtocolTests\$Configuration\extension\debugAdapters + if ($lastexitcode -ne 0) + { + throw "Failed to publish OpenDebugAD7" + } + + Copy-Item $RootPath\bin\$Configuration\Microsoft.MIDebugEngine.dll $RootPath\bin\DebugAdapterProtocolTests\$Configuration\extension\debugAdapters/. + Copy-Item $RootPath\bin\$Configuration\Microsoft.MICore.dll $RootPath\bin\DebugAdapterProtocolTests\$Configuration\extension\debugAdapters\. + Copy-Item $RootPath\bin\$Configuration\vscode\WindowsDebugLauncher.exe $RootPath\bin\DebugAdapterProtocolTests\$Configuration\extension\debugAdapters\. +} \ No newline at end of file diff --git a/eng/Scripts/CI-Build.sh b/eng/Scripts/CI-Build.sh new file mode 100755 index 000000000..6fb33d77e --- /dev/null +++ b/eng/Scripts/CI-Build.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +ScriptDir=$(dirname "$0") +RootDir=$ScriptDir/../.. + +if [ "$(which dotnet)" == "" ]; then + echo "ERROR: Missing .NET SDK. Please install the SDK at https://dotnet.microsoft.com/download" + exit 1 +fi + +if ! dotnet build "$RootDir"/src/MIDebugEngine-Unix.sln; then + echo "ERROR: Failed to build MIDebugEngine-Unix.sln" + exit 1 +fi + +if ! "$RootDir"/PublishOpenDebugAD7.sh -c Debug -o "$RootDir"/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters; then + echo "ERROR: Failed to build MIDebugEngine-Unix.sln" + exit 1 +fi + +exit 0 \ No newline at end of file diff --git a/eng/Scripts/CI-Test.sh b/eng/Scripts/CI-Test.sh new file mode 100755 index 000000000..fd9c4c60a --- /dev/null +++ b/eng/Scripts/CI-Test.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +ScriptDir=$(dirname "$0") +RootDir=$ScriptDir/../.. + +if [ "$(which dotnet)" == "" ]; then + echo "ERROR: Missing .NET SDK. Please install the SDK at https://dotnet.microsoft.com/download" +fi + +if [ ! -f "$RootDir/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml" ]; then + if [ "$(uname)" = "Darwin" ]; then + if ! "$RootDir"/tools/DownloadLldbMI.sh "$RootDir"/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters; then + echo "ERROR: Failed to download lldb-mi" + exit 1 + fi + cp "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/TestConfigurations/config_lldb.xml "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml + else + cp "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/TestConfigurations/config_gdb.xml "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml + fi +fi + +dotnet test "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/CppTests.dll --logger "trx;LogFileName=$RootDir/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx" \ No newline at end of file diff --git a/tools/DownloadLldbMI.sh b/tools/DownloadLldbMI.sh index 330c1f641..9468c735c 100755 --- a/tools/DownloadLldbMI.sh +++ b/tools/DownloadLldbMI.sh @@ -41,4 +41,6 @@ mv ./debugAdapters/lldb-mi $1/../. # Clean up unused zip rm ./lldb-mi-10.0.0.zip -popd > /dev/null 2>&1 || exit \ No newline at end of file +popd > /dev/null 2>&1 || exit + +exit 0 \ No newline at end of file From 10c5ef5eaa06d26539f92fc5db9c3dd4f48f2f8e Mon Sep 17 00:00:00 2001 From: csigs Date: Wed, 1 Sep 2021 16:26:15 -0700 Subject: [PATCH 09/13] LEGO: check in for main to temporary branch. (#1217) --- loc/lcl/CHS/Microsoft.SSHDebugPS.dll.lcl | 20 +++++++++++------- loc/lcl/CHS/OpenFolderSchema.json.lcl | 24 ++++++++++++++++++++++ loc/lcl/ESN/Microsoft.SSHDebugPS.dll.lcl | 12 ++++++++--- loc/lcl/ESN/OpenFolderSchema.json.lcl | 26 +++++++++++++++++++++++- loc/lcl/FRA/Microsoft.SSHDebugPS.dll.lcl | 8 +++++++- loc/lcl/FRA/OpenFolderSchema.json.lcl | 26 +++++++++++++++++++++++- loc/lcl/TRK/Microsoft.SSHDebugPS.dll.lcl | 15 ++++++++------ loc/lcl/TRK/OpenFolderSchema.json.lcl | 26 +++++++++++++++++++++++- 8 files changed, 137 insertions(+), 20 deletions(-) diff --git a/loc/lcl/CHS/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/CHS/Microsoft.SSHDebugPS.dll.lcl index 52b61863f..6e889f8b1 100644 --- a/loc/lcl/CHS/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/CHS/Microsoft.SSHDebugPS.dll.lcl @@ -251,7 +251,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -269,7 +269,7 @@ - + @@ -278,7 +278,7 @@ - + @@ -322,6 +322,9 @@ + + + @@ -338,7 +341,7 @@ - + @@ -346,6 +349,9 @@ + + + @@ -353,7 +359,7 @@ - + @@ -371,7 +377,7 @@ - + diff --git a/loc/lcl/CHS/OpenFolderSchema.json.lcl b/loc/lcl/CHS/OpenFolderSchema.json.lcl index 3eed67250..140e54f7f 100644 --- a/loc/lcl/CHS/OpenFolderSchema.json.lcl +++ b/loc/lcl/CHS/OpenFolderSchema.json.lcl @@ -15,6 +15,9 @@ + + + @@ -24,6 +27,9 @@ + + + @@ -33,6 +39,9 @@ + + + @@ -259,12 +268,18 @@ + + + + + + @@ -685,6 +700,9 @@ + + + @@ -814,12 +832,18 @@ + + + + + + diff --git a/loc/lcl/ESN/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/ESN/Microsoft.SSHDebugPS.dll.lcl index 0a6d757bc..9cc418359 100644 --- a/loc/lcl/ESN/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/ESN/Microsoft.SSHDebugPS.dll.lcl @@ -260,7 +260,7 @@ - + @@ -269,7 +269,7 @@ - + @@ -322,6 +322,9 @@ + + + @@ -346,6 +349,9 @@ + + + @@ -353,7 +359,7 @@ - + diff --git a/loc/lcl/ESN/OpenFolderSchema.json.lcl b/loc/lcl/ESN/OpenFolderSchema.json.lcl index 3fba543f3..08193bf9a 100644 --- a/loc/lcl/ESN/OpenFolderSchema.json.lcl +++ b/loc/lcl/ESN/OpenFolderSchema.json.lcl @@ -15,6 +15,9 @@ + + + @@ -24,6 +27,9 @@ + + + @@ -33,6 +39,9 @@ + + + @@ -253,12 +262,18 @@ + + + + + + @@ -560,7 +575,7 @@ - + @@ -646,6 +661,9 @@ + + + @@ -766,12 +784,18 @@ + + + + + + diff --git a/loc/lcl/FRA/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/FRA/Microsoft.SSHDebugPS.dll.lcl index 5bf0ba6e1..f8b865839 100644 --- a/loc/lcl/FRA/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/FRA/Microsoft.SSHDebugPS.dll.lcl @@ -260,7 +260,7 @@ - + @@ -322,6 +322,9 @@ + + + @@ -346,6 +349,9 @@ + + + diff --git a/loc/lcl/FRA/OpenFolderSchema.json.lcl b/loc/lcl/FRA/OpenFolderSchema.json.lcl index 7b3517ab4..1fd6ccebd 100644 --- a/loc/lcl/FRA/OpenFolderSchema.json.lcl +++ b/loc/lcl/FRA/OpenFolderSchema.json.lcl @@ -15,6 +15,9 @@ + + + @@ -24,6 +27,9 @@ + + + @@ -33,6 +39,9 @@ + + + @@ -259,12 +268,18 @@ + + + + + + @@ -593,7 +608,7 @@ - + @@ -685,6 +700,9 @@ + + + @@ -814,12 +832,18 @@ + + + + + + diff --git a/loc/lcl/TRK/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/TRK/Microsoft.SSHDebugPS.dll.lcl index d5e538f47..843ba4c4e 100644 --- a/loc/lcl/TRK/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/TRK/Microsoft.SSHDebugPS.dll.lcl @@ -251,7 +251,7 @@ - + @@ -269,7 +269,7 @@ - + @@ -278,7 +278,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -341,7 +341,7 @@ - + @@ -349,6 +349,9 @@ + + + @@ -356,7 +359,7 @@ - + diff --git a/loc/lcl/TRK/OpenFolderSchema.json.lcl b/loc/lcl/TRK/OpenFolderSchema.json.lcl index 64f62e58b..9951e20c3 100644 --- a/loc/lcl/TRK/OpenFolderSchema.json.lcl +++ b/loc/lcl/TRK/OpenFolderSchema.json.lcl @@ -15,6 +15,9 @@ + + + @@ -24,6 +27,9 @@ + + + @@ -33,6 +39,9 @@ + + + @@ -259,12 +268,18 @@ + + + + + + @@ -593,7 +608,7 @@ - + @@ -685,6 +700,9 @@ + + + @@ -814,12 +832,18 @@ + + + + + + From 3f015e06a950bf6ae8ecf654534bea76be65ac11 Mon Sep 17 00:00:00 2001 From: csigs Date: Thu, 2 Sep 2021 09:00:00 -0700 Subject: [PATCH 10/13] LEGO: check in for main to temporary branch. (#1218) --- loc/lcl/ITA/Microsoft.SSHDebugPS.dll.lcl | 14 ++++++++---- loc/lcl/ITA/OpenFolderSchema.json.lcl | 28 ++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/loc/lcl/ITA/Microsoft.SSHDebugPS.dll.lcl b/loc/lcl/ITA/Microsoft.SSHDebugPS.dll.lcl index 2072d6537..02eda887c 100644 --- a/loc/lcl/ITA/Microsoft.SSHDebugPS.dll.lcl +++ b/loc/lcl/ITA/Microsoft.SSHDebugPS.dll.lcl @@ -251,7 +251,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -269,7 +269,7 @@ - + @@ -322,6 +322,9 @@ + + + @@ -338,7 +341,7 @@ - + @@ -346,6 +349,9 @@ + + + diff --git a/loc/lcl/ITA/OpenFolderSchema.json.lcl b/loc/lcl/ITA/OpenFolderSchema.json.lcl index cabdec440..458a5e75f 100644 --- a/loc/lcl/ITA/OpenFolderSchema.json.lcl +++ b/loc/lcl/ITA/OpenFolderSchema.json.lcl @@ -15,6 +15,9 @@ + + + @@ -24,6 +27,9 @@ + + + @@ -33,6 +39,9 @@ + + + @@ -259,12 +268,18 @@ + + + + + + @@ -593,7 +608,7 @@ - + @@ -677,7 +692,7 @@ - + @@ -685,6 +700,9 @@ + + + @@ -814,12 +832,18 @@ + + + + + + From c9ea7b2766261b5181f9925596a3f67c14be5d26 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Thu, 2 Sep 2021 18:09:02 -0700 Subject: [PATCH 11/13] Fix PlatformUtilities methods (#1209) * Fix PlatformUtilities methods Use 'RuntimeInformation.IsOSPlatform' instead of 'Environment.OSVersion.Platform' Environment.OSVersion.Platform on .NET 5 is returning 'Unix' for macOS which is causing a bunch of our cases to not work. Tested RuntimeInformation.IsOSPlatform(OSPlatform.Windows) on net472 on Windows and it returns true. * Disable EnvironmentTest w/ spaces darwin-debug does not like environment with spaces, and it is sent by lldb-mi. Needs to be fixed externally. * Disable more tests --- src/MICore/PlatformUtilities.cs | 20 +++++++++++--------- test/CppTests/Tests/EnvironmentTests.cs | 9 ++++++--- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/MICore/PlatformUtilities.cs b/src/MICore/PlatformUtilities.cs index f80ca2fd1..f833ff689 100755 --- a/src/MICore/PlatformUtilities.cs +++ b/src/MICore/PlatformUtilities.cs @@ -32,17 +32,19 @@ private static RuntimePlatform GetRuntimePlatform() private static RuntimePlatform CalculateRuntimePlatform() { - switch (Environment.OSVersion.Platform) + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - case PlatformID.Win32NT: - return RuntimePlatform.Windows; - case PlatformID.Unix: - return RuntimePlatform.Unix; - case PlatformID.MacOSX: - return RuntimePlatform.MacOSX; - default: - return RuntimePlatform.Unknown; + return RuntimePlatform.Windows; } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + return RuntimePlatform.MacOSX; + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + return RuntimePlatform.Unix; + } + return RuntimePlatform.Unknown; } diff --git a/test/CppTests/Tests/EnvironmentTests.cs b/test/CppTests/Tests/EnvironmentTests.cs index b0c355db1..eeef85811 100644 --- a/test/CppTests/Tests/EnvironmentTests.cs +++ b/test/CppTests/Tests/EnvironmentTests.cs @@ -51,7 +51,8 @@ public void EnvironmentVariablesBasic(ITestSettings settings) [DependsOnTest(nameof(CompileKitchenSinkForEnvironmentTests))] [RequiresTestSettings] // Need to support 'runInTerminal' request. - [UnsupportedDebugger(SupportedDebugger.VsDbg, SupportedArchitecture.x86 | SupportedArchitecture.x64)] + // Re-enable lldb for test machines + [UnsupportedDebugger(SupportedDebugger.VsDbg | SupportedDebugger.Lldb, SupportedArchitecture.x86 | SupportedArchitecture.x64)] public void EnvironmentVariablesBasicNewTerminal(ITestSettings settings) { this.TestPurpose("Tests basic operation of environment variables using a new terminal window"); @@ -72,7 +73,8 @@ public void EnvironmentVariablesUndefined(ITestSettings settings) [DependsOnTest(nameof(CompileKitchenSinkForEnvironmentTests))] [RequiresTestSettings] // Need to support 'runInTerminal' request. - [UnsupportedDebugger(SupportedDebugger.VsDbg, SupportedArchitecture.x86 | SupportedArchitecture.x64)] + // Re-enable lldb for test machines + [UnsupportedDebugger(SupportedDebugger.VsDbg | SupportedDebugger.Lldb, SupportedArchitecture.x86 | SupportedArchitecture.x64)] public void EnvironmentVariablesUndefinedNewTerminal(ITestSettings settings) { this.TestPurpose("Tests environment variables that are undefined using a new terminal window"); @@ -136,7 +138,8 @@ public void EnvironmentVariablesSpaces(ITestSettings settings) [DependsOnTest(nameof(CompileKitchenSinkForEnvironmentTests))] [RequiresTestSettings] // Need to support 'runInTerminal' request. - [UnsupportedDebugger(SupportedDebugger.VsDbg, SupportedArchitecture.x86 | SupportedArchitecture.x64)] + // darwin-debug does not support spaces in environment variables + [UnsupportedDebugger(SupportedDebugger.VsDbg | SupportedDebugger.Lldb, SupportedArchitecture.x86 | SupportedArchitecture.x64)] public void EnvironmentVariablesSpacesNewTerminal(ITestSettings settings) { this.TestPurpose("Tests environment variables that include a space in a new terminal window"); From ed94b79824d1e80c5902a4787c631a43951e3c35 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Wed, 8 Sep 2021 13:50:50 -0700 Subject: [PATCH 12/13] Move to 1ES pools (#1219) * Move to 1ES pools --- eng/pipelines/MIDebugEngine-CI.yml | 4 ++-- eng/pipelines/VS-release.yml | 2 +- eng/pipelines/VSCode-release.yml | 4 ++-- ...roBuild2019.job.yml => VSEngSS-MicroBuild2019-1ES.job.yml} | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename eng/pipelines/jobs/{VSEngSS-MicroBuild2019.job.yml => VSEngSS-MicroBuild2019-1ES.job.yml} (86%) diff --git a/eng/pipelines/MIDebugEngine-CI.yml b/eng/pipelines/MIDebugEngine-CI.yml index 387e1793e..4a9188068 100644 --- a/eng/pipelines/MIDebugEngine-CI.yml +++ b/eng/pipelines/MIDebugEngine-CI.yml @@ -20,7 +20,7 @@ stages: - name: TeamName value: MDDDebugger jobs: - - template: ./jobs/VSEngSS-MicroBuild2019.job.yml + - template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml parameters: DisplayName: 'Lab.Debug' JobTemplate: @@ -28,7 +28,7 @@ stages: parameters: Configuration: 'Lab.Debug' - - template: ./jobs/VSEngSS-MicroBuild2019.job.yml + - template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml parameters: DisplayName: 'Lab.Release' JobTemplate: diff --git a/eng/pipelines/VS-release.yml b/eng/pipelines/VS-release.yml index cd4691fb7..c67f192e3 100644 --- a/eng/pipelines/VS-release.yml +++ b/eng/pipelines/VS-release.yml @@ -3,7 +3,7 @@ name: $(Date:yyyMMdd).$(Rev:r) variables: - group: TSDTUSR jobs: -- template: ./jobs/VSEngSS-MicroBuild2019.job.yml +- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml parameters: DisplayName: 'VS_Release' JobTemplate: diff --git a/eng/pipelines/VSCode-release.yml b/eng/pipelines/VSCode-release.yml index a1f46ce53..94a1c211e 100644 --- a/eng/pipelines/VSCode-release.yml +++ b/eng/pipelines/VSCode-release.yml @@ -6,7 +6,7 @@ stages: - stage: Windows dependsOn: [] jobs: - - template: ./jobs/VSEngSS-MicroBuild2019.job.yml + - template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml parameters: DisplayName: 'VSCode_Release' JobTemplate: @@ -24,7 +24,7 @@ stages: - stage: OSX_ESRPSign dependsOn: [OSX_CodeSign] jobs: - - template: ./jobs/VSEngSS-MicroBuild2019.job.yml + - template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml parameters: DisplayName: 'OSX Sign/Harden' JobTemplate: diff --git a/eng/pipelines/jobs/VSEngSS-MicroBuild2019.job.yml b/eng/pipelines/jobs/VSEngSS-MicroBuild2019-1ES.job.yml similarity index 86% rename from eng/pipelines/jobs/VSEngSS-MicroBuild2019.job.yml rename to eng/pipelines/jobs/VSEngSS-MicroBuild2019-1ES.job.yml index d4c163095..459a18afc 100644 --- a/eng/pipelines/jobs/VSEngSS-MicroBuild2019.job.yml +++ b/eng/pipelines/jobs/VSEngSS-MicroBuild2019-1ES.job.yml @@ -8,7 +8,7 @@ jobs: - job: displayName: ${{ parameters.DisplayName }} pool: - name: VSEngSS-MicroBuild2019 + name: VSEngSS-MicroBuild2019-1ES demands: - msbuild - visualstudio From a0a3729ca61dfead96657b7014ed460b3abe7276 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Thu, 9 Sep 2021 17:17:55 -0700 Subject: [PATCH 13/13] Add support for debugging macOS app bundles (#1091) * Add support for debugging macOS app bundles This PR adds support for debugging app bundles on macOS. LLDB understands how to handle app bundles when provided to -file-exec-and-symbols. Reference: ./lldb-mi (gdb) -file-exec-and-symbols /Applications/VLC.app ^done (gdb) =library-loaded,id="/Applications/VLC.app/Contents/MacOS/VLC",target-name="/Applications/VLC.app/Contents/MacOS/VLC",host-name="/Applications/VLC.app/Contents/MacOS/VLC",symbols-loaded="0",loaded_addr="-",size="20480" * Add macOS App Test Add XCodeBuild Compiler Add support for running tests Missing actual test Move to correct location * Address PR issues --- src/OpenDebugAD7/AD7DebugSession.cs | 14 +- src/OpenDebugAD7/OpenDebug/Utilities.cs | 20 +- .../TestConfigurations/config_lldb.xml | 8 + test/CppTests/Tests/MacOSAppTests.cs | 82 +++++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 148 +++++++++ .../src/Shared/Assets.xcassets/Contents.json | 6 + .../debuggees/MacOSApp/src/Shared/main.cpp | 21 ++ .../debuggees/MacOSApp/src/Shared/main.hpp | 13 + .../src/TestApp.xcodeproj/project.pbxproj | 313 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../debuggees/MacOSApp/src/macOS/Info.plist | 26 ++ .../MacOSApp/src/macOS/macOS.entitlements | 10 + .../Attribution/TestSettingsHelper.cs | 16 +- .../Compilation/CompilerBase.cs | 10 +- .../Compilation/CompilerOutputType.cs | 3 +- test/DebuggerTesting/Compilation/Debuggee.cs | 4 + .../Compilation/XCodeRunCompiler.cs | 65 ++++ test/DebuggerTesting/SupportedCompiler.cs | 1 + 20 files changed, 771 insertions(+), 15 deletions(-) create mode 100644 test/CppTests/Tests/MacOSAppTests.cs create mode 100644 test/CppTests/debuggees/MacOSApp/src/Shared/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 test/CppTests/debuggees/MacOSApp/src/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 test/CppTests/debuggees/MacOSApp/src/Shared/Assets.xcassets/Contents.json create mode 100644 test/CppTests/debuggees/MacOSApp/src/Shared/main.cpp create mode 100644 test/CppTests/debuggees/MacOSApp/src/Shared/main.hpp create mode 100644 test/CppTests/debuggees/MacOSApp/src/TestApp.xcodeproj/project.pbxproj create mode 100644 test/CppTests/debuggees/MacOSApp/src/TestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 test/CppTests/debuggees/MacOSApp/src/TestApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 test/CppTests/debuggees/MacOSApp/src/macOS/Info.plist create mode 100644 test/CppTests/debuggees/MacOSApp/src/macOS/macOS.entitlements create mode 100644 test/DebuggerTesting/Compilation/XCodeRunCompiler.cs diff --git a/src/OpenDebugAD7/AD7DebugSession.cs b/src/OpenDebugAD7/AD7DebugSession.cs index 92bdb195b..a85898eee 100644 --- a/src/OpenDebugAD7/AD7DebugSession.cs +++ b/src/OpenDebugAD7/AD7DebugSession.cs @@ -158,7 +158,7 @@ private ProtocolException CreateProtocolExceptionAndLogTelemetry(string telemetr return new ProtocolException(message, new Message(error, message)); } - private bool ValidateProgramPath(ref string program) + private bool ValidateProgramPath(ref string program, string miMode) { // Make sure the slashes go in the correct direction char directorySeparatorChar = Path.DirectorySeparatorChar; @@ -171,6 +171,14 @@ private bool ValidateProgramPath(ref string program) program = m_pathConverter.ConvertLaunchPathForVsCode(program); if (!File.Exists(program)) { + // On macOS, check to see if we are trying to debug an app bundle (.app). + // 'app bundles' contain various resources and executables in a folder. + // LLDB understands how to target these bundles. + if (Utilities.IsOSX() && program.EndsWith(".app", StringComparison.OrdinalIgnoreCase) && miMode?.Equals("lldb", StringComparison.OrdinalIgnoreCase) == true) + { + return Directory.Exists(program); + } + // On Windows, check if we are just missing a '.exe' from the file name. This way we can use the same // launch.json on all platforms. if (Utilities.IsWindows()) @@ -925,7 +933,7 @@ protected override void HandleLaunchRequestAsync(IRequestResponder + + diff --git a/test/CppTests/Tests/MacOSAppTests.cs b/test/CppTests/Tests/MacOSAppTests.cs new file mode 100644 index 000000000..579996796 --- /dev/null +++ b/test/CppTests/Tests/MacOSAppTests.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Threading; +using DebuggerTesting; +using DebuggerTesting.Compilation; +using DebuggerTesting.OpenDebug; +using DebuggerTesting.OpenDebug.Commands; +using DebuggerTesting.OpenDebug.CrossPlatCpp; +using DebuggerTesting.OpenDebug.Events; +using DebuggerTesting.OpenDebug.Extensions; +using DebuggerTesting.Ordering; +using DebuggerTesting.Utilities; +using Xunit; +using Xunit.Abstractions; + +namespace CppTests.Tests +{ + [TestCaseOrderer(DependencyTestOrderer.TypeName, DependencyTestOrderer.AssemblyName)] + public class MacOSAppTests : TestBase + { + #region Constructor + + public MacOSAppTests(ITestOutputHelper outputHelper) : base(outputHelper) + { + } + + #endregion + + #region Methods + + [Theory] + [RequiresTestSettings] + [SupportedCompiler(SupportedCompiler.XCodeBuild, SupportedArchitecture.x64)] + public void CompileMacOSAppForTests(ITestSettings settings) + { + this.TestPurpose("Compile MacOSApp debuggee for tests."); + this.WriteSettings(settings); + + IDebuggee debuggee = Debuggee.Create(this, settings.CompilerSettings, "MacOSApp", 1, "TestApp.app", CompilerOutputType.MacOSApp); + + debuggee.AddSourceFiles("TestApp.xcodeproj"); + + debuggee.Compile(); + } + + [Theory] + [DependsOnTest(nameof(CompileMacOSAppForTests))] + [RequiresTestSettings] + [SupportedCompiler(SupportedCompiler.XCodeBuild, SupportedArchitecture.x64)] + public void MacOSAppBasic(ITestSettings settings) + { + IDebuggee debuggee = Debuggee.Open(this, settings.CompilerSettings, "MacOSApp", 1, "TestApp.app", CompilerOutputType.MacOSApp); + + using (IDebuggerRunner runner = CreateDebugAdapterRunner(settings)) + { + this.Comment("Configure launch."); + runner.Launch(settings.DebuggerSettings, debuggee, null); + + SourceBreakpoints mainBreakpoints = debuggee.Breakpoints(SinkHelper.Main, 14); + runner.SetBreakpoints(mainBreakpoints); + + this.Comment("Launch and run until first breakpoint"); + runner.Expects.HitBreakpointEvent(SinkHelper.Main, 14) + .AfterConfigurationDone(); + + this.Comment("Continue until end"); + runner.Expects.ExitedEvent() + .TerminatedEvent() + .AfterContinue(); + + runner.DisconnectAndVerify(); + } + } + + #endregion + } +} diff --git a/test/CppTests/debuggees/MacOSApp/src/Shared/Assets.xcassets/AccentColor.colorset/Contents.json b/test/CppTests/debuggees/MacOSApp/src/Shared/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 000000000..eb8789700 --- /dev/null +++ b/test/CppTests/debuggees/MacOSApp/src/Shared/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/test/CppTests/debuggees/MacOSApp/src/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json b/test/CppTests/debuggees/MacOSApp/src/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..c136eaff7 --- /dev/null +++ b/test/CppTests/debuggees/MacOSApp/src/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,148 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/test/CppTests/debuggees/MacOSApp/src/Shared/Assets.xcassets/Contents.json b/test/CppTests/debuggees/MacOSApp/src/Shared/Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/test/CppTests/debuggees/MacOSApp/src/Shared/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/test/CppTests/debuggees/MacOSApp/src/Shared/main.cpp b/test/CppTests/debuggees/MacOSApp/src/Shared/main.cpp new file mode 100644 index 000000000..15645d2dc --- /dev/null +++ b/test/CppTests/debuggees/MacOSApp/src/Shared/main.cpp @@ -0,0 +1,21 @@ +// +// main.cpp +// TestApp +// +// Created by Andrew Wang on 8/31/21. +// + +#include "main.hpp" + +int main(int argc, char **argv) +{ + int i = 0; + + printf("Hello from XCodeBuild\n"); + + i = i + 1; + + printf("Goodbye from XCodeBuild"); + + return 0; +} diff --git a/test/CppTests/debuggees/MacOSApp/src/Shared/main.hpp b/test/CppTests/debuggees/MacOSApp/src/Shared/main.hpp new file mode 100644 index 000000000..b2858af49 --- /dev/null +++ b/test/CppTests/debuggees/MacOSApp/src/Shared/main.hpp @@ -0,0 +1,13 @@ +// +// main.hpp +// TestApp +// +// Created by Andrew Wang on 8/31/21. +// + +#ifndef main_hpp +#define main_hpp + +#include + +#endif /* main_hpp */ diff --git a/test/CppTests/debuggees/MacOSApp/src/TestApp.xcodeproj/project.pbxproj b/test/CppTests/debuggees/MacOSApp/src/TestApp.xcodeproj/project.pbxproj new file mode 100644 index 000000000..96ca87f72 --- /dev/null +++ b/test/CppTests/debuggees/MacOSApp/src/TestApp.xcodeproj/project.pbxproj @@ -0,0 +1,313 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 90383F7326DF005800AECE94 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 90383F5D26DF005800AECE94 /* Assets.xcassets */; }; + 90383F7F26DF009800AECE94 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90383F7C26DF009800AECE94 /* main.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 90383F5D26DF005800AECE94 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 90383F6A26DF005800AECE94 /* TestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 90383F6C26DF005800AECE94 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 90383F6D26DF005800AECE94 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; }; + 90383F7C26DF009800AECE94 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; + 90383F7D26DF009800AECE94 /* main.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = main.hpp; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 90383F5526DF005600AECE94 = { + isa = PBXGroup; + children = ( + 90383F5A26DF005600AECE94 /* Shared */, + 90383F6B26DF005800AECE94 /* macOS */, + 90383F6326DF005800AECE94 /* Products */, + ); + sourceTree = ""; + }; + 90383F5A26DF005600AECE94 /* Shared */ = { + isa = PBXGroup; + children = ( + 90383F5D26DF005800AECE94 /* Assets.xcassets */, + 90383F7C26DF009800AECE94 /* main.cpp */, + 90383F7D26DF009800AECE94 /* main.hpp */, + ); + path = Shared; + sourceTree = ""; + }; + 90383F6326DF005800AECE94 /* Products */ = { + isa = PBXGroup; + children = ( + 90383F6A26DF005800AECE94 /* TestApp.app */, + ); + name = Products; + sourceTree = ""; + }; + 90383F6B26DF005800AECE94 /* macOS */ = { + isa = PBXGroup; + children = ( + 90383F6C26DF005800AECE94 /* Info.plist */, + 90383F6D26DF005800AECE94 /* macOS.entitlements */, + ); + path = macOS; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 90383F6926DF005800AECE94 /* TestApp (macOS) */ = { + isa = PBXNativeTarget; + buildConfigurationList = 90383F7926DF005800AECE94 /* Build configuration list for PBXNativeTarget "TestApp (macOS)" */; + buildPhases = ( + 90383F6626DF005800AECE94 /* Sources */, + 90383F6826DF005800AECE94 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "TestApp (macOS)"; + productName = "TestApp (macOS)"; + productReference = 90383F6A26DF005800AECE94 /* TestApp.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 90383F5626DF005600AECE94 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1250; + LastUpgradeCheck = 1250; + TargetAttributes = { + 90383F6926DF005800AECE94 = { + CreatedOnToolsVersion = 12.5.1; + }; + }; + }; + buildConfigurationList = 90383F5926DF005600AECE94 /* Build configuration list for PBXProject "TestApp" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 90383F5526DF005600AECE94; + productRefGroup = 90383F6326DF005800AECE94 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 90383F6926DF005800AECE94 /* TestApp (macOS) */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 90383F6826DF005800AECE94 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 90383F7326DF005800AECE94 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 90383F6626DF005800AECE94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 90383F7F26DF009800AECE94 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 90383F7426DF005800AECE94 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 90383F7526DF005800AECE94 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 90383F7A26DF005800AECE94 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = macOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 11.0; + PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.TestApp; + PRODUCT_NAME = TestApp; + SDKROOT = macosx; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 90383F7B26DF005800AECE94 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = macOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 11.0; + PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.TestApp; + PRODUCT_NAME = TestApp; + SDKROOT = macosx; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 90383F5926DF005600AECE94 /* Build configuration list for PBXProject "TestApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 90383F7426DF005800AECE94 /* Debug */, + 90383F7526DF005800AECE94 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 90383F7926DF005800AECE94 /* Build configuration list for PBXNativeTarget "TestApp (macOS)" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 90383F7A26DF005800AECE94 /* Debug */, + 90383F7B26DF005800AECE94 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 90383F5626DF005600AECE94 /* Project object */; +} diff --git a/test/CppTests/debuggees/MacOSApp/src/TestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/test/CppTests/debuggees/MacOSApp/src/TestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/test/CppTests/debuggees/MacOSApp/src/TestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/test/CppTests/debuggees/MacOSApp/src/TestApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/test/CppTests/debuggees/MacOSApp/src/TestApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/test/CppTests/debuggees/MacOSApp/src/TestApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/test/CppTests/debuggees/MacOSApp/src/macOS/Info.plist b/test/CppTests/debuggees/MacOSApp/src/macOS/Info.plist new file mode 100644 index 000000000..bacbc5688 --- /dev/null +++ b/test/CppTests/debuggees/MacOSApp/src/macOS/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + + diff --git a/test/CppTests/debuggees/MacOSApp/src/macOS/macOS.entitlements b/test/CppTests/debuggees/MacOSApp/src/macOS/macOS.entitlements new file mode 100644 index 000000000..f2ef3ae02 --- /dev/null +++ b/test/CppTests/debuggees/MacOSApp/src/macOS/macOS.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/test/DebuggerTesting/Attribution/TestSettingsHelper.cs b/test/DebuggerTesting/Attribution/TestSettingsHelper.cs index da3e6c322..7ca8db5c9 100644 --- a/test/DebuggerTesting/Attribution/TestSettingsHelper.cs +++ b/test/DebuggerTesting/Attribution/TestSettingsHelper.cs @@ -36,11 +36,25 @@ internal static IEnumerable FilterSettings(this IEnumerable supportedDebuggers = methodInfo.GetCustomAttributes().ToArray(); IReadOnlyCollection unsupportedDebuggers = methodInfo.GetCustomAttributes().ToArray(); + // Remove XCodeBuild from default list of SupportedCompilers since its special cased for .xcodeproj. + if (supportedCompilers.Count == 0) + { + supportedCompilers = new List() + { + new SupportedCompilerAttribute(SupportedCompiler.GPlusPlus, SupportedArchitecture.x86), + new SupportedCompilerAttribute(SupportedCompiler.GPlusPlus, SupportedArchitecture.x64), + new SupportedCompilerAttribute(SupportedCompiler.ClangPlusPlus, SupportedArchitecture.x86), + new SupportedCompilerAttribute(SupportedCompiler.ClangPlusPlus, SupportedArchitecture.x64), + new SupportedCompilerAttribute(SupportedCompiler.VisualCPlusPlus, SupportedArchitecture.x86), + new SupportedCompilerAttribute(SupportedCompiler.VisualCPlusPlus, SupportedArchitecture.x64) + }; + } + // Get the subset of test settings that match the requirements of the test. // The test will be run for each test setting in the set. If an empty set is returned, // the test is not run. return settings.Where(s => - (supportedCompilers.Count == 0 || supportedCompilers.Matches(s.CompilerSettings)) && + supportedCompilers.Matches(s.CompilerSettings) && (supportedDebuggers.Count == 0 || supportedDebuggers.Matches(s.DebuggerSettings)) && !unsupportedDebuggers.Matches(s.DebuggerSettings)) .Select(x => TestSettings.CloneWithName(x, methodInfo.Name)) diff --git a/test/DebuggerTesting/Compilation/CompilerBase.cs b/test/DebuggerTesting/Compilation/CompilerBase.cs index 89f023a39..4646a4788 100644 --- a/test/DebuggerTesting/Compilation/CompilerBase.cs +++ b/test/DebuggerTesting/Compilation/CompilerBase.cs @@ -53,7 +53,15 @@ public void Compile( Assert.True(result, "The compilation failed."); // If the output file was not created, then error - Assert.True(File.Exists(targetFilePath), "The compiler did not create the expected output. " + targetFilePath); + if (outputType == CompilerOutputType.MacOSApp) + { + // .app on macOS is a special folder + Assert.True(Directory.Exists(targetFilePath), "The compiler did not create the expected output. " + targetFilePath); + } + else + { + Assert.True(File.Exists(targetFilePath), "The compiler did not create the expected output. " + targetFilePath); + } } #endregion diff --git a/test/DebuggerTesting/Compilation/CompilerOutputType.cs b/test/DebuggerTesting/Compilation/CompilerOutputType.cs index 9099503e4..79d6a44d3 100644 --- a/test/DebuggerTesting/Compilation/CompilerOutputType.cs +++ b/test/DebuggerTesting/Compilation/CompilerOutputType.cs @@ -8,6 +8,7 @@ public enum CompilerOutputType Unspecified = 0, ObjectFile, SharedLibrary, - Executable + Executable, + MacOSApp } } diff --git a/test/DebuggerTesting/Compilation/Debuggee.cs b/test/DebuggerTesting/Compilation/Debuggee.cs index 3d652a40c..676527dc4 100644 --- a/test/DebuggerTesting/Compilation/Debuggee.cs +++ b/test/DebuggerTesting/Compilation/Debuggee.cs @@ -170,6 +170,8 @@ private static CompilerBase CreateCompiler(ILoggingComponent logger, ICompilerSe return new ClangCompiler(logger, settings); case SupportedCompiler.VisualCPlusPlus: return new VisualCPlusPlusCompiler(logger, settings); + case SupportedCompiler.XCodeBuild: + return new XCodeCompiler(logger, settings); default: throw new ArgumentOutOfRangeException(nameof(settings.CompilerType), "Unhandled compiler toolset: " + settings.CompilerType); } @@ -209,6 +211,8 @@ private static string UpdateOutputName(string outputName, CompilerOutputType out return Path.ChangeExtension(outputName, "dll"); else return Path.ChangeExtension(outputName, "so"); + case CompilerOutputType.MacOSApp: + return Path.ChangeExtension(outputName, "app"); default: throw new NotSupportedException("Support for output type '{0}' has not been implemented.".FormatInvariantWithArgs(outputType)); } diff --git a/test/DebuggerTesting/Compilation/XCodeRunCompiler.cs b/test/DebuggerTesting/Compilation/XCodeRunCompiler.cs new file mode 100644 index 000000000..1ca7c7557 --- /dev/null +++ b/test/DebuggerTesting/Compilation/XCodeRunCompiler.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.IO; +using System.Collections.Generic; +using DebuggerTesting.Utilities; + +namespace DebuggerTesting.Compilation +{ + internal sealed class XCodeCompiler : + CompilerBase + { + #region Constructor + + public XCodeCompiler(ILoggingComponent logger, ICompilerSettings settings) + : base(logger, settings, false) + { + } + + #endregion + + #region Methods + + protected override bool CompileCore( + CompilerOutputType outputType, + SupportedArchitecture architecture, + IEnumerable libraries, + IEnumerable sourceFilePaths, + string targetFilePath, + CompilerOption options, + IDictionary defineConstants) + { + if (outputType != CompilerOutputType.MacOSApp) + { + throw new InvalidOperationException("Output type is: " + outputType); + } + + //xcodebuild -project TestApp.xcodeproj -configuration Debug -scheme "TestApp (macOS)" CONFIGURATION_BUILD_DIR="./out/xcoderun/x64/" + + string project = string.Empty; + foreach (string sourceFile in sourceFilePaths) + { + if (sourceFile.EndsWith(".xcodeproj")) + { + project = sourceFile; + } + } + + if (string.IsNullOrWhiteSpace(project)) + { + throw new InvalidOperationException(".xcodeproj is missing"); + } + + ArgumentBuilder builder = new ArgumentBuilder("-", " "); + builder.AppendNamedArgument("project", project); + builder.AppendNamedArgument("configuration", "Debug"); + builder.AppendNamedArgumentQuoted("scheme", "TestApp (macOS)"); + + return 0 == this.RunCompiler(builder.ToString() + " CONFIGURATION_BUILD_DIR=\"" + Path.GetDirectoryName(targetFilePath) + "\"", targetFilePath); + } + + #endregion + } +} diff --git a/test/DebuggerTesting/SupportedCompiler.cs b/test/DebuggerTesting/SupportedCompiler.cs index dcd4048b7..4563ce165 100644 --- a/test/DebuggerTesting/SupportedCompiler.cs +++ b/test/DebuggerTesting/SupportedCompiler.cs @@ -11,5 +11,6 @@ public enum SupportedCompiler ClangPlusPlus = 0x1, GPlusPlus = 0x2, VisualCPlusPlus = 0x4, + XCodeBuild = 0x8 } } \ No newline at end of file