summaryrefslogtreecommitdiffstats
path: root/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2024-02-02 17:17:17 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-02-14 02:37:16 +0000
commita1c426e8440b55ee12d92cefa7114fd6f7b599cb (patch)
tree613059ac43077532ae712fa9c5bb7c67a2c6818e /UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc
parent0a989069df1f00f9ca1b6968c91c5c9bc01a0198 (diff)
downloadedk2-a1c426e8440b55ee12d92cefa7114fd6f7b599cb.tar.gz
UnitTestFrameworkPkg: Add DSC and host tests that always fail
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>
Diffstat (limited to 'UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc')
-rw-r--r--UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc26
1 files changed, 26 insertions, 0 deletions
diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc
index 872d9c0d8c..75be90a55f 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc
@@ -41,3 +41,29 @@
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTest/SampleUnitTestPei.inf
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTest/SampleUnitTestSmm.inf
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTest/SampleUnitTestUefiShell.inf
+
+ UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestExpectFail/SampleUnitTestDxeExpectFail.inf
+ UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestExpectFail/SampleUnitTestPeiExpectFail.inf
+ UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestExpectFail/SampleUnitTestSmmExpectFail.inf
+ UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestExpectFail/SampleUnitTestUefiShellExpectFail.inf
+
+ #
+ # Disable warning for divide by zero to pass build of unit tests
+ # that generate a divide by zero exception.
+ #
+ UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestGenerateException/SampleUnitTestDxeGenerateException.inf {
+ <BuildOptions>
+ MSFT:*_*_*_CC_FLAGS = /wd4723
+ }
+ UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestGenerateException/SampleUnitTestPeiGenerateException.inf {
+ <BuildOptions>
+ MSFT:*_*_*_CC_FLAGS = /wd4723
+ }
+ UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestGenerateException/SampleUnitTestSmmGenerateException.inf {
+ <BuildOptions>
+ MSFT:*_*_*_CC_FLAGS = /wd4723
+ }
+ UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestGenerateException/SampleUnitTestUefiShellGenerateException.inf {
+ <BuildOptions>
+ MSFT:*_*_*_CC_FLAGS = /wd4723
+ }