diff options
| author | Bosco Chen (AMI US Holdings Inc) <v-chenbosco@microsoft.com> | 2026-10-16 05:53:25 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-10-21 03:41:20 +0300 |
| commit | 85854ac470a7e089758aee6fe0095c2c1881af29 (patch) | |
| tree | 6825e862eefb0f8ef7f9e7c2a605ee211e81bc8e | |
| parent | a34a0ef95496fe4d192b490bc40c734194ebf4c6 (diff) | |
| download | edk2-master.tar.xz | |
The host unit test runner returns success when an architecture has no
test executables. This skips later architectures and can hide earlier
test or coverage failures.
Continue to the next architecture instead and include the architecture
in the warning. Preserve the accumulated failure count.
Signed-off-by: Bosco Chen (AMI US Holdings Inc) <v-chenbosco@microsoft.com>
| -rw-r--r-- | BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py b/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py index 423910004c..ed8e98e526 100644 --- a/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py +++ b/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py @@ -98,16 +98,17 @@ class HostBasedUnitTestRunner(IUefiBuildPlugin): raise NotImplementedError("Unsupported Operating System")
if not testList:
- logging.warning(dedent("""
- UnitTest Coverage:
- No unit tests discovered. Test coverage will not be generated.
+ logging.warning(dedent(f"""
+ UnitTest Coverage ({arch}):
+ No unit tests discovered for this architecture.
+ Skipping it; coverage will not be generated for this architecture.
Prevent this message by:
1. Adding host-based unit tests to this package
2. Ensuring tests have the word "Test" in their name
3. Disabling HostUnitTestCompilerPlugin in the package CI YAML file
""").strip())
- return 0
+ continue
for test in testList:
# Configure output name if test uses cmocka.
|
