Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for unit test #3651

Closed
wants to merge 5 commits into from
Closed

Test for unit test #3651

wants to merge 5 commits into from

Conversation

td36
Copy link
Contributor

@td36 td36 commented Nov 20, 2022

No description provided.

@td36 td36 force-pushed the test_for_UnitTest branch 12 times, most recently from e759e69 to 3f13820 Compare November 22, 2022 11:42
Add a new shell UnitTest module for DxeCpuExceptionHandlerLib.

Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Expand Ovmf PlatformBuild.py and PlatformBuildLib.py to support
building and running specific Shell target UnitTest modules.
In the new CommonPlatform class:
It provides new class attributes and new methods to support
build and run specific Shell Unit Test modules.

In the new SettingsManager class for stuart_pr_eval:
It calls new API in CommonPlatform to updates PackagesSupported
based on -u ShellUnitTestList input from cmd. The package which
contains the module in ShellUnitTestList will be added into
PackagesSupported for further evaluation.

In the new PlatformBuilder class for stuart_build:
1.In PlatformPostBuild(), it conditionally calls new API in
CommonPlatform to build -u ShellUnitTestList in -p PkgsToBuild
and copy them to VirtualDrive folder. If no -p option, all the
modules in -u ShellUnitTestList will be built.
2.In FlashRomImage(), it conditionally calls the new API in
CommonPlatform to write all efi files name in VirtualDrive into
startup.nsh and output UnitTest log into ShellUnitTestLog.
3. After the boot process, it conditionally calls new API in
CommonPlatform to check the UnitTest boot log.

Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Ray Ni <ray.ni@intel.com>
Add new job like OVMF_X64_DEBUG_UNIT_TEST in OvmfPkg PlatformCI
.yml file. New parameter unit_test_list is used to specify Shell
Unit Test list which needs to build and run. Format for this
input should be:'-u ModulePath1:DscPath1,ModulePath2:DscPath2'
or '-u ModulePath1:DscPath1 -u ModulePath2:DscPath2'.
(Path is edk2 workspace relative)

Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Ray Ni <ray.ni@intel.com>
Expand PlatformCI build and run steps template for Shell
UnitTest. Add a new parameter unit_test_list to support
building and running specific Shell UnitTest modules.

In stuart_pr_eval step, if the unit_test_list passed from
platform yml file is not null, it will select some packages
from the packages which contain the module in unit_test_list
and set them into a new variable pkgs_to_build base on its
evaluation rule.
In stuart_build step, if unit_test_list is not null,
'${{ parameters.unit_test_list}} -p $(pkgs_to_build)' will be
added into the arguments to build specific UnitTest modules in
pkgs_to_build.
In 'Run to shell' step, if unit_test_list is not null, all the
UnitTest modules built in stuart_build step will runs in shell.

Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Dun Tan <dun.tan@intel.com>
Signed-off-by: Dun Tan <dun.tan@intel.com>
@td36
Copy link
Contributor Author

td36 commented Dec 6, 2022

The first patch is only for PR test. It added a unit_test_list in the new 'Platform_CI OVMF_X64_DEBUG_UNIT_TEST' JOB to trigger the CI test and deleted some JOB to accelarate the CI process.

@lersek lersek closed this Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants