Ci build plugin
ci_build_plugin ¶
Plugin that supports adding tests or operations to the ci environment.
ICiBuildPlugin ¶
Plugin that supports adding tests or operations to the ci environment.
RunBuildPlugin ¶
RunBuildPlugin(
packagename: str,
Edk2pathObj: Edk2Path,
pkgconfig: dict,
environment: VarDict,
PLM: PluginManager,
PLMHelper: HelperFunctions,
tc: JunitReportTestCase,
output_stream: TextIO,
) -> int
External function of plugin.
This function is used to perform the task of the CiBuild Plugin
Parameters:
Name | Type | Description | Default |
---|---|---|---|
packagename |
str
|
edk2 path to package (workspace/package path relative) |
required |
Edk2pathObj |
Edk2Path
|
Edk2Path configured with workspace and package path |
required |
pkgconfig |
dict
|
Package config |
required |
environment |
VarDict
|
Environment config |
required |
PLM |
PluginManager
|
Plugin manager instance |
required |
PLMHelper |
HelperFunctions
|
Plugin helper object instace |
required |
tc |
obj
|
test case that needs state configured for reporting by plugin |
required |
output_stream |
StringIO
|
output stream from this plugin via logging |
required |
Returns:
Type | Description |
---|---|
int
|
|
int
|
0 - passed successfully |
int
|
-1 - skipped for missing prereq |
GetTestName ¶
GetTestName(
packagename: str, environment: object
) -> tuple[str, str]
Provides the test case and class name.
Given the package name and configuration provide the caller the name of the test case and the class name. These are both used in logging and reporting test status.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
packagename |
str
|
Package Name |
required |
environment |
EnvDict
|
Environment Dictionary configuration |
required |
Returns:
Type | Description |
---|---|
Tuple[str, str]
|
(test case name, test case base class name) |
RunsOnTargetList ¶
RunsOnTargetList() -> list[str]
Returns a list of edk2 TARGETs that this plugin would like to run on.
Known target values
DEBUG, RELEASE, NOOPT, NO-TARGET
Hint
If the plugin is not Target specific it should return a list of one element of "NO-TARGET"
WalkDirectoryForExtension ¶
WalkDirectoryForExtension(
extensionlist: list[str],
directory: os.PathLike,
ignorelist: list[str] = None,
) -> list[os.PathLike]
Walks a file directory recursively for all items ending in certain extension.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
extensionlist |
List[str]
|
list of file extensions |
required |
directory |
PathLike
|
absolute path to directory to start looking |
required |
ignorelist |
List[str]
|
a list of case insensitive filenames to ignore (Optional) |
None
|
Returns:
Type | Description |
---|---|
List
|
file paths to matching files |