]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg: Add DxeResetSystemLib unit test
authorMichael D Kinney <michael.d.kinney@intel.com>
Wed, 22 Jan 2020 18:16:14 +0000 (10:16 -0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 7 Feb 2020 19:18:53 +0000 (19:18 +0000)
commit184ee9b1de4ecd1ea4aa479dc66840a14f50ccb2
treed65906240000fe42636eaf140e14b78fdec01685
parente50c2bb38398553b184cee7d96d676a12b4c064b
MdeModulePkg: Add DxeResetSystemLib unit test

https://bugzilla.tianocore.org/show_bug.cgi?id=2505

* Add unit test of DxeResetSystemLib library
  instance that uses cmocka interfaces to mock the
  UEFI Runtime Services Table and its ResetSystem()
  service.  When a unit test uses the cmocka
  interfaces, the unit test does not support being
  run from target environments.

  cmocka APIs: https://api.cmocka.org/index.html

  This example puts the unit test in a UnitTest
  directory below the library INF file and this location
  means the unit test is only designed to work this
  this one library instance.

* Add Test/MdeModulePkgHostTest.dsc to build host
  based unit tests

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Bret Barkelew <Bret.Barkelew@microsoft.com>
MdeModulePkg/Library/DxeResetSystemLib/UnitTest/DxeResetSystemLibUnitTest.c [new file with mode: 0644]
MdeModulePkg/Library/DxeResetSystemLib/UnitTest/DxeResetSystemLibUnitTestHost.inf [new file with mode: 0644]
MdeModulePkg/Library/DxeResetSystemLib/UnitTest/MockUefiRuntimeServicesTableLib.c [new file with mode: 0644]
MdeModulePkg/Library/DxeResetSystemLib/UnitTest/MockUefiRuntimeServicesTableLib.inf [new file with mode: 0644]
MdeModulePkg/MdeModulePkg.ci.yaml
MdeModulePkg/Test/MdeModulePkgHostTest.dsc [new file with mode: 0644]