Commit a2c2c8fc authored by Ben Cooksley's avatar Ben Cooksley

Enable check-abi for SuseQt5.X builds.

Also fix some typos, correct logic and ensure the correct library is selected (taking into account branchGroup and platform)

Differential Revision: https://phabricator.kde.org/D17099
parent a5ad4040
......@@ -21,7 +21,7 @@ from helperslib.Version import Version
class Library:
def __init__(self, packageName, library):
self.packgeName = packageName
self.packageName = packageName
self.library = library
self.candidates = []
......@@ -50,7 +50,7 @@ class Library:
logging.warning("No released version was found, just use the oldest commit.")
# the candidate needs to be older than the current build.
if timestamp > candidate['timestamp']:
if timestamp < candidate['timestamp']:
return None
return candidate
......@@ -97,6 +97,10 @@ libraries = []
for key, entry in ourArchive.serverManifest.items():
try:
if entry['platform'] != arguments.platform:
continue
if entry["branchGroup"] != arguments.branchGroup:
continue
if entry["project"] == arguments.project and entry["scmRevision"] == scmRevision:
libraries.append(Library(key,entry))
except KeyError:
......@@ -123,7 +127,7 @@ for l in libraries:
# Ignore new SONAMEs on other branchGroups.
if keepBuildGroup and entry["branchGroup"] != arguments.branchGroup:
continue
logging.warning("We searched for SONAME = {}, but found a newer SONAME = {} in the builds, that should not happen, as SONAMEs should only rise and never go lower!".format(soname, entry['SONAME']))
logging.warning("We searched for SONAME = %s, but found a newer SONAME = %s in the builds, that should not happen, as SONAMEs should only rise and never go lower!", soname, entry['SONAME'])
# Check every libraries ABI and do not fail, if one is not fine.
# Safe the overall retval state
......@@ -134,14 +138,14 @@ for l in libraries:
libname = library['libname']
candidate = l.candidate()
if not candidate:
logging.info("Did not found any older build for {}, nothing to check ABI against.",libname)
logging.info("Did not found any older build for %s, nothing to check ABI against.",libname)
continue
# get the packages, we want to test against each other
newLibraryPath, _ = ourArchive.retrievePackage(l.packageName)
oldLibraryPath, _ = ourArchive.retrievePackage(candidate['packageName'])
logging.info("Let's do a ABI check {} against {}", library['scmRevision'], candidate['scmRevision'])
logging.info("Let's do a ABI check %s against %s", library['scmRevision'], candidate['scmRevision'])
# check ABI and write compat reports
cmd = ["abi-compliance-checker",
......@@ -152,7 +156,7 @@ for l in libraries:
ret = subprocess.call(cmd)
if ret != 0:
logging.error("abi-compliance-checker exited with {ret}", ret=ret)
logging.error("abi-compliance-checker exited with %s", ret)
retval = ret
# We had an issue with one of the ABIs
......
......@@ -123,6 +123,14 @@ timestamps {
python3 -u ci-tooling/helpers/create-abi-dump.py --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --buildLog currentBuildLog.txt --environment production --usingInstall '$HOME/install-prefix/' || true
"""
// Now perform the ABI Compatibility checks
// This tool will produce reports stored at compat_reports/ which we will also need to capture
sh """
python3 -u ci-tooling/helpers/check-abi.py --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --environment production || true
"""
// Save the ABI Compatibility reports for developers to review if necessary
archiveArtifacts artifacts: 'compat_reports/*_compat_reports.html', onlyIfSuccessful: false
// Platform Enablement Checks
// Frameworks have a metadata file which specifies the platforms it supports and should be built on
// This check compares that metadata file against the records held by the CI system
......
......@@ -123,6 +123,14 @@ timestamps {
python3 -u ci-tooling/helpers/create-abi-dump.py --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --buildLog currentBuildLog.txt --environment production --usingInstall '$HOME/install-prefix/' || true
"""
// Now perform the ABI Compatibility checks
// This tool will produce reports stored at compat_reports/ which we will also need to capture
sh """
python3 -u ci-tooling/helpers/check-abi.py --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --environment production || true
"""
// Save the ABI Compatibility reports for developers to review if necessary
archiveArtifacts artifacts: 'compat_reports/*_compat_reports.html', onlyIfSuccessful: false
// cppcheck is not supported by Pipeline at the moment, so we don't run that for now
// See https://issues.jenkins-ci.org/browse/JENKINS-35096
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment