Compare commits

...

4 Commits

Author SHA1 Message Date
William Douglas 9594167cc7 Add fixes for flake8 warnings
Signed-off-by: William Douglas <william.douglas@intel.com>
2025-04-18 15:51:15 -07:00
William Douglas c62c42a21d Reject /usr and /usr/ as possible rpm files
These should not be handled paths for autospec. This is a bit of a
hack to work around the rpm build logs being incomplete however and
might be worth reverting if the log issue is fixed.

Signed-off-by: William Douglas <william.douglas@intel.com>
2025-04-18 15:51:15 -07:00
William Douglas a88ffdc2a7 Update APX flags
Signed-off-by: William Douglas <william.douglas@intel.com>
2025-04-04 14:28:44 -07:00
William Douglas 936534a889 abireport: run nm output through c++filt
Signed-off-by: William Douglas <william.douglas@intel.com>
2025-04-02 14:36:34 -07:00
7 changed files with 10 additions and 22 deletions
+1 -1
View File
@@ -155,7 +155,7 @@ def is_file_valid(path):
def dump_symbols(path):
"""Get symbols from a file."""
cmd = "nm --defined-only -g --dynamic \"{}\"".format(path)
cmd = "nm --defined-only -g --dynamic \"{}\" | c++filt".format(path)
lines = None
ret = set()
+2
View File
@@ -215,6 +215,8 @@ class Build(object):
elif infiles == 1 and "not matching the package arch" not in line:
# exclude blank lines from consideration...
file = line.strip()
if file in ("/usr", "/usr/"):
self.must_restart += 1
if file and file[0] == "/":
filemanager.push_file(file, content.name)
-7
View File
@@ -71,14 +71,8 @@ def sanitize_counts():
"""Validate test counts are within sane bounds."""
global total_tests
global total_pass
global total_fail
global total_xfail
global total_skip
global counted_tests
global counted_pass
global counted_fail
global counted_xfail
global counted_skip
if total_tests > 0 and total_pass == 0:
total_pass = total_tests - total_fail - total_skip - total_xfail
@@ -170,7 +164,6 @@ def parse_log(log, pkgname=''):
global total_fail
global total_xfail
global total_skip
global counted_tests
global counted_pass
global counted_fail
global counted_xfail
-5
View File
@@ -55,8 +55,6 @@ def add_license(lic, translations, blacklist):
presence in the blacklist. Returns False if no license were added, True
otherwise.
"""
global licenses
global license_files
lic = lic.strip().strip(',')
result = False
@@ -208,9 +206,6 @@ def scan_for_licenses(srcdir, config, pkg_name):
def load_specfile(specfile):
"""Get licenses from the specfile content."""
global licenses
global license_files
global hashes
specfile.licenses = licenses if licenses else [default_license]
specfile.license_files = sorted(license_files)
specfile.hashes = hashes
+3 -4
View File
@@ -96,7 +96,7 @@ class GPGCli(object):
util.write_out(os.path.join(_gpghome, 'gpg.conf'), GNUPGCONF)
if pubkey is not None:
args = self.args + ['--import', pubkey]
output, err, code = self.exec_cmd(args)
_, err, code = self.exec_cmd(args)
if code == -9:
raise Exception('Command {} timeout after {} seconds'.format(' '.join(args), CMD_TIMEOUT))
elif code != 0:
@@ -212,16 +212,15 @@ class Verifier(object):
@staticmethod
def calc_sum(filepath, digest_algo):
"""Use digest_algo to calculate block sum of a file."""
BLOCK_SIZE = 4096
block_size = 4096
with open(filepath, 'rb') as fp:
digest = digest_algo()
for block in iter(lambda: fp.read(BLOCK_SIZE), b''):
for block in iter(lambda: fp.read(block_size), b''):
digest.update(block)
return digest.hexdigest()
def print_result(self, result, err_msg=''):
"""Display verification results."""
global EMAIL
package_name = ''
if self.url is not None:
package_name = os.path.basename(self.url)
+4 -4
View File
@@ -37,9 +37,9 @@ AVX512_CFLAGS = "-march=x86-64-v4 -mprefer-vector-width=512"
AVX512_FCFLAGS = "-march=x86-64-v4 -mprefer-vector-width=256"
AVX512_LCFLAGS = "-march=x86-64-v4"
AVX512_LFLAGS = "-Wl,-z,x86-64-v4"
APX_CFLAGS = "-march=x86-64-v3 -mapxf -mavx10.1"
APX_LCFLAGS = "-march=x86-64-v3"
APX_LFLAGS = "-Wl,-z,x86-64-v3"
APX_CFLAGS = "-march=x86-64-v4 -mapxf"
APX_LCFLAGS = "-march=x86-64-v4"
APX_LFLAGS = "-Wl,-z,x86-64-v4"
class Specfile(object):
@@ -1166,7 +1166,7 @@ class Specfile(object):
self.write_build_prepend()
self._write_strip("GOAMD64=v3")
self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {APX_CFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {APX_LCFLAGS} "')
-1
View File
@@ -156,7 +156,6 @@ def _file_write(self, s):
def translate(package):
"""Convert terms to their alternate definition."""
global dictionary
for item in dictionary:
if item.startswith(package + "="):
return item.split("=")[1]