Tushar Gupta has proposed merging launchpad-buildd:mwhudson into launchpad-buildd:master.
Requested reviews: Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~launchpad/launchpad-buildd/+git/launchpad-buildd/+merge/488103 -- Your team Launchpad code reviewers is requested to review the proposed merge of launchpad-buildd:mwhudson into launchpad-buildd:master.
diff --git a/README.rst b/README.rst index 8cadaf3..fe93c73 100644 --- a/README.rst +++ b/README.rst @@ -2,6 +2,8 @@ launchpad-buildd **************** +Hello. + This project is the build daemon used by Launchpad's package-building infrastructure. diff --git a/lpbuildd/binarypackage.py b/lpbuildd/binarypackage.py index 5b7bc54..0495279 100644 --- a/lpbuildd/binarypackage.py +++ b/lpbuildd/binarypackage.py @@ -68,14 +68,18 @@ class DpkgArchitectureCache: def __init__(self): self._matches = {} - def match(self, arch, wildcard): - if (arch, wildcard) not in self._matches: - command = ["dpkg-architecture", "-a%s" % arch, "-i%s" % wildcard] + def match(self, abi_tag, wildcard): + if (abi_tag, wildcard) not in self._matches: + command = [ + "dpkg-architecture", + "-a%s" % abi_tag, + "-i%s" % wildcard, + ] env = dict(os.environ) env.pop("DEB_HOST_ARCH", None) ret = subprocess.call(command, env=env) == 0 - self._matches[(arch, wildcard)] = ret - return self._matches[(arch, wildcard)] + self._matches[(abi_tag, wildcard)] = ret + return self._matches[(abi_tag, wildcard)] dpkg_architecture = DpkgArchitectureCache() @@ -178,10 +182,10 @@ class BinaryPackageBuildManager(DebianBuildManager): currently_building.write(currently_building_contents) os.fchmod(currently_building.fileno(), 0o644) - args = ["sbuild-package", self._buildid, self.arch_tag] + args = ["sbuild-package", self._buildid, self.abi_tag] args.append(self.suite) args.extend(["-c", "chroot:build-%s" % self._buildid]) - args.append("--arch=" + self.arch_tag) + args.append("--arch=" + self.abi_tag) args.append("--dist=" + self.suite) args.append("--nolog") if self.arch_indep: @@ -192,6 +196,10 @@ class BinaryPackageBuildManager(DebianBuildManager): env.pop("DEB_BUILD_OPTIONS", None) else: env["DEB_BUILD_OPTIONS"] = "noautodbgsym" + if self.isa_tag != self.abi_tag: + env["DEB_HOST_ARCH_VARIANT"] = self.isa_tag + suffix = self.isa_tag[len(self.abi_tag) :] + args.append("--dpkg-file-suffix=" + suffix) self.runSubProcess(self._sbuildpath, args, env=env) def getAptLists(self): @@ -305,7 +313,7 @@ class BinaryPackageBuildManager(DebianBuildManager): if dep_arch is not None: arch_match = False for enabled, arch_wildcard in dep_arch: - if dpkg_architecture.match(self.arch_tag, arch_wildcard): + if dpkg_architecture.match(self.abi_tag, arch_wildcard): arch_match = enabled break elif not enabled: diff --git a/lpbuildd/builder.py b/lpbuildd/builder.py index 6c5c6b2..b4fb69d 100644 --- a/lpbuildd/builder.py +++ b/lpbuildd/builder.py @@ -164,9 +164,11 @@ class BuildManager: escaped_args = " ".join(shell_escape(arg) for arg in text_args) # Log timestamps in the following form: '[Sun Jun 20 23:21:05 1993]'. - # The day field is two characters long and is space padded if the day is + # The day field is two characters long and is space padded if the day is # a single digit, e.g.: 'Wed Jun 9 04:26:40 1993'. - self._builder.log(f"[{datetime.now().replace(tzinfo=timezone.utc).ctime()}]\n") + self._builder.log( + f"[{datetime.now().replace(tzinfo=timezone.utc).ctime()}]\n" + ) self._builder.log(f"RUN: {command} {escaped_args}\n") childfds = { @@ -190,7 +192,8 @@ class BuildManager: command, "--backend=%s" % self.backend_name, "--series=%s" % self.series, - "--arch=%s" % self.arch_tag, + "--abi-tag=%s" % self.abi_tag, + "--isa-tag=%s" % self.isa_tag, ] for constraint in self.constraints: base_args.append("--constraint=%s" % constraint) @@ -275,7 +278,12 @@ class BuildManager: self.image_type = extra_args.get("image_type", "chroot") self.series = extra_args["series"] - self.arch_tag = extra_args.get("arch_tag", self._builder.getArch()) + arch_tag = extra_args.get("arch_tag", self._builder.getArch()) + if arch_tag == "testing": + self.abi_tag = "amd64" + self.isa_tag = "amd64v3" + else: + self.abi_tag = self.isa_tag = arch_tag self.fast_cleanup = extra_args.get("fast_cleanup", False) self.constraints = extra_args.get("builder_constraints") or [] @@ -290,7 +298,8 @@ class BuildManager: self.backend_name, self._buildid, series=self.series, - arch=self.arch_tag, + abi_tag=self.abi_tag, + isa_tag=self.isa_tag, constraints=self.constraints, ) diff --git a/lpbuildd/debian.py b/lpbuildd/debian.py index 5e52884..5be4fa6 100644 --- a/lpbuildd/debian.py +++ b/lpbuildd/debian.py @@ -102,7 +102,7 @@ class DebianBuildManager(BuildManager): yield filename def getChangesFilename(self): - changes = self._dscfile[:-4] + "_" + self.arch_tag + ".changes" + changes = self._dscfile[:-4] + "_" + self.isa_tag + ".changes" return get_build_path(self.home, self._buildid, changes) def gatherResults(self): diff --git a/lpbuildd/target/apt.py b/lpbuildd/target/apt.py index 4687b06..5b9191d 100644 --- a/lpbuildd/target/apt.py +++ b/lpbuildd/target/apt.py @@ -108,6 +108,7 @@ class OverrideSourcesList(Operation): end="", ) os.fchmod(preferences.fileno(), 0o644) + # Could configure variant here (not strictly required though) return 0 def _split_options(self, raw): diff --git a/lpbuildd/target/backend.py b/lpbuildd/target/backend.py index 371af8f..1d6222f 100644 --- a/lpbuildd/target/backend.py +++ b/lpbuildd/target/backend.py @@ -32,10 +32,18 @@ class Backend: supports_snapd = False - def __init__(self, build_id, series=None, arch=None, constraints=None): + def __init__( + self, + build_id, + series=None, + abi_tag=None, + isa_tag=None, + constraints=None, + ): self.build_id = build_id self.series = series - self.arch = arch + self.abi_tag = abi_tag + self.isa_tag = isa_tag self.constraints = constraints or [] self.build_path = os.path.join(os.environ["HOME"], "build-" + build_id) @@ -228,7 +236,9 @@ class Backend: rmtree(tmp_dir) -def make_backend(name, build_id, series=None, arch=None, constraints=None): +def make_backend( + name, build_id, series=None, abi_tag=None, isa_tag=None, constraints=None +): if name == "chroot": from lpbuildd.target.chroot import Chroot @@ -250,5 +260,9 @@ def make_backend(name, build_id, series=None, arch=None, constraints=None): else: raise KeyError("Unknown backend: %s" % name) return backend_factory( - build_id, series=series, arch=arch, constraints=constraints + build_id, + series=series, + abi_tag=abi_tag, + isa_tag=isa_tag, + constraints=constraints, ) diff --git a/lpbuildd/target/build_livefs.py b/lpbuildd/target/build_livefs.py index d3b592e..c458e1d 100644 --- a/lpbuildd/target/build_livefs.py +++ b/lpbuildd/target/build_livefs.py @@ -169,7 +169,7 @@ class BuildLiveFS(SnapStoreOperationMixin, Operation): "--locale", self.args.locale, "--arch", - self.args.arch, + self.args.abi_tag, "--release", self.args.series, ] @@ -191,7 +191,9 @@ class BuildLiveFS(SnapStoreOperationMixin, Operation): base_lb_env = OrderedDict() base_lb_env["PROJECT"] = self.args.project - base_lb_env["ARCH"] = self.args.arch + base_lb_env["ARCH"] = self.args.abi_tag + if self.args.abi_tag != self.args.isa_tag: + base_lb_env["ARCH_VARIANT"] = self.args.isa_tag if self.args.subproject is not None: base_lb_env["SUBPROJECT"] = self.args.subproject if self.args.subarch is not None: diff --git a/lpbuildd/target/build_snap.py b/lpbuildd/target/build_snap.py index 5d957ae..57e4144 100644 --- a/lpbuildd/target/build_snap.py +++ b/lpbuildd/target/build_snap.py @@ -81,6 +81,7 @@ class BuildSnap( action="store_true", help="build a private snap", ) + # XXX hmm parser.add_argument( "--target-arch", dest="target_architectures", diff --git a/lpbuildd/target/chroot.py b/lpbuildd/target/chroot.py index d690ec1..a49f568 100644 --- a/lpbuildd/target/chroot.py +++ b/lpbuildd/target/chroot.py @@ -63,8 +63,9 @@ class Chroot(Backend): + [f"{key}={value}" for key, value in env.items()] + args ) - if self.arch is not None: - args = set_personality(args, self.arch, series=self.series) + if self.abi_tag is not None: + # probably needs to check for variant here + args = set_personality(args, self.abi_tag, series=self.series) if cwd is not None: # This requires either a helper program in the chroot or # unpleasant quoting. For now we go for the unpleasant quoting, diff --git a/lpbuildd/target/lxd.py b/lpbuildd/target/lxd.py index ab35590..4ae732f 100644 --- a/lpbuildd/target/lxd.py +++ b/lpbuildd/target/lxd.py @@ -117,11 +117,11 @@ class LXD(Backend): @property def lxc_arch(self): - return self.arches[self.arch] + return self.arches[self.abi_tag] @property def alias(self): - return f"lp-{self.series}-{self.arch}" + return f"lp-{self.series}-{self.abi_tag}" @property def name(self): @@ -142,9 +142,10 @@ class LXD(Backend): "properties": { "os": "Ubuntu", "series": self.series, - "architecture": self.arch, + # XXX hmm + "architecture": self.abi_tag, "description": ( - f"Launchpad chroot for Ubuntu {self.series} ({self.arch})" + f"Launchpad chroot for Ubuntu {self.series} ({self.abi_tag})" ), }, } @@ -476,7 +477,7 @@ class LXD(Backend): # Linux 4.4 on powerpc doesn't support all the seccomp bits that LXD # needs. - if self.arch == "powerpc": + if self.abi_tag == "powerpc": raw_lxc_config.append(("lxc.seccomp", "")) config = { "security.privileged": "true", @@ -682,7 +683,7 @@ class LXD(Backend): ] ) - if self.arch == "armhf": + if self.abi_tag == "armhf": # Work around https://github.com/lxc/lxcfs/issues/553. In # principle that could result in over-reporting the number of # available CPU cores, but that isn't a concern in @@ -731,8 +732,8 @@ class LXD(Backend): if env: for key, value in env.items(): env_params.extend(["--env", f"{key}={value}"]) - if self.arch is not None: - args = set_personality(args, self.arch, series=self.series) + if self.abi_tag is not None: + args = set_personality(args, self.abi_tag, series=self.series) if cwd is not None: # This requires either a helper program in the chroot or # unpleasant quoting. For now we go for the unpleasant quoting, diff --git a/lpbuildd/target/operation.py b/lpbuildd/target/operation.py index 1590271..1c7b7f3 100644 --- a/lpbuildd/target/operation.py +++ b/lpbuildd/target/operation.py @@ -23,7 +23,14 @@ class Operation: "--series", metavar="SERIES", help="operate on series SERIES" ) parser.add_argument( - "--arch", metavar="ARCH", help="operate on architecture ARCH" + "--abi-tag", + metavar="ABI", + help="operate on Debian architecture ABI", + ) + parser.add_argument( + "--isa-tag", + metavar="ISA", + help="build for ISA", ) parser.add_argument( "--constraint", @@ -42,7 +49,8 @@ class Operation: self.args.backend, self.args.build_id, series=self.args.series, - arch=self.args.arch, + abi_tag=self.args.abi_tag, + isa_tag=self.args.isa_tag, constraints=self.args.constraints, ) diff --git a/lpbuildd/target/tests/test_apt.py b/lpbuildd/target/tests/test_apt.py index eb7ed9e..ffa1079 100644 --- a/lpbuildd/target/tests/test_apt.py +++ b/lpbuildd/target/tests/test_apt.py @@ -41,7 +41,8 @@ class TestOverrideSourcesList(TestCase): "override-sources-list", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "deb http://archive.ubuntu.com/ubuntu xenial main", "deb http://ppa.launchpad.net/launchpad/ppa/ubuntu xenial main", @@ -100,7 +101,8 @@ class TestOverrideSourcesList(TestCase): "override-sources-list", "--backend=fake", "--series=oracular", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "deb [trusted=yes] http://archive.ubuntu.com/ubuntu oracular main", "deb [ arch=amd64,armel lang=en_US,en_CA ] http://ppa.launchpad.net/launchpad/ppa/ubuntu oracular main", # noqa: E501 @@ -156,7 +158,8 @@ class TestOverrideSourcesList(TestCase): "override-sources-list", "--backend=fake", "--series=oracular", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "bad-source.com", "deb [reject=yes] http://archive.ubuntu.com/ubuntu oracular main", @@ -177,7 +180,8 @@ class TestOverrideSourcesList(TestCase): "override-sources-list", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--apt-proxy-url", "http://apt-proxy.example:3128/", @@ -274,7 +278,8 @@ class TestAddTrustedKeys(TestCase): "add-trusted-keys", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", ] add_trusted_keys = parse_args(args=args).operation @@ -345,7 +350,8 @@ class TestUpdate(TestCase): "update-debian-chroot", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", ] update = parse_args(args=args).operation @@ -378,7 +384,8 @@ class TestUpdate(TestCase): "update-debian-chroot", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", ] update = parse_args(args=args).operation diff --git a/lpbuildd/target/tests/test_build_charm.py b/lpbuildd/target/tests/test_build_charm.py index 42e3154..6c11bb3 100644 --- a/lpbuildd/target/tests/test_build_charm.py +++ b/lpbuildd/target/tests/test_build_charm.py @@ -34,7 +34,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -58,7 +59,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -86,7 +88,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--channel=core=candidate", "--channel=core18=beta", @@ -119,7 +122,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -145,7 +149,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -190,7 +195,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -225,7 +231,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -531,7 +538,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -567,7 +575,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -617,7 +626,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -669,7 +679,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -721,7 +732,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -866,7 +878,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -892,7 +905,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -920,7 +934,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -956,7 +971,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -980,6 +996,7 @@ class TestBuildCharm(TestCase): ), ) +<<<<<<< lpbuildd/target/tests/test_build_charm.py def test_build_fetch_service(self): args = [ "build-charm", @@ -1027,12 +1044,15 @@ class TestBuildCharm(TestCase): ), ) +======= +>>>>>>> lpbuildd/target/tests/test_build_charm.py def test_run_succeeds(self): args = [ "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1077,7 +1097,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1099,7 +1120,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1121,7 +1143,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1137,7 +1160,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1154,7 +1178,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1171,7 +1196,8 @@ class TestBuildCharm(TestCase): "build-charm", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", diff --git a/lpbuildd/target/tests/test_build_craft.py b/lpbuildd/target/tests/test_build_craft.py index 45b69ac..66aa006 100644 --- a/lpbuildd/target/tests/test_build_craft.py +++ b/lpbuildd/target/tests/test_build_craft.py @@ -31,7 +31,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -55,7 +56,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -83,7 +85,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--channel=core=candidate", "--channel=core18=beta", @@ -114,7 +117,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -143,7 +147,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -191,7 +196,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -229,7 +235,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -277,7 +284,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -377,7 +385,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -468,7 +477,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -512,7 +522,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -548,7 +559,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -584,7 +596,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -634,7 +647,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -686,7 +700,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -738,7 +753,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -801,7 +817,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -883,7 +900,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -909,7 +927,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -939,7 +958,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -967,7 +987,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1003,7 +1024,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1050,7 +1072,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1093,7 +1116,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1115,7 +1139,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1137,7 +1162,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1153,7 +1179,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1170,7 +1197,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1187,7 +1215,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1207,7 +1236,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1249,7 +1279,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1267,33 +1298,52 @@ class TestBuildCraft(TestCase): self.assertTrue(build_craft.backend.path_exists(maven_settings_path)) with build_craft.backend.open(maven_settings_path) as f: settings_content = f.read() - + # Check server configurations - self.assertIn(' <server>', settings_content) - self.assertIn(' <id>artifactory</id>', settings_content) - self.assertIn(' <username>user</username>', settings_content) - self.assertIn(' <password>token123</password>', settings_content) - self.assertIn(' <id>artifactory-snapshots</id>', settings_content) - + self.assertIn(" <server>", settings_content) + self.assertIn(" <id>artifactory</id>", settings_content) + self.assertIn( + " <username>user</username>", settings_content + ) + self.assertIn( + " <password>token123</password>", settings_content + ) + self.assertIn( + " <id>artifactory-snapshots</id>", settings_content + ) + # Check profile configuration - self.assertIn(' <profile>', settings_content) - self.assertIn(' <id>artifactory</id>', settings_content) - + self.assertIn(" <profile>", settings_content) + self.assertIn(" <id>artifactory</id>", settings_content) + # Check repositories - self.assertIn(' <repository>', settings_content) - self.assertIn(' <url>https://canonical.example.com/artifactory/api/maven/maven-upstream/</url>', settings_content) - self.assertIn(' <enabled>false</enabled>', settings_content) - self.assertIn(' <enabled>true</enabled>', settings_content) - + self.assertIn(" <repository>", settings_content) + self.assertIn( + " <url>https://canonical.example.com/artifactory/api/maven/maven-upstream/</url>", + settings_content, + ) + self.assertIn( + " <enabled>false</enabled>", + settings_content, + ) + self.assertIn( + " <enabled>true</enabled>", + settings_content, + ) + # Check plugin repositories - self.assertIn(' <pluginRepository>', settings_content) - + self.assertIn( + " <pluginRepository>", settings_content + ) + # Check mirrors - self.assertIn(' <mirror>', settings_content) - self.assertIn(' <mirrorOf>*</mirrorOf>', settings_content) - + self.assertIn(" <mirror>", settings_content) + self.assertIn( + " <mirrorOf>*</mirrorOf>", settings_content + ) + # Verify activeProfiles section is not present - self.assertNotIn('<activeProfiles>', settings_content) + self.assertNotIn("<activeProfiles>", settings_content) # Verify the build command was run self.assertThat( @@ -1314,7 +1364,8 @@ class TestBuildCraft(TestCase): "build-craft", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1336,31 +1387,52 @@ class TestBuildCraft(TestCase): self.assertTrue(build_craft.backend.path_exists(maven_settings_path)) with build_craft.backend.open(maven_settings_path) as f: settings_content = f.read() - + # Check server configurations for both repositories - for i, creds in enumerate([("user1", "token1"), ("user2", "token2")], 1): + for i, creds in enumerate( + [("user1", "token1"), ("user2", "token2")], 1 + ): user, token = creds repo_name = f"artifactory{i}" - + # Check servers with exact indentation - self.assertIn(f' <id>{repo_name}</id>', settings_content) - self.assertIn(f' <username>{user}</username>', settings_content) - self.assertIn(f' <password>{token}</password>', settings_content) - self.assertIn(f' <id>{repo_name}-snapshots</id>', settings_content) - + self.assertIn( + f" <id>{repo_name}</id>", settings_content + ) + self.assertIn( + f" <username>{user}</username>", + settings_content, + ) + self.assertIn( + f" <password>{token}</password>", + settings_content, + ) + self.assertIn( + f" <id>{repo_name}-snapshots</id>", + settings_content, + ) + # Check profiles with exact indentation - self.assertIn(f' <id>{repo_name}</id>', settings_content) - + self.assertIn( + f" <id>{repo_name}</id>", settings_content + ) + # Check repositories with exact indentation - url = f'https://canonical.example.com/artifactory/api/maven/maven-upstream{i}/' - self.assertIn(f' <url>{url}</url>', settings_content) - + url = f"https://canonical.example.com/artifactory/api/maven/maven-upstream{i}/" + self.assertIn( + f" <url>{url}</url>", settings_content + ) + # Check mirrors with exact indentation - self.assertIn(f' <id>{repo_name}</id>', settings_content) - self.assertIn(' <mirrorOf>*</mirrorOf>', settings_content) - + self.assertIn( + f" <id>{repo_name}</id>", settings_content + ) + self.assertIn( + " <mirrorOf>*</mirrorOf>", settings_content + ) + # Verify activeProfiles section is not present - self.assertNotIn('<activeProfiles>', settings_content) + self.assertNotIn("<activeProfiles>", settings_content) # Verify the build command was run self.assertThat( diff --git a/lpbuildd/target/tests/test_build_livefs.py b/lpbuildd/target/tests/test_build_livefs.py index ca173c1..0c5f21c 100644 --- a/lpbuildd/target/tests/test_build_livefs.py +++ b/lpbuildd/target/tests/test_build_livefs.py @@ -29,7 +29,8 @@ class TestBuildLiveFS(TestCase): "buildlivefs", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", ] build_livefs = parse_args(args=args).operation @@ -49,7 +50,8 @@ class TestBuildLiveFS(TestCase): "buildlivefs", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--locale=zh_CN", ] @@ -94,7 +96,8 @@ class TestBuildLiveFS(TestCase): "buildlivefs", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--snap-store-proxy-url", "http://snap-store-proxy.example/", @@ -123,7 +126,8 @@ class TestBuildLiveFS(TestCase): "buildlivefs", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--project=ubuntu", ] @@ -178,7 +182,8 @@ class TestBuildLiveFS(TestCase): "buildlivefs", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--project=ubuntu", "--snapshot-service-timestamp", @@ -239,7 +244,8 @@ class TestBuildLiveFS(TestCase): "buildlivefs", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--locale=zh_CN", ] @@ -269,7 +275,8 @@ class TestBuildLiveFS(TestCase): "buildlivefs", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--project=ubuntu-core", "--extra-ppa=owner1/name1", @@ -330,7 +337,8 @@ class TestBuildLiveFS(TestCase): "buildlivefs", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--project=ubuntu", "--debug", @@ -398,7 +406,8 @@ class TestBuildLiveFS(TestCase): "buildlivefs", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--project=ubuntu-cpc", f"--http-proxy={proxy}", @@ -449,7 +458,8 @@ class TestBuildLiveFS(TestCase): "buildlivefs", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--project=ubuntu", ] @@ -479,7 +489,8 @@ class TestBuildLiveFS(TestCase): "buildlivefs", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--project=ubuntu", ] @@ -499,7 +510,8 @@ class TestBuildLiveFS(TestCase): "buildlivefs", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--project=ubuntu", ] @@ -522,7 +534,8 @@ class TestBuildLiveFS(TestCase): "buildlivefs", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--project=ubuntu", ] diff --git a/lpbuildd/target/tests/test_build_oci.py b/lpbuildd/target/tests/test_build_oci.py index 4ea5132..1b47c2d 100644 --- a/lpbuildd/target/tests/test_build_oci.py +++ b/lpbuildd/target/tests/test_build_oci.py @@ -32,7 +32,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -56,7 +57,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -84,7 +86,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -114,7 +117,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -163,7 +167,8 @@ class TestBuildOCI(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -194,7 +199,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -239,7 +245,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -266,7 +273,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -318,7 +326,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -372,7 +381,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -426,7 +436,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -491,7 +502,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -524,7 +536,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -561,7 +574,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -596,7 +610,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -635,7 +650,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -678,7 +694,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -721,7 +738,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -775,7 +793,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -797,7 +816,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -819,7 +839,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -835,7 +856,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -852,7 +874,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -869,7 +892,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -889,7 +913,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -906,7 +931,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -923,7 +949,8 @@ class TestBuildOCI(TestCase): "build-oci", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", diff --git a/lpbuildd/target/tests/test_build_rock.py b/lpbuildd/target/tests/test_build_rock.py index a79157e..5fa2b1b 100644 --- a/lpbuildd/target/tests/test_build_rock.py +++ b/lpbuildd/target/tests/test_build_rock.py @@ -31,7 +31,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -55,7 +56,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -83,7 +85,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--channel=core=candidate", "--channel=core18=beta", @@ -120,7 +123,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -150,7 +154,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -199,7 +204,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -238,7 +244,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -282,7 +289,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -378,7 +386,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -465,7 +474,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -509,7 +519,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -545,7 +556,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -581,7 +593,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -631,7 +644,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -683,7 +697,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -735,7 +750,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -798,7 +814,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -880,7 +897,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -906,7 +924,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -936,7 +955,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -964,7 +984,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1000,7 +1021,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1047,7 +1069,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1096,7 +1119,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1118,7 +1142,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1140,7 +1165,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1156,7 +1182,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1173,7 +1200,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1190,7 +1218,8 @@ class TestBuildRock(TestCase): "build-rock", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", diff --git a/lpbuildd/target/tests/test_build_snap.py b/lpbuildd/target/tests/test_build_snap.py index 9f56b08..3a94727 100644 --- a/lpbuildd/target/tests/test_build_snap.py +++ b/lpbuildd/target/tests/test_build_snap.py @@ -59,7 +59,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -81,7 +82,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -122,7 +124,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -153,7 +156,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -199,7 +203,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -297,7 +302,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -386,7 +392,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--channel=core=candidate", "--channel=core18=beta", @@ -421,7 +428,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -457,7 +465,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -485,7 +494,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -520,7 +530,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -570,7 +581,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -622,7 +634,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -674,7 +687,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -737,7 +751,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -819,7 +834,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -850,7 +866,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--build-url", "https://launchpad.example/build", @@ -897,7 +914,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--build-url", "https://launchpad.example/build", @@ -943,7 +961,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--build-url", "https://launchpad.example/build", @@ -999,7 +1018,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1046,7 +1066,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1077,7 +1098,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1112,7 +1134,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1151,7 +1174,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--build-url", "https://launchpad.example/build", @@ -1199,7 +1223,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1230,7 +1255,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1265,7 +1291,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--build-request-id", "13", @@ -1302,7 +1329,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--build-request-timestamp", "2018-04-13T14:50:02Z", @@ -1342,7 +1370,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1378,7 +1407,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--build-request-id", "13", @@ -1442,7 +1472,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1464,7 +1495,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1488,7 +1520,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -1513,7 +1546,8 @@ class TestBuildSnap(TestCase): "buildsnap", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", diff --git a/lpbuildd/target/tests/test_generate_translation_templates.py b/lpbuildd/target/tests/test_generate_translation_templates.py index 147bc1c..00b247f 100644 --- a/lpbuildd/target/tests/test_generate_translation_templates.py +++ b/lpbuildd/target/tests/test_generate_translation_templates.py @@ -85,7 +85,8 @@ class TestGenerateTranslationTemplates(TestCase): "generate-translation-templates", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", "lp:foo", @@ -107,7 +108,8 @@ class TestGenerateTranslationTemplates(TestCase): "generate-translation-templates", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -134,7 +136,8 @@ class TestGenerateTranslationTemplates(TestCase): "generate-translation-templates", "--backend=uncontained", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", branch_path, @@ -157,7 +160,8 @@ class TestGenerateTranslationTemplates(TestCase): "generate-translation-templates", "--backend=uncontained", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", branch_path, @@ -184,7 +188,8 @@ class TestGenerateTranslationTemplates(TestCase): "generate-translation-templates", "--backend=uncontained", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", branch_path, @@ -218,7 +223,8 @@ class TestGenerateTranslationTemplates(TestCase): "generate-translation-templates", "--backend=uncontained", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", branchdir, @@ -243,7 +249,8 @@ class TestGenerateTranslationTemplates(TestCase): "generate-translation-templates", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--branch", branch_url, @@ -311,7 +318,8 @@ class TestGenerateTranslationTemplates(TestCase): "generate-translation-templates", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", repository_url, diff --git a/lpbuildd/target/tests/test_lifecycle.py b/lpbuildd/target/tests/test_lifecycle.py index a96e6b8..a4935de 100644 --- a/lpbuildd/target/tests/test_lifecycle.py +++ b/lpbuildd/target/tests/test_lifecycle.py @@ -17,7 +17,8 @@ class TestCreate(TestCase): "unpack-chroot", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "/path/to/tarball", ] @@ -32,7 +33,8 @@ class TestCreate(TestCase): "unpack-chroot", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--image-type", "lxd", @@ -51,7 +53,8 @@ class TestStart(TestCase): "mount-chroot", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", ] start = parse_args(args=args).operation @@ -65,7 +68,8 @@ class TestKillProcesses(TestCase): "scan-for-processes", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", ] kill_processes = parse_args(args=args).operation @@ -81,7 +85,8 @@ class TestStop(TestCase): "umount-chroot", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", ] stop = parse_args(args=args).operation @@ -94,7 +99,8 @@ class TestStop(TestCase): "umount-chroot", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", ] stop = parse_args(args=args).operation @@ -121,7 +127,8 @@ class TestRemove(TestCase): "remove-build", "--backend=fake", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", ] remove = parse_args(args=args).operation diff --git a/lpbuildd/target/tests/test_operation.py b/lpbuildd/target/tests/test_operation.py index 3264e8a..0ea39f6 100644 --- a/lpbuildd/target/tests/test_operation.py +++ b/lpbuildd/target/tests/test_operation.py @@ -14,7 +14,13 @@ class TestOperation(TestCase): def test_run_build_command_no_env(self): parser = ArgumentParser() Operation.add_arguments(parser) - args = ["--backend=fake", "--series=xenial", "--arch=amd64", "1"] + args = [ + "--backend=fake", + "--series=xenial", + "--abi-tag=amd64", + "--isa-tag=amd64", + "1", + ] operation = Operation(parser.parse_args(args=args), parser) operation.run_build_command(["echo", "hello world"]) self.assertThat( @@ -29,7 +35,13 @@ class TestOperation(TestCase): def test_run_build_command_env(self): parser = ArgumentParser() Operation.add_arguments(parser) - args = ["--backend=fake", "--series=xenial", "--arch=amd64", "1"] + args = [ + "--backend=fake", + "--series=xenial", + "--abi-tag=amd64", + "--isa-tag=amd64", + "1", + ] operation = Operation(parser.parse_args(args=args), parser) operation.run_build_command( ["echo", "hello world"], env={"FOO": "bar baz"} diff --git a/lpbuildd/target/tests/test_run_ci.py b/lpbuildd/target/tests/test_run_ci.py index 3f5f837..8ea5eef 100644 --- a/lpbuildd/target/tests/test_run_ci.py +++ b/lpbuildd/target/tests/test_run_ci.py @@ -44,7 +44,8 @@ class TestRunCIPrepare(TestCase): "run-ci-prepare", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -87,7 +88,8 @@ class TestRunCIPrepare(TestCase): "run-ci-prepare", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -115,7 +117,8 @@ class TestRunCIPrepare(TestCase): "run-ci-prepare", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -153,7 +156,8 @@ class TestRunCIPrepare(TestCase): "run-ci-prepare", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--channel=core=candidate", "--channel=core20=beta", @@ -183,7 +187,8 @@ class TestRunCIPrepare(TestCase): "run-ci-prepare", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -209,7 +214,8 @@ class TestRunCIPrepare(TestCase): "run-ci-prepare", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -251,7 +257,8 @@ class TestRunCIPrepare(TestCase): "run-ci-prepare", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -289,7 +296,8 @@ class TestRunCIPrepare(TestCase): "run-ci-prepare", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -339,7 +347,8 @@ class TestRunCIPrepare(TestCase): "run-ci-prepare", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -391,7 +400,8 @@ class TestRunCIPrepare(TestCase): "run-ci-prepare", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -444,7 +454,8 @@ class TestRunCIPrepare(TestCase): "run-ci-prepare", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -509,7 +520,8 @@ class TestRunCIPrepare(TestCase): "run-ci-prepare", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -543,7 +555,8 @@ class TestRunCIPrepare(TestCase): "run-ci-prepare", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -564,7 +577,8 @@ class TestRunCIPrepare(TestCase): "run-ci-prepare", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--git-repository", "lp:foo", @@ -580,7 +594,8 @@ class TestRunCI(TestCase): "run-ci", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "test", "0", @@ -623,7 +638,8 @@ class TestRunCI(TestCase): "run-ci", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--proxy-url", "http://proxy.example:3128/", @@ -677,7 +693,8 @@ class TestRunCI(TestCase): "run-ci", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--environment-variable", "PIP_INDEX_URL=http://example", @@ -728,7 +745,8 @@ class TestRunCI(TestCase): "run-ci", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--package-repository", "deb http://archive.ubuntu.com/ubuntu/ focal main restricted", @@ -779,7 +797,8 @@ class TestRunCI(TestCase): "run-ci", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "test", "0", @@ -828,7 +847,8 @@ class TestRunCI(TestCase): "run-ci", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--secrets", "/build/.launchpad-secrets.yaml", @@ -876,7 +896,8 @@ class TestRunCI(TestCase): "run-ci", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--scan-malware", "test", @@ -945,7 +966,8 @@ class TestRunCI(TestCase): "run-ci", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "--scan-malware", "test", @@ -960,7 +982,8 @@ class TestRunCI(TestCase): "run-ci", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "--constraint=gpu-nvidia", "1", "test", @@ -1007,7 +1030,8 @@ class TestRunCI(TestCase): "run-ci", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "test", "0", @@ -1032,7 +1056,8 @@ class TestRunCI(TestCase): "run-ci", "--backend=fake", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "1", "test", "0", diff --git a/lpbuildd/tests/fakebuilder.py b/lpbuildd/tests/fakebuilder.py index 15a820a..c3bafe1 100644 --- a/lpbuildd/tests/fakebuilder.py +++ b/lpbuildd/tests/fakebuilder.py @@ -259,8 +259,8 @@ class UncontainedBackend(Backend): ] + args ) - if self.arch is not None: - args = set_personality(args, self.arch, series=self.series) + if self.abi_tag is not None: + args = set_personality(args, self.abi_tag, series=self.series) if input_text is None and not get_output: subprocess.check_call(args, cwd=cwd, **kwargs) else: diff --git a/lpbuildd/tests/test_binarypackage.py b/lpbuildd/tests/test_binarypackage.py index 77029d3..3e007fc 100644 --- a/lpbuildd/tests/test_binarypackage.py +++ b/lpbuildd/tests/test_binarypackage.py @@ -174,7 +174,8 @@ class TestBinaryPackageBuildManagerIteration(TestCase): "scan-for-processes", "--backend=chroot", "--series=warty", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ], final=False, @@ -190,7 +191,8 @@ class TestBinaryPackageBuildManagerIteration(TestCase): "umount-chroot", "--backend=chroot", "--series=warty", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ], final=True, @@ -364,7 +366,8 @@ class TestBinaryPackageBuildManagerIteration(TestCase): "scan-for-processes", "--backend=chroot", "--series=warty", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ], final=False, @@ -393,7 +396,8 @@ class TestBinaryPackageBuildManagerIteration(TestCase): "scan-for-processes", "--backend=chroot", "--series=warty", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ], final=False, @@ -429,7 +433,8 @@ class TestBinaryPackageBuildManagerIteration(TestCase): "umount-chroot", "--backend=chroot", "--series=warty", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ], final=True, @@ -454,7 +459,8 @@ class TestBinaryPackageBuildManagerIteration(TestCase): "scan-for-processes", "--backend=chroot", "--series=warty", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ], final=False, @@ -469,7 +475,8 @@ class TestBinaryPackageBuildManagerIteration(TestCase): "remove-build", "--backend=chroot", "--series=warty", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ], final=True, diff --git a/lpbuildd/tests/test_charm.py b/lpbuildd/tests/test_charm.py index 3944ab4..271689c 100644 --- a/lpbuildd/tests/test_charm.py +++ b/lpbuildd/tests/test_charm.py @@ -80,7 +80,8 @@ class TestCharmBuildManagerIteration(TestCase): "build-charm", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] if options is not None: @@ -134,7 +135,8 @@ class TestCharmBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] @@ -161,7 +163,8 @@ class TestCharmBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(CharmBuildState.UMOUNT, self.getState()) @@ -207,7 +210,8 @@ class TestCharmBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] @@ -234,7 +238,8 @@ class TestCharmBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(CharmBuildState.UMOUNT, self.getState()) @@ -290,7 +295,8 @@ class TestCharmBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] @@ -317,7 +323,8 @@ class TestCharmBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(CharmBuildState.UMOUNT, self.getState()) diff --git a/lpbuildd/tests/test_ci.py b/lpbuildd/tests/test_ci.py index 6aa00af..d7dfd90 100644 --- a/lpbuildd/tests/test_ci.py +++ b/lpbuildd/tests/test_ci.py @@ -87,7 +87,8 @@ class TestCIBuildManagerIteration(TestCase): "run-ci-prepare", "--backend=lxd", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", ] for constraint in constraints or []: expected_command.append("--constraint=%s" % constraint) @@ -112,7 +113,8 @@ class TestCIBuildManagerIteration(TestCase): "run-ci", "--backend=lxd", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ] if options is not None: @@ -220,7 +222,8 @@ class TestCIBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ] self.assertEqual(CIBuildState.RUN_JOB, self.getState()) @@ -277,7 +280,8 @@ class TestCIBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ] self.assertEqual(CIBuildState.UMOUNT, self.getState()) @@ -296,7 +300,8 @@ class TestCIBuildManagerIteration(TestCase): "remove-build", "--backend=lxd", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ] self.assertEqual(CIBuildState.CLEANUP, self.getState()) @@ -398,7 +403,8 @@ class TestCIBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ] self.assertEqual(CIBuildState.RUN_JOB, self.getState()) @@ -442,7 +448,8 @@ class TestCIBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ] self.assertEqual(CIBuildState.UMOUNT, self.getState()) @@ -461,7 +468,8 @@ class TestCIBuildManagerIteration(TestCase): "remove-build", "--backend=lxd", "--series=focal", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ] self.assertEqual(CIBuildState.CLEANUP, self.getState()) diff --git a/lpbuildd/tests/test_craft.py b/lpbuildd/tests/test_craft.py index b9dfa40..9c2ddd5 100644 --- a/lpbuildd/tests/test_craft.py +++ b/lpbuildd/tests/test_craft.py @@ -75,7 +75,8 @@ class TestCraftBuildManagerIteration(TestCase): "build-craft", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] if options is not None: @@ -130,7 +131,8 @@ class TestCraftBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] @@ -157,7 +159,8 @@ class TestCraftBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(CraftBuildState.UMOUNT, self.getState()) @@ -203,7 +206,8 @@ class TestCraftBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] @@ -230,7 +234,8 @@ class TestCraftBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(CraftBuildState.UMOUNT, self.getState()) diff --git a/lpbuildd/tests/test_debian.py b/lpbuildd/tests/test_debian.py index 253e435..77b7245 100644 --- a/lpbuildd/tests/test_debian.py +++ b/lpbuildd/tests/test_debian.py @@ -125,7 +125,8 @@ class TestDebianBuildManagerIteration(TestCase): "unpack-chroot", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, "--image-type", "chroot", @@ -151,7 +152,8 @@ class TestDebianBuildManagerIteration(TestCase): "mount-chroot", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ], None, @@ -172,7 +174,8 @@ class TestDebianBuildManagerIteration(TestCase): "override-sources-list", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, "deb http://ppa.launchpad.dev/owner/name/ubuntu xenial " "main", @@ -195,7 +198,8 @@ class TestDebianBuildManagerIteration(TestCase): "update-debian-chroot", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ], None, @@ -225,7 +229,8 @@ class TestDebianBuildManagerIteration(TestCase): "scan-for-processes", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ], None, @@ -246,7 +251,8 @@ class TestDebianBuildManagerIteration(TestCase): "umount-chroot", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ], None, @@ -267,7 +273,8 @@ class TestDebianBuildManagerIteration(TestCase): "remove-build", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ], None, @@ -309,7 +316,8 @@ class TestDebianBuildManagerIteration(TestCase): "unpack-chroot", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, "--image-type", "chroot", @@ -335,7 +343,8 @@ class TestDebianBuildManagerIteration(TestCase): "mount-chroot", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ], None, @@ -356,7 +365,8 @@ class TestDebianBuildManagerIteration(TestCase): "override-sources-list", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, "deb http://ppa.launchpad.dev/owner/name/ubuntu xenial " "main", @@ -379,7 +389,8 @@ class TestDebianBuildManagerIteration(TestCase): "add-trusted-keys", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ], b"key material", @@ -400,7 +411,8 @@ class TestDebianBuildManagerIteration(TestCase): "update-debian-chroot", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ], None, @@ -430,7 +442,8 @@ class TestDebianBuildManagerIteration(TestCase): "scan-for-processes", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ], None, @@ -451,7 +464,8 @@ class TestDebianBuildManagerIteration(TestCase): "umount-chroot", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ], None, @@ -472,7 +486,8 @@ class TestDebianBuildManagerIteration(TestCase): "remove-build", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ], None, @@ -516,7 +531,8 @@ class TestDebianBuildManagerIteration(TestCase): "unpack-chroot", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, "--image-type", "chroot", @@ -542,7 +558,8 @@ class TestDebianBuildManagerIteration(TestCase): "mount-chroot", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ], None, @@ -563,7 +580,8 @@ class TestDebianBuildManagerIteration(TestCase): "override-sources-list", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, "deb http://ppa.launchpad.dev/owner/name/ubuntu xenial " "main", @@ -586,7 +604,8 @@ class TestDebianBuildManagerIteration(TestCase): "update-debian-chroot", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ], None, @@ -616,7 +635,8 @@ class TestDebianBuildManagerIteration(TestCase): "scan-for-processes", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, ], None, @@ -663,7 +683,8 @@ class TestDebianBuildManagerIteration(TestCase): "override-sources-list", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, "--apt-proxy-url", "http://apt-proxy.example:3128/", @@ -699,7 +720,8 @@ class TestDebianBuildManagerIteration(TestCase): "unpack-chroot", "--backend=lxd", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, "--image-type", "lxd", @@ -734,7 +756,8 @@ class TestDebianBuildManagerIteration(TestCase): "unpack-chroot", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, "--image-type", "chroot", @@ -770,7 +793,8 @@ class TestDebianBuildManagerIteration(TestCase): "unpack-chroot", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", self.buildid, "--image-type", "chroot", @@ -806,7 +830,8 @@ class TestDebianBuildManagerIteration(TestCase): "unpack-chroot", "--backend=chroot", "--series=xenial", - "--arch=amd64", + "--abi-tag=amd64", + "--isa-tag=amd64", "--constraint=gpu", "--constraint=large", self.buildid, diff --git a/lpbuildd/tests/test_livefs.py b/lpbuildd/tests/test_livefs.py index 1a7db8d..9b58a8a 100644 --- a/lpbuildd/tests/test_livefs.py +++ b/lpbuildd/tests/test_livefs.py @@ -84,7 +84,8 @@ class TestLiveFilesystemBuildManagerIteration(TestCase): "buildlivefs", "--backend=lxd", "--series=saucy", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, "--project", "ubuntu", @@ -118,7 +119,8 @@ class TestLiveFilesystemBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=saucy", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual( @@ -146,7 +148,8 @@ class TestLiveFilesystemBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=saucy", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(LiveFilesystemBuildState.UMOUNT, self.getState()) diff --git a/lpbuildd/tests/test_oci.py b/lpbuildd/tests/test_oci.py index fe4ee23..466b32f 100644 --- a/lpbuildd/tests/test_oci.py +++ b/lpbuildd/tests/test_oci.py @@ -88,7 +88,8 @@ class TestOCIBuildManagerIteration(TestCase): "build-oci", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] if options is not None: @@ -141,7 +142,8 @@ class TestOCIBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(OCIBuildState.BUILD_OCI, self.getState()) @@ -194,7 +196,8 @@ class TestOCIBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(OCIBuildState.UMOUNT, self.getState()) @@ -254,7 +257,8 @@ class TestOCIBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(OCIBuildState.BUILD_OCI, self.getState()) @@ -308,7 +312,8 @@ class TestOCIBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(OCIBuildState.UMOUNT, self.getState()) diff --git a/lpbuildd/tests/test_rock.py b/lpbuildd/tests/test_rock.py index c58cee6..ee65642 100644 --- a/lpbuildd/tests/test_rock.py +++ b/lpbuildd/tests/test_rock.py @@ -75,7 +75,8 @@ class TestRockBuildManagerIteration(TestCase): "build-rock", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] if options is not None: @@ -129,7 +130,8 @@ class TestRockBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] @@ -156,7 +158,8 @@ class TestRockBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(RockBuildState.UMOUNT, self.getState()) @@ -202,7 +205,8 @@ class TestRockBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] @@ -229,7 +233,8 @@ class TestRockBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(RockBuildState.UMOUNT, self.getState()) diff --git a/lpbuildd/tests/test_snap.py b/lpbuildd/tests/test_snap.py index d234183..b713878 100644 --- a/lpbuildd/tests/test_snap.py +++ b/lpbuildd/tests/test_snap.py @@ -83,7 +83,8 @@ class TestSnapBuildManagerIteration(TestCase): "buildsnap", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] if options is not None: @@ -146,7 +147,8 @@ class TestSnapBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.BUILD_SNAP, self.getState()) @@ -172,7 +174,8 @@ class TestSnapBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.UMOUNT, self.getState()) @@ -217,7 +220,8 @@ class TestSnapBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.BUILD_SNAP, self.getState()) @@ -244,7 +248,8 @@ class TestSnapBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.UMOUNT, self.getState()) @@ -295,7 +300,8 @@ class TestSnapBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.BUILD_SNAP, self.getState()) @@ -322,7 +328,8 @@ class TestSnapBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.UMOUNT, self.getState()) @@ -367,7 +374,8 @@ class TestSnapBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.BUILD_SNAP, self.getState()) @@ -394,7 +402,8 @@ class TestSnapBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.UMOUNT, self.getState()) @@ -442,7 +451,8 @@ class TestSnapBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.BUILD_SNAP, self.getState()) @@ -482,7 +492,8 @@ class TestSnapBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.UMOUNT, self.getState()) @@ -535,7 +546,8 @@ class TestSnapBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.BUILD_SNAP, self.getState()) @@ -561,7 +573,8 @@ class TestSnapBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.UMOUNT, self.getState()) @@ -608,7 +621,8 @@ class TestSnapBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.BUILD_SNAP, self.getState()) @@ -635,7 +649,8 @@ class TestSnapBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.UMOUNT, self.getState()) @@ -678,7 +693,8 @@ class TestSnapBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.BUILD_SNAP, self.getState()) @@ -704,7 +720,8 @@ class TestSnapBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.UMOUNT, self.getState()) @@ -975,7 +992,8 @@ class TestSnapBuildManagerIteration(TestCase): "scan-for-processes", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.BUILD_SNAP, self.getState()) @@ -1001,7 +1019,8 @@ class TestSnapBuildManagerIteration(TestCase): "umount-chroot", "--backend=lxd", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SnapBuildState.UMOUNT, self.getState()) diff --git a/lpbuildd/tests/test_sourcepackagerecipe.py b/lpbuildd/tests/test_sourcepackagerecipe.py index 07490a3..2e3e4b1 100644 --- a/lpbuildd/tests/test_sourcepackagerecipe.py +++ b/lpbuildd/tests/test_sourcepackagerecipe.py @@ -169,7 +169,8 @@ class TestSourcePackageRecipeBuildManagerIteration(TestCase): "scan-for-processes", "--backend=chroot", "--series=maverick", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual( @@ -198,7 +199,8 @@ class TestSourcePackageRecipeBuildManagerIteration(TestCase): "umount-chroot", "--backend=chroot", "--series=maverick", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SourcePackageRecipeBuildState.UMOUNT, self.getState()) @@ -230,7 +232,8 @@ class TestSourcePackageRecipeBuildManagerIteration(TestCase): "scan-for-processes", "--backend=chroot", "--series=maverick", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual( @@ -253,7 +256,8 @@ class TestSourcePackageRecipeBuildManagerIteration(TestCase): "umount-chroot", "--backend=chroot", "--series=maverick", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SourcePackageRecipeBuildState.UMOUNT, self.getState()) @@ -281,7 +285,8 @@ class TestSourcePackageRecipeBuildManagerIteration(TestCase): "scan-for-processes", "--backend=chroot", "--series=maverick", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual( @@ -302,7 +307,8 @@ class TestSourcePackageRecipeBuildManagerIteration(TestCase): "umount-chroot", "--backend=chroot", "--series=maverick", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(SourcePackageRecipeBuildState.UMOUNT, self.getState()) diff --git a/lpbuildd/tests/test_translationtemplatesbuildmanager.py b/lpbuildd/tests/test_translationtemplatesbuildmanager.py index 6dfa695..8c4e14c 100644 --- a/lpbuildd/tests/test_translationtemplatesbuildmanager.py +++ b/lpbuildd/tests/test_translationtemplatesbuildmanager.py @@ -87,7 +87,8 @@ class TestTranslationTemplatesBuildManagerIteration(TestCase): "generate-translation-templates", "--backend=chroot", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, "--branch", url, @@ -114,7 +115,8 @@ class TestTranslationTemplatesBuildManagerIteration(TestCase): "scan-for-processes", "--backend=chroot", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual( @@ -144,7 +146,8 @@ class TestTranslationTemplatesBuildManagerIteration(TestCase): "umount-chroot", "--backend=chroot", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual( @@ -181,7 +184,8 @@ class TestTranslationTemplatesBuildManagerIteration(TestCase): "scan-for-processes", "--backend=chroot", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(expected_command, self.buildmanager.commands[-1]) @@ -201,7 +205,8 @@ class TestTranslationTemplatesBuildManagerIteration(TestCase): "umount-chroot", "--backend=chroot", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(expected_command, self.buildmanager.commands[-1]) @@ -231,7 +236,8 @@ class TestTranslationTemplatesBuildManagerIteration(TestCase): "scan-for-processes", "--backend=chroot", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual( @@ -254,7 +260,8 @@ class TestTranslationTemplatesBuildManagerIteration(TestCase): "umount-chroot", "--backend=chroot", "--series=xenial", - "--arch=i386", + "--abi-tag=i386", + "--isa-tag=i386", self.buildid, ] self.assertEqual(expected_command, self.buildmanager.commands[-1]) diff --git a/lpbuildd/util.py b/lpbuildd/util.py index f94b997..a27f0be 100644 --- a/lpbuildd/util.py +++ b/lpbuildd/util.py @@ -21,8 +21,8 @@ def shell_escape(s): return quote(s) -def get_arch_bits(arch): - if arch == "x32": +def get_arch_bits(abi_tag): + if abi_tag == "x32": # x32 is an exception: the userspace is 32-bit, but it expects to be # running on a 64-bit kernel. return 64 @@ -30,7 +30,7 @@ def get_arch_bits(arch): env = dict(os.environ) env.pop("DEB_HOST_ARCH_BITS", None) bits = subprocess.check_output( - ["dpkg-architecture", "-a%s" % arch, "-qDEB_HOST_ARCH_BITS"], + ["dpkg-architecture", "-a%s" % abi_tag, "-qDEB_HOST_ARCH_BITS"], env=env, universal_newlines=True, ).rstrip("\n") @@ -41,12 +41,12 @@ def get_arch_bits(arch): else: raise RuntimeError( "Don't know how to deal with architecture %s " - "(DEB_HOST_ARCH_BITS=%s)" % (arch, bits) + "(DEB_HOST_ARCH_BITS=%s)" % (abi_tag, bits) ) -def set_personality(args, arch, series=None): - bits = get_arch_bits(arch) +def set_personality(args, abi_tag, series=None): + bits = get_arch_bits(abi_tag) assert bits in (32, 64) if bits == 32: setarch_cmd = ["linux32"] diff --git a/sbuildrc b/sbuildrc index 008f034..7da1464 100644 --- a/sbuildrc +++ b/sbuildrc @@ -30,8 +30,10 @@ $build_environment = { # We want to expose almost nothing from the buildd environment. # DEB_BUILD_OPTIONS is set by sbuild-package. +# DEB_HOST_ARCH_VARIANT is set by binarypackage.py. $environment_filter = [ '^DEB_BUILD_OPTIONS$', + '^DEB_HOST_ARCH_VARIANT$', ]; # We're just going to throw the chroot away anyway.
_______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp