Skip to content

Commit c1a6ff0

Browse files
authored
Fix file_regex for QEMU SBSA (#1389)
## Description The file regex recently changed for SBSA caused the test apps not running due to the target folder being wrong. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? ## How This Was Tested This was tested on QEMU SBSA and fixed the test app not running issue. ## Integration Instructions N/A
1 parent 7e69b81 commit c1a6ff0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Platforms/QemuQ35Pkg/PlatformBuild.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ def FlashRomImage(self):
394394
empty_drive = (self.env.GetValue("EMPTY_DRIVE").upper() == "TRUE")
395395
file_regex = self.env.GetValue("FILE_REGEX")
396396
startup_nsh = self.env.GetValue("STARTUP_NSH")
397+
target_arch = self.env.GetValue("TARGET_ARCH", "X64")
397398

398399
# Other configurable values
399400
output_base = self.env.GetValue("BUILD_OUTPUT_BASE")
@@ -425,7 +426,7 @@ def FlashRomImage(self):
425426
file_list = []
426427
if file_regex:
427428
for pattern in file_regex.split(","):
428-
file_list.extend(Path(output_base, "X64").glob(pattern))
429+
file_list.extend(Path(output_base, target_arch).glob(pattern))
429430

430431
# If running tests, add the files and auto-generate a startup nsh
431432
if run_tests:

Platforms/QemuSbsaPkg/PlatformBuild.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,7 @@ def FlashRomImage(self):
956956
empty_drive = (self.env.GetValue("EMPTY_DRIVE").upper() == "TRUE")
957957
file_regex = self.env.GetValue("FILE_REGEX")
958958
startup_nsh = self.env.GetValue("STARTUP_NSH")
959+
target_arch = self.env.GetValue("TARGET_ARCH", "AARCH64")
959960

960961
# Other configurable values
961962
output_base = self.env.GetValue("BUILD_OUTPUT_BASE")
@@ -987,7 +988,7 @@ def FlashRomImage(self):
987988
file_list = []
988989
if file_regex:
989990
for pattern in file_regex.split(","):
990-
file_list.extend(Path(output_base, "X64").glob(pattern))
991+
file_list.extend(Path(output_base, target_arch).glob(pattern))
991992

992993
# If running tests, add the files and auto-generate a startup nsh
993994
if run_tests:

0 commit comments

Comments
 (0)