Commit 4fc1a6ff authored by Sandro Knauß's avatar Sandro Knauß Committed by Ben Cooksley

Provide more debugging output for abi-compatibility-checker infrastructure.

Differential Revision: https://phabricator.kde.org/D19219
parent f1eba452
Pipeline #1106 skipped with stage
...@@ -16,7 +16,7 @@ from helperslib import CommonUtils, ToolingSettings ...@@ -16,7 +16,7 @@ from helperslib import CommonUtils, ToolingSettings
from helperslib import Packages, EnvironmentHandler from helperslib import Packages, EnvironmentHandler
# Make sure logging is ready to go # Make sure logging is ready to go
#logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
ACCXMLTMPL = """<version>{version}</version> ACCXMLTMPL = """<version>{version}</version>
<headers> <headers>
...@@ -271,11 +271,13 @@ class Library: ...@@ -271,11 +271,13 @@ class Library:
# Write the generated XML out to a file to pass to abi-compliance-checker # Write the generated XML out to a file to pass to abi-compliance-checker
# We will give this to abi-compliance-checker using it's --dump parameter # We will give this to abi-compliance-checker using it's --dump parameter
with open("{version}.xml".format(version=version),"w") as f: # replace with f-String in python 3.6 with open("acc/{libname}-{version}.xml".format(libname=self.name, version=version),"w") as f: # replace with f-String in python 3.6
f.write(xml) f.write(xml)
# acc is compatible for C/C++ (but --lang C++ doesn't remove the warning about C++ only settings). # acc is compatible for C/C++ (but --lang C++ doesn't remove the warning about C++ only settings).
subprocess.check_call(["abi-compliance-checker", "--lang", "C++", "-l", self.name, "--dump", f.name], env=runtimeEnvironment) cmd = ["abi-compliance-checker", "--lang", "C++", "-l", self.name, "--dump", f.name]
logging.debug(" ".join(cmd))
subprocess.check_call(cmd, env=runtimeEnvironment)
# Parse the command line arguments we've been given # Parse the command line arguments we've been given
parser = argparse.ArgumentParser(description='Utility to create abi checker tarballs.') parser = argparse.ArgumentParser(description='Utility to create abi checker tarballs.')
...@@ -323,12 +325,19 @@ if os.getenv('GIT_COMMIT') != '': ...@@ -323,12 +325,19 @@ if os.getenv('GIT_COMMIT') != '':
if not scmRevision: if not scmRevision:
scmRevision = subprocess.check_output(["git", "log", "--format=%H", "-n 1", "HEAD"]).strip().decode() scmRevision = subprocess.check_output(["git", "log", "--format=%H", "-n 1", "HEAD"]).strip().decode()
# Create diretory for string acc input xml
try:
os.mkdir("acc")
except FileExistsError:
pass
# Check every libraries ABI and do not fail, if one is not fine. # Check every libraries ABI and do not fail, if one is not fine.
# Safe the overall retval state # Safe the overall retval state
retval = 0 retval = 0
# Now we generate the ABI dumps for every library we have found # Now we generate the ABI dumps for every library we have found
for library in foundLibraries: for library in foundLibraries:
logging.info("Start building ABI dump for {name}".format(name=library.name))
try: try:
#run CMake for library #run CMake for library
library.runCMake( runtimeEnvironment=buildEnvironment ) library.runCMake( runtimeEnvironment=buildEnvironment )
......
...@@ -125,7 +125,8 @@ timestamps { ...@@ -125,7 +125,8 @@ timestamps {
// Save the ABI build logs to review if necessary // Save the ABI build logs to review if necessary
archiveArtifacts artifacts: 'logs/*/*/log.txt', onlyIfSuccessful: false, allowEmptyArchive: true archiveArtifacts artifacts: 'logs/*/*/log.txt', onlyIfSuccessful: false, allowEmptyArchive: true
// Save the input for ACC for building abi dumps locally
archiveArtifacts artifacts: 'acc/*.xml', onlyIfSuccessful: false, allowEmptyArchive: true
// Now perform the ABI Compatibility checks // Now perform the ABI Compatibility checks
// This tool will produce reports stored at compat_reports/ which we will also need to capture // This tool will produce reports stored at compat_reports/ which we will also need to capture
......
...@@ -124,6 +124,8 @@ timestamps { ...@@ -124,6 +124,8 @@ timestamps {
""" """
// Save the ABI build logs to review if necessary // Save the ABI build logs to review if necessary
archiveArtifacts artifacts: 'logs/*/*/log.txt', onlyIfSuccessful: false, allowEmptyArchive: true archiveArtifacts artifacts: 'logs/*/*/log.txt', onlyIfSuccessful: false, allowEmptyArchive: true
// Save the input for ACC for building abi dumps locally
archiveArtifacts artifacts: 'acc/*.xml', onlyIfSuccessful: false, allowEmptyArchive: true
// Now perform the ABI Compatibility checks // Now perform the ABI Compatibility checks
// This tool will produce reports stored at compat_reports/ which we will also need to capture // This tool will produce reports stored at compat_reports/ which we will also need to capture
......
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