REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4683 Add sample unit tests that always fail or generate unexpected exceptions along with a new DSC file to build the unit tests that always fail or generate unexpected exceptions. This can be used to verify the log information on failures is accurate and provides the correct information to determine the source of the unit test failure. Divide by zero is used to generate unexpected exceptions. The compiler warnings for divide by zero are disables for the unit tests that generate divide by zero exceptions on purpose. These tests are not added to CI because CI would always fail. The UnitTestFrameworkPkg.ci.yaml file is updated to ignore the INF files for host-based testing that always fail. Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
37 lines
966 B
INI
37 lines
966 B
INI
## @file
|
|
# This is a sample to demonstrates the use of GoogleTest that supports host
|
|
# execution environments for test case that are always expected to fail to
|
|
# demonstrate the format of the log file and reports when failures occur.
|
|
#
|
|
# Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = SampleGoogleTestHostExpectFail
|
|
FILE_GUID = 6042ADD2-E024-4FD5-8CD7-B2A146BF88D7
|
|
MODULE_TYPE = HOST_APPLICATION
|
|
VERSION_STRING = 1.0
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64
|
|
#
|
|
|
|
[Sources]
|
|
SampleGoogleTestExpectFail.cpp
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
|
|
|
|
[LibraryClasses]
|
|
GoogleTestLib
|
|
BaseLib
|
|
DebugLib
|
|
|
|
[Pcd]
|
|
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask
|