@@ -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