From patchwork Wed May 30 05:25:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khalid Elmously X-Patchwork-Id: 922534 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40wfGV52bHz9s1R; Wed, 30 May 2018 15:26:42 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1fNtd2-0000Zo-KR; Wed, 30 May 2018 05:26:32 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1fNtd1-0000Zi-PZ for kernel-team@lists.ubuntu.com; Wed, 30 May 2018 05:26:31 +0000 Received: from mail-io0-f197.google.com ([209.85.223.197]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1fNtd1-00053A-FX for kernel-team@lists.ubuntu.com; Wed, 30 May 2018 05:26:31 +0000 Received: by mail-io0-f197.google.com with SMTP id a10-v6so8293715iod.22 for ; Tue, 29 May 2018 22:26:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=iyO168kmZnET2xNDAkXiudkz2Sg6YoXo4P6w0xvkv0A=; b=QAjbmjuUvMdNonQMHUc3pZPVbFN7PLahhdMFROIngIf2zm8cXjoZQYuqK6kL/7FZb1 rY8TKnnWAD+mDaIEYHFiX9NvHZHssFM3vL8p+Q5usxTnT1oE/X2oHkfe3eu1S5r4F3Ta /JeWySI3yXe2UIODUaMzdY6oBmRwJ+0Y0G3vE1c8mffGxF+qCmNmuR+W0wIiN0oPk4AG VVOJ2OvibwQQWSo8iApGQqQ2ZoJjKoNovX9Ct/81eSR8NOsYxzBRjS0QCjIXF4iGPAUH tBlOSoLOs4HRed0AzZUrYJcbgei+yxRyUCKLEOEfq6hHHfXSWuNiTERj/BedGY1jzzcf I7Vw== X-Gm-Message-State: APt69E2ljET/QJvJqc/RA/E6R0l/bTd9PftPg7NQSbSPr/tFPsMKlQck lMkYHs4UpieH/fuFwx3mtPvxSHqPrQyc4lKwQUkIg1iptde7NNc7m0IVCIwlDbcKjh8VG8c0twJ +aS0ikLt7wjTMknQG5r2fdnUH7MEfAnLjXSrIOdQ2zA== X-Received: by 2002:a24:6702:: with SMTP id u2-v6mr378958itc.36.1527657990018; Tue, 29 May 2018 22:26:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIwSymeZ88fWZnMV4WHcOoHUFovA5qtgQD4+nAY2qATQVK2ezItU35vbZiM6BTuiDedEMZCcg== X-Received: by 2002:a24:6702:: with SMTP id u2-v6mr378945itc.36.1527657989857; Tue, 29 May 2018 22:26:29 -0700 (PDT) Received: from kbuntu.fuzzbuzz.org (198-84-180-15.cpe.teksavvy.com. [198.84.180.15]) by smtp.gmail.com with ESMTPSA id e139-v6sm138268ite.1.2018.05.29.22.26.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 May 2018 22:26:28 -0700 (PDT) From: Khalid Elmously To: kernel-team@lists.ubuntu.com Subject: [PATCH v2 1/1] ubuntu_lxc: lxc-tests is deprecated - fetch tests from origin Date: Wed, 30 May 2018 01:25:34 -0400 Message-Id: <20180530052534.16613-1-khalid.elmously@canonical.com> X-Mailer: git-send-email 2.17.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Khalid El Mously BugLink: https://bugs.launchpad.net/bugs/1772507 The lxc-tests package doesn't exist in Bionic and later. For those releases, clone the 'lxc' repo from github and copy the tests to /usr/bin Tested on Xenial and Bionic Signed-off-by: Khalid Elmously Acked-by: Po-Hsu Lin --- ubuntu_lxc/ubuntu_lxc.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ubuntu_lxc/ubuntu_lxc.py b/ubuntu_lxc/ubuntu_lxc.py index 7bdd1996..38aaf829 100644 --- a/ubuntu_lxc/ubuntu_lxc.py +++ b/ubuntu_lxc/ubuntu_lxc.py @@ -7,19 +7,26 @@ class ubuntu_lxc(test.test): version = 1 def install_required_pkgs(self): - arch = platform.processor() series = platform.dist()[2] pkgs = [ - 'lxc-tests', 'liblxc1' ] - cmd = 'apt-get install --yes --force-yes ' + ' '.join(pkgs) + if series in ['precise', 'trusty', 'xenial', 'artful']: + pkgs.append('lxc-tests') + else: + pkgs.append('lxc-utils') + + cmd = 'apt-get install --yes ' + ' '.join(pkgs) self.results = utils.system_output(cmd, retain_output=True) def initialize(self): self.install_required_pkgs() + series = platform.dist()[2] + if series not in ['precise', 'trusty', 'xenial', 'artful']: + self.results = utils.system_output('git clone https://github.com/lxc/lxc.git', retain_output=True) + self.results = utils.system_output('sudo find lxc/src/tests -type f -name "lxc-test-*" -executable -exec cp {} /usr/bin/ \;', retain_output=True) def run_once(self, test_name): cmd = '/bin/sh %s/exercise' % self.bindir