diff mbox series

[1/1] ubuntu_lxc: lxc-tests is deprecated - fetch tests from origin

Message ID 20180529055100.11093-1-khalid.elmously@canonical.com
State New
Headers show
Series [1/1] ubuntu_lxc: lxc-tests is deprecated - fetch tests from origin | expand

Commit Message

Khalid Elmously May 29, 2018, 5:51 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1772507

The lxc-tests package doesn't exist anymore. Instead, clone the 'lxc' repo from github and copy the tests to /usr/bin

Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
---
 ubuntu_lxc/ubuntu_lxc.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Po-Hsu Lin May 29, 2018, 6:49 a.m. UTC | #1
lxc-utils only exist in Bonic and later.
This will break the lxc-test on all the older releases.
Khalid Elmously May 30, 2018, 5:27 a.m. UTC | #2
Thanks. V2 sent.

On 2018-05-29 14:49:52 , Po-Hsu Lin wrote:
> lxc-utils only exist in Bonic and later.
> This will break the lxc-test on all the older releases.
Colin Ian King May 31, 2018, 10:01 a.m. UTC | #3
On 29/05/18 07:49, Po-Hsu Lin wrote:
> lxc-utils only exist in Bonic and later.
> This will break the lxc-test on all the older releases.
> 
It's always a good idea to check these changes on older releases before
sending a patch.

Colin
diff mbox series

Patch

diff --git a/ubuntu_lxc/ubuntu_lxc.py b/ubuntu_lxc/ubuntu_lxc.py
index 7bdd1996..71168154 100644
--- a/ubuntu_lxc/ubuntu_lxc.py
+++ b/ubuntu_lxc/ubuntu_lxc.py
@@ -11,15 +11,17 @@  class ubuntu_lxc(test.test):
         series = platform.dist()[2]
 
         pkgs = [
-            'lxc-tests',
+            'lxc-utils',
             'liblxc1'
         ]
 
-        cmd = 'apt-get install --yes --force-yes ' + ' '.join(pkgs)
+        cmd = 'apt-get install --yes ' + ' '.join(pkgs)
         self.results = utils.system_output(cmd, retain_output=True)
 
     def initialize(self):
         self.install_required_pkgs()
+        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