@@ -98,45 +98,48 @@ public void VerifyPackageContentsHasRuntimeSupport()
98
98
var packageFiles = Directory . GetFiles ( packageDir , "*.nupkg" , SearchOption . AllDirectories ) ;
99
99
Assert . True ( packageFiles . Length > 0 , $ "No .nupkg files found in { packageDir } ") ;
100
100
101
- // Rest of the verification code remains the same...
102
101
string packagePath = packageFiles [ 0 ] ;
103
102
_output . WriteLine ( $ "Found package: { packagePath } ") ;
104
103
105
104
using ( var archive = ZipFile . OpenRead ( packagePath ) )
106
105
{
107
- var missingFiles = new List < string > ( ) ;
108
-
106
+ // Verify each framework has its required files
109
107
foreach ( var framework in ExpectedFrameworks )
110
108
{
111
- var expectedPath = $ "content/{ framework } /Amazon.Lambda.RuntimeSupport.dll";
112
- var entry = archive . GetEntry ( expectedPath ) ;
109
+ _output . WriteLine ( $ "\n Checking framework: { framework } ") ;
110
+
111
+ // Get all files for this framework
112
+ var frameworkFiles = archive . Entries
113
+ . Where ( e => e . FullName . StartsWith ( $ "content/{ framework } /") )
114
+ . Select ( e => e . FullName )
115
+ . ToList ( ) ;
113
116
114
- if ( entry == null )
117
+ // Verify essential files exist
118
+ var essentialFiles = new [ ]
115
119
{
116
- missingFiles . Add ( expectedPath ) ;
117
- }
118
- }
120
+ $ "content/{ framework } /Amazon.Lambda.RuntimeSupport.dll",
121
+ $ "content/{ framework } /Amazon.Lambda.RuntimeSupport.deps.json",
122
+ $ "content/{ framework } /bootstrap.sh",
123
+ $ "content/{ framework } /bootstrap-al2023.sh"
124
+ } ;
119
125
120
- if ( missingFiles . Any ( ) )
121
- {
122
- Assert . Fail ( $ "The following RuntimeSupport DLLs are missing from the package:\n " +
123
- string . Join ( "\n " , missingFiles ) ) ;
124
- }
126
+ var missingFiles = essentialFiles . Where ( f => ! frameworkFiles . Contains ( f ) ) . ToList ( ) ;
125
127
126
- var actualFrameworkDlls = archive . Entries
127
- . Where ( e => e . FullName . Contains ( "Amazon.Lambda.RuntimeSupport.dll" ) )
128
- . Select ( e => e . FullName )
129
- . ToList ( ) ;
128
+ if ( missingFiles . Any ( ) )
129
+ {
130
+ Assert . Fail ( $ "The following essential files are missing for { framework } :\n " +
131
+ string . Join ( "\n " , missingFiles ) ) ;
132
+ }
130
133
131
- _output . WriteLine ( "\n Found DLLs in package:" ) ;
132
- foreach ( var dll in actualFrameworkDlls )
133
- {
134
- _output . WriteLine ( dll ) ;
134
+ _output . WriteLine ( $ "Files found for { framework } :") ;
135
+ foreach ( var file in frameworkFiles )
136
+ {
137
+ _output . WriteLine ( $ " { file } ") ;
138
+ }
135
139
}
136
140
}
137
141
}
138
142
139
-
140
143
private string FindSolutionRoot ( )
141
144
{
142
145
string currentDirectory = Directory . GetCurrentDirectory ( ) ;
0 commit comments