File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/LibObjectFile.Tests/PE Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 66using System . Collections . Generic ;
77using System . Diagnostics ;
88using System . IO ;
9+ using System . Runtime . InteropServices ;
910using System . Threading . Tasks ;
1011using LibObjectFile . Diagnostics ;
1112using LibObjectFile . PE ;
@@ -152,10 +153,14 @@ public void TestCreatePE()
152153 var sourceFile = Path . Combine ( AppContext . BaseDirectory , "PE" , "RawNativeConsoleWin64_Generated.exe" ) ;
153154 File . WriteAllBytes ( sourceFile , output . ToArray ( ) ) ;
154155
155- // Check the generated exe
156- var process = Process . Start ( sourceFile ) ;
157- process . WaitForExit ( ) ;
158- Assert . AreEqual ( 156 , process . ExitCode ) ;
156+ // Only try to run the generated exe on Windows x64
157+ if ( OperatingSystem . IsWindows ( ) && RuntimeInformation . OSArchitecture == Architecture . X64 )
158+ {
159+ // Check the generated exe
160+ var process = Process . Start ( sourceFile ) ;
161+ process . WaitForExit ( ) ;
162+ Assert . AreEqual ( 156 , process . ExitCode ) ;
163+ }
159164 }
160165
161166 [ DataTestMethod ]
You can’t perform that action at this time.
0 commit comments