summaryrefslogtreecommitdiff
path: root/.pytool/CISettings.py
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2020-01-22 10:17:23 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-02-07 19:18:53 +0000
commit61364ab9277456bd9e57236a5286368394d6c024 (patch)
treee53811b571e70d9df325820e5cbc9456dbf905da /.pytool/CISettings.py
parentbd33a385eec746e33ff3e8a628193913d52861ef (diff)
downloadedk2-61364ab9277456bd9e57236a5286368394d6c024.zip
edk2-61364ab9277456bd9e57236a5286368394d6c024.tar.gz
edk2-61364ab9277456bd9e57236a5286368394d6c024.tar.bz2
.pytool: Add CI support for host based unit tests with results
https://bugzilla.tianocore.org/show_bug.cgi?id=2505 * Add plugin to build and run host based unit tests * Add plugin that performs a DSC complete check DSC files used to build host based tests * Update DscCompleteCheck plugin to ignore module INFs with a MODULE_TYPE of HOST_APPLICATION and library INFs that only support a module type of HOST_APPLICATION. * Fix issues in XML reports from checkers. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bret Barkelew <Bret.Barkelew@microsoft.com>
Diffstat (limited to '.pytool/CISettings.py')
-rw-r--r--.pytool/CISettings.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py
index ce17793..79593d9 100644
--- a/.pytool/CISettings.py
+++ b/.pytool/CISettings.py
@@ -48,7 +48,8 @@ class Settings(CiBuildSettingsManager, UpdateSettingsManager, SetupSettingsManag
"FmpDevicePkg",
"ShellPkg",
"FatPkg",
- "CryptoPkg"
+ "CryptoPkg",
+ "UnitTestFrameworkPkg"
)
def GetArchitecturesSupported(self):
@@ -117,10 +118,13 @@ class Settings(CiBuildSettingsManager, UpdateSettingsManager, SetupSettingsManag
def GetActiveScopes(self):
''' return tuple containing scopes that should be active for this process '''
- scopes = ("cibuild","edk2-build")
+ scopes = ("cibuild", "edk2-build", "host-based-test")
self.ActualToolChainTag = shell_environment.GetBuildVars().GetValue("TOOL_CHAIN_TAG", "")
+ if GetHostInfo().os.upper() == "WINDOWS":
+ scopes += ('host-test-win',)
+
if GetHostInfo().os.upper() == "LINUX" and self.ActualToolChainTag.upper().startswith("GCC"):
if "AARCH64" in self.ActualArchitectures:
scopes += ("gcc_aarch64_linux",)
@@ -133,18 +137,21 @@ class Settings(CiBuildSettingsManager, UpdateSettingsManager, SetupSettingsManag
''' return iterable containing RequiredSubmodule objects.
If no RequiredSubmodules return an empty iterable
'''
- rs=[]
+ rs = []
rs.append(RequiredSubmodule(
"ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3", False))
rs.append(RequiredSubmodule(
"CryptoPkg/Library/OpensslLib/openssl", False))
+ rs.append(RequiredSubmodule(
+ "UnitTestFrameworkPkg/Library/CmockaLib/cmocka", False))
return rs
def GetName(self):
return "Edk2"
def GetDependencies(self):
- return []
+ return [
+ ]
def GetPackagesPath(self):
return ()
@@ -155,10 +162,11 @@ class Settings(CiBuildSettingsManager, UpdateSettingsManager, SetupSettingsManag
def FilterPackagesToTest(self, changedFilesList: list, potentialPackagesList: list) -> list:
''' Filter potential packages to test based on changed files. '''
- build_these_packages=[]
- possible_packages=potentialPackagesList.copy()
+ build_these_packages = []
+ possible_packages = potentialPackagesList.copy()
for f in changedFilesList:
- nodes=f.split("/") # split each part of path for comparison later
+ # split each part of path for comparison later
+ nodes = f.split("/")
# python file change in .pytool folder causes building all
if f.endswith(".py") and ".pytool" in nodes: