try a different approach to get the binary arch, include full traceback

The latest approach unfortunately didn't work, so I'm trying this
approach using the binaries_info variable.

I've also included the full traceback when the functionality doesn't
work, to enable easier debugging
master
Tim Andersson 5 months ago
parent fa37106b41
commit ac324406a0
No known key found for this signature in database
GPG Key ID: 50AF67504D9E703D

@ -32,6 +32,7 @@ import sqlite3
import sys import sys
import hashlib import hashlib
import time import time
import traceback
import urllib.parse import urllib.parse
from urllib.error import HTTPError from urllib.error import HTTPError
from urllib.request import urlopen from urllib.request import urlopen
@ -706,7 +707,8 @@ class AutopkgtestPolicy(BasePolicy):
if arch == "i386": if arch == "i386":
all_binaries_arch_all = True all_binaries_arch_all = True
for package_name in binaries_info.keys(): for package_name in binaries_info.keys():
if self.britney.all_binaries[package_name].architecture != 'all': bin_arch = binaries_info[package_name].architecture or 'all'
if bin_arch != 'all':
all_binaries_arch_all = False all_binaries_arch_all = False
break break
if all_binaries_arch_all: if all_binaries_arch_all:
@ -718,8 +720,8 @@ class AutopkgtestPolicy(BasePolicy):
self.logger.info('Source package %s has binaries which are NOT Architecture: all, and tests have been requested on %s, running tests for this package', self.logger.info('Source package %s has binaries which are NOT Architecture: all, and tests have been requested on %s, running tests for this package',
src, src,
arch) arch)
except Exception as e: except Exception:
self.logger.error('i386 useless autopkgtest check failed with: %s', e) self.logger.error('i386 useless autopkgtest check failed with: %s', traceback.format_exc())
# gcc-N triggers tons of tests via libgcc1, but this is mostly in vain: # gcc-N triggers tons of tests via libgcc1, but this is mostly in vain:
# gcc already tests itself during build, and it is being used from # gcc already tests itself during build, and it is being used from

Loading…
Cancel
Save