summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r--meta/lib/oeqa/runtime/_ptest.py16
-rw-r--r--meta/lib/oeqa/runtime/date.py4
-rw-r--r--meta/lib/oeqa/runtime/multilib.py2
-rw-r--r--meta/lib/oeqa/runtime/parselogs.py4
-rw-r--r--meta/lib/oeqa/runtime/rpm.py6
-rw-r--r--meta/lib/oeqa/runtime/scp.py2
-rw-r--r--meta/lib/oeqa/runtime/smart.py18
-rw-r--r--meta/lib/oeqa/runtime/systemd.py2
-rw-r--r--meta/lib/oeqa/runtime/x32lib.py2
9 files changed, 28 insertions, 28 deletions
diff --git a/meta/lib/oeqa/runtime/_ptest.py b/meta/lib/oeqa/runtime/_ptest.py
index 71324d3da2..cfb4041f18 100644
--- a/meta/lib/oeqa/runtime/_ptest.py
+++ b/meta/lib/oeqa/runtime/_ptest.py
@@ -13,7 +13,7 @@ def setUpModule():
13 skipModule("Image doesn't have package management feature") 13 skipModule("Image doesn't have package management feature")
14 if not oeRuntimeTest.hasPackage("smartpm"): 14 if not oeRuntimeTest.hasPackage("smartpm"):
15 skipModule("Image doesn't have smart installed") 15 skipModule("Image doesn't have smart installed")
16 if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES", True).split()[0]: 16 if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES").split()[0]:
17 skipModule("Rpm is not the primary package manager") 17 skipModule("Rpm is not the primary package manager")
18 18
19class PtestRunnerTest(oeRuntimeTest): 19class PtestRunnerTest(oeRuntimeTest):
@@ -57,7 +57,7 @@ class PtestRunnerTest(oeRuntimeTest):
57# (status, result) = oeRuntimeTest.tc.target.run('smart channel --show | grep "\["', 0) 57# (status, result) = oeRuntimeTest.tc.target.run('smart channel --show | grep "\["', 0)
58# for x in result.split("\n"): 58# for x in result.split("\n"):
59# self.existingchannels.add(x) 59# self.existingchannels.add(x)
60 self.repo_server = HTTPService(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR', True), oeRuntimeTest.tc.target.server_ip) 60 self.repo_server = HTTPService(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR'), oeRuntimeTest.tc.target.server_ip)
61 self.repo_server.start() 61 self.repo_server.start()
62 62
63 @classmethod 63 @classmethod
@@ -70,23 +70,23 @@ class PtestRunnerTest(oeRuntimeTest):
70# oeRuntimeTest.tc.target.run('smart channel --remove '+x[1:-1]+' -y', 0) 70# oeRuntimeTest.tc.target.run('smart channel --remove '+x[1:-1]+' -y', 0)
71 71
72 def add_smart_channel(self): 72 def add_smart_channel(self):
73 image_pkgtype = self.tc.d.getVar('IMAGE_PKGTYPE', True) 73 image_pkgtype = self.tc.d.getVar('IMAGE_PKGTYPE')
74 deploy_url = 'http://%s:%s/%s' %(self.target.server_ip, self.repo_server.port, image_pkgtype) 74 deploy_url = 'http://%s:%s/%s' %(self.target.server_ip, self.repo_server.port, image_pkgtype)
75 pkgarchs = self.tc.d.getVar('PACKAGE_ARCHS', True).replace("-","_").split() 75 pkgarchs = self.tc.d.getVar('PACKAGE_ARCHS').replace("-","_").split()
76 for arch in os.listdir('%s/%s' % (self.repo_server.root_dir, image_pkgtype)): 76 for arch in os.listdir('%s/%s' % (self.repo_server.root_dir, image_pkgtype)):
77 if arch in pkgarchs: 77 if arch in pkgarchs:
78 self.target.run('smart channel -y --add {a} type=rpm-md baseurl={u}/{a}'.format(a=arch, u=deploy_url), 0) 78 self.target.run('smart channel -y --add {a} type=rpm-md baseurl={u}/{a}'.format(a=arch, u=deploy_url), 0)
79 self.target.run('smart update', 0) 79 self.target.run('smart update', 0)
80 80
81 def install_complementary(self, globs=None): 81 def install_complementary(self, globs=None):
82 installed_pkgs_file = os.path.join(oeRuntimeTest.tc.d.getVar('WORKDIR', True), 82 installed_pkgs_file = os.path.join(oeRuntimeTest.tc.d.getVar('WORKDIR'),
83 "installed_pkgs.txt") 83 "installed_pkgs.txt")
84 self.pkgs_list = RpmPkgsList(oeRuntimeTest.tc.d, oeRuntimeTest.tc.d.getVar('IMAGE_ROOTFS', True), oeRuntimeTest.tc.d.getVar('arch_var', True), oeRuntimeTest.tc.d.getVar('os_var', True)) 84 self.pkgs_list = RpmPkgsList(oeRuntimeTest.tc.d, oeRuntimeTest.tc.d.getVar('IMAGE_ROOTFS'), oeRuntimeTest.tc.d.getVar('arch_var'), oeRuntimeTest.tc.d.getVar('os_var'))
85 with open(installed_pkgs_file, "w+") as installed_pkgs: 85 with open(installed_pkgs_file, "w+") as installed_pkgs:
86 installed_pkgs.write(self.pkgs_list.list("arch")) 86 installed_pkgs.write(self.pkgs_list.list("arch"))
87 87
88 cmd = [bb.utils.which(os.getenv('PATH'), "oe-pkgdata-util"), 88 cmd = [bb.utils.which(os.getenv('PATH'), "oe-pkgdata-util"),
89 "-p", oeRuntimeTest.tc.d.getVar('PKGDATA_DIR', True), "glob", installed_pkgs_file, 89 "-p", oeRuntimeTest.tc.d.getVar('PKGDATA_DIR'), "glob", installed_pkgs_file,
90 globs] 90 globs]
91 try: 91 try:
92 bb.note("Installing complementary packages ...") 92 bb.note("Installing complementary packages ...")
@@ -99,7 +99,7 @@ class PtestRunnerTest(oeRuntimeTest):
99 return complementary_pkgs.split() 99 return complementary_pkgs.split()
100 100
101 def setUpLocal(self): 101 def setUpLocal(self):
102 self.ptest_log = os.path.join(oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR",True), "ptest-%s.log" % oeRuntimeTest.tc.d.getVar('DATETIME', True)) 102 self.ptest_log = os.path.join(oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR",True), "ptest-%s.log" % oeRuntimeTest.tc.d.getVar('DATETIME'))
103 103
104 @skipUnlessPassed('test_ssh') 104 @skipUnlessPassed('test_ssh')
105 def test_ptestrunner(self): 105 def test_ptestrunner(self):
diff --git a/meta/lib/oeqa/runtime/date.py b/meta/lib/oeqa/runtime/date.py
index 447987e075..6f3516a92f 100644
--- a/meta/lib/oeqa/runtime/date.py
+++ b/meta/lib/oeqa/runtime/date.py
@@ -5,11 +5,11 @@ import re
5class DateTest(oeRuntimeTest): 5class DateTest(oeRuntimeTest):
6 6
7 def setUpLocal(self): 7 def setUpLocal(self):
8 if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", True) == "systemd": 8 if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager") == "systemd":
9 self.target.run('systemctl stop systemd-timesyncd') 9 self.target.run('systemctl stop systemd-timesyncd')
10 10
11 def tearDownLocal(self): 11 def tearDownLocal(self):
12 if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", True) == "systemd": 12 if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager") == "systemd":
13 self.target.run('systemctl start systemd-timesyncd') 13 self.target.run('systemctl start systemd-timesyncd')
14 14
15 @testcase(211) 15 @testcase(211)
diff --git a/meta/lib/oeqa/runtime/multilib.py b/meta/lib/oeqa/runtime/multilib.py
index 593d385021..5cce24f5f4 100644
--- a/meta/lib/oeqa/runtime/multilib.py
+++ b/meta/lib/oeqa/runtime/multilib.py
@@ -3,7 +3,7 @@ from oeqa.oetest import oeRuntimeTest, skipModule
3from oeqa.utils.decorators import * 3from oeqa.utils.decorators import *
4 4
5def setUpModule(): 5def setUpModule():
6 multilibs = oeRuntimeTest.tc.d.getVar("MULTILIBS", True) or "" 6 multilibs = oeRuntimeTest.tc.d.getVar("MULTILIBS") or ""
7 if "multilib:lib32" not in multilibs: 7 if "multilib:lib32" not in multilibs:
8 skipModule("this isn't a multilib:lib32 image") 8 skipModule("this isn't a multilib:lib32 image")
9 9
diff --git a/meta/lib/oeqa/runtime/parselogs.py b/meta/lib/oeqa/runtime/parselogs.py
index 3e1c7d0c30..cc2d0617f5 100644
--- a/meta/lib/oeqa/runtime/parselogs.py
+++ b/meta/lib/oeqa/runtime/parselogs.py
@@ -193,10 +193,10 @@ class ParseLogsTest(oeRuntimeTest):
193 self.ignore_errors[machine] = self.ignore_errors[machine] + video_related 193 self.ignore_errors[machine] = self.ignore_errors[machine] + video_related
194 194
195 def getMachine(self): 195 def getMachine(self):
196 return oeRuntimeTest.tc.d.getVar("MACHINE", True) 196 return oeRuntimeTest.tc.d.getVar("MACHINE")
197 197
198 def getWorkdir(self): 198 def getWorkdir(self):
199 return oeRuntimeTest.tc.d.getVar("WORKDIR", True) 199 return oeRuntimeTest.tc.d.getVar("WORKDIR")
200 200
201 #get some information on the CPU of the machine to display at the beginning of the output. This info might be useful in some cases. 201 #get some information on the CPU of the machine to display at the beginning of the output. This info might be useful in some cases.
202 def getHardwareInfo(self): 202 def getHardwareInfo(self):
diff --git a/meta/lib/oeqa/runtime/rpm.py b/meta/lib/oeqa/runtime/rpm.py
index 7f514ca00c..f1c4763fc0 100644
--- a/meta/lib/oeqa/runtime/rpm.py
+++ b/meta/lib/oeqa/runtime/rpm.py
@@ -7,7 +7,7 @@ from oeqa.utils.decorators import *
7def setUpModule(): 7def setUpModule():
8 if not oeRuntimeTest.hasFeature("package-management"): 8 if not oeRuntimeTest.hasFeature("package-management"):
9 skipModule("rpm module skipped: target doesn't have package-management in IMAGE_FEATURES") 9 skipModule("rpm module skipped: target doesn't have package-management in IMAGE_FEATURES")
10 if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES", True).split()[0]: 10 if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES").split()[0]:
11 skipModule("rpm module skipped: target doesn't have rpm as primary package manager") 11 skipModule("rpm module skipped: target doesn't have rpm as primary package manager")
12 12
13 13
@@ -29,8 +29,8 @@ class RpmInstallRemoveTest(oeRuntimeTest):
29 29
30 @classmethod 30 @classmethod
31 def setUpClass(self): 31 def setUpClass(self):
32 pkgarch = oeRuntimeTest.tc.d.getVar('TUNE_PKGARCH', True).replace("-", "_") 32 pkgarch = oeRuntimeTest.tc.d.getVar('TUNE_PKGARCH').replace("-", "_")
33 rpmdir = os.path.join(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR', True), "rpm", pkgarch) 33 rpmdir = os.path.join(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR'), "rpm", pkgarch)
34 # pick rpm-doc as a test file to get installed, because it's small and it will always be built for standard targets 34 # pick rpm-doc as a test file to get installed, because it's small and it will always be built for standard targets
35 for f in fnmatch.filter(os.listdir(rpmdir), "rpm-doc-*.%s.rpm" % pkgarch): 35 for f in fnmatch.filter(os.listdir(rpmdir), "rpm-doc-*.%s.rpm" % pkgarch):
36 testrpmfile = f 36 testrpmfile = f
diff --git a/meta/lib/oeqa/runtime/scp.py b/meta/lib/oeqa/runtime/scp.py
index 48e87d2d0b..cf36cfa5d5 100644
--- a/meta/lib/oeqa/runtime/scp.py
+++ b/meta/lib/oeqa/runtime/scp.py
@@ -11,7 +11,7 @@ class ScpTest(oeRuntimeTest):
11 @testcase(220) 11 @testcase(220)
12 @skipUnlessPassed('test_ssh') 12 @skipUnlessPassed('test_ssh')
13 def test_scp_file(self): 13 def test_scp_file(self):
14 test_log_dir = oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR", True) 14 test_log_dir = oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR")
15 test_file_path = os.path.join(test_log_dir, 'test_scp_file') 15 test_file_path = os.path.join(test_log_dir, 'test_scp_file')
16 with open(test_file_path, 'w') as test_scp_file: 16 with open(test_file_path, 'w') as test_scp_file:
17 test_scp_file.seek(2 ** 22 - 1) 17 test_scp_file.seek(2 ** 22 - 1)
diff --git a/meta/lib/oeqa/runtime/smart.py b/meta/lib/oeqa/runtime/smart.py
index 6cdb10d631..dde1c4d792 100644
--- a/meta/lib/oeqa/runtime/smart.py
+++ b/meta/lib/oeqa/runtime/smart.py
@@ -11,7 +11,7 @@ def setUpModule():
11 skipModule("Image doesn't have package management feature") 11 skipModule("Image doesn't have package management feature")
12 if not oeRuntimeTest.hasPackage("smartpm"): 12 if not oeRuntimeTest.hasPackage("smartpm"):
13 skipModule("Image doesn't have smart installed") 13 skipModule("Image doesn't have smart installed")
14 if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES", True).split()[0]: 14 if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES").split()[0]:
15 skipModule("Rpm is not the primary package manager") 15 skipModule("Rpm is not the primary package manager")
16 16
17class SmartTest(oeRuntimeTest): 17class SmartTest(oeRuntimeTest):
@@ -75,16 +75,16 @@ class SmartRepoTest(SmartTest):
75 rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo") 75 rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo")
76 index_cmds = [] 76 index_cmds = []
77 rpm_dirs_found = False 77 rpm_dirs_found = False
78 archs = (oeRuntimeTest.tc.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").replace('-', '_').split() 78 archs = (oeRuntimeTest.tc.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or "").replace('-', '_').split()
79 for arch in archs: 79 for arch in archs:
80 rpm_dir = os.path.join(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR_RPM', True), arch) 80 rpm_dir = os.path.join(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR_RPM'), arch)
81 idx_path = os.path.join(oeRuntimeTest.tc.d.getVar('WORKDIR', True), 'rpm', arch) 81 idx_path = os.path.join(oeRuntimeTest.tc.d.getVar('WORKDIR'), 'rpm', arch)
82 db_path = os.path.join(oeRuntimeTest.tc.d.getVar('WORKDIR', True), 'rpmdb', arch) 82 db_path = os.path.join(oeRuntimeTest.tc.d.getVar('WORKDIR'), 'rpmdb', arch)
83 if not os.path.isdir(rpm_dir): 83 if not os.path.isdir(rpm_dir):
84 continue 84 continue
85 if os.path.exists(db_path): 85 if os.path.exists(db_path):
86 bb.utils.remove(dbpath, True) 86 bb.utils.remove(dbpath, True)
87 lockfilename = oeRuntimeTest.tc.d.getVar('DEPLOY_DIR_RPM', True) + "/rpm.lock" 87 lockfilename = oeRuntimeTest.tc.d.getVar('DEPLOY_DIR_RPM') + "/rpm.lock"
88 lf = bb.utils.lockfile(lockfilename, False) 88 lf = bb.utils.lockfile(lockfilename, False)
89 oe.path.copyhardlinktree(rpm_dir, idx_path) 89 oe.path.copyhardlinktree(rpm_dir, idx_path)
90 # Full indexes overload a 256MB image so reduce the number of rpms 90 # Full indexes overload a 256MB image so reduce the number of rpms
@@ -98,7 +98,7 @@ class SmartRepoTest(SmartTest):
98 result = oe.utils.multiprocess_exec(index_cmds, self.create_index) 98 result = oe.utils.multiprocess_exec(index_cmds, self.create_index)
99 if result: 99 if result:
100 bb.fatal('%s' % ('\n'.join(result))) 100 bb.fatal('%s' % ('\n'.join(result)))
101 self.repo_server = HTTPService(oeRuntimeTest.tc.d.getVar('WORKDIR', True), oeRuntimeTest.tc.target.server_ip) 101 self.repo_server = HTTPService(oeRuntimeTest.tc.d.getVar('WORKDIR'), oeRuntimeTest.tc.target.server_ip)
102 self.repo_server.start() 102 self.repo_server.start()
103 103
104 @classmethod 104 @classmethod
@@ -113,9 +113,9 @@ class SmartRepoTest(SmartTest):
113 113
114 @testcase(719) 114 @testcase(719)
115 def test_smart_channel_add(self): 115 def test_smart_channel_add(self):
116 image_pkgtype = self.tc.d.getVar('IMAGE_PKGTYPE', True) 116 image_pkgtype = self.tc.d.getVar('IMAGE_PKGTYPE')
117 deploy_url = 'http://%s:%s/%s' %(self.target.server_ip, self.repo_server.port, image_pkgtype) 117 deploy_url = 'http://%s:%s/%s' %(self.target.server_ip, self.repo_server.port, image_pkgtype)
118 pkgarchs = self.tc.d.getVar('PACKAGE_ARCHS', True).replace("-","_").split() 118 pkgarchs = self.tc.d.getVar('PACKAGE_ARCHS').replace("-","_").split()
119 for arch in os.listdir('%s/%s' % (self.repo_server.root_dir, image_pkgtype)): 119 for arch in os.listdir('%s/%s' % (self.repo_server.root_dir, image_pkgtype)):
120 if arch in pkgarchs: 120 if arch in pkgarchs:
121 self.smart('channel -y --add {a} type=rpm-md baseurl={u}/{a}'.format(a=arch, u=deploy_url)) 121 self.smart('channel -y --add {a} type=rpm-md baseurl={u}/{a}'.format(a=arch, u=deploy_url))
diff --git a/meta/lib/oeqa/runtime/systemd.py b/meta/lib/oeqa/runtime/systemd.py
index 8de799cd63..52feb1b31e 100644
--- a/meta/lib/oeqa/runtime/systemd.py
+++ b/meta/lib/oeqa/runtime/systemd.py
@@ -6,7 +6,7 @@ from oeqa.utils.decorators import *
6def setUpModule(): 6def setUpModule():
7 if not oeRuntimeTest.hasFeature("systemd"): 7 if not oeRuntimeTest.hasFeature("systemd"):
8 skipModule("target doesn't have systemd in DISTRO_FEATURES") 8 skipModule("target doesn't have systemd in DISTRO_FEATURES")
9 if "systemd" != oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", True): 9 if "systemd" != oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager"):
10 skipModule("systemd is not the init manager for this image") 10 skipModule("systemd is not the init manager for this image")
11 11
12 12
diff --git a/meta/lib/oeqa/runtime/x32lib.py b/meta/lib/oeqa/runtime/x32lib.py
index ce5e214035..2f98dbf71e 100644
--- a/meta/lib/oeqa/runtime/x32lib.py
+++ b/meta/lib/oeqa/runtime/x32lib.py
@@ -4,7 +4,7 @@ from oeqa.utils.decorators import *
4 4
5def setUpModule(): 5def setUpModule():
6 #check if DEFAULTTUNE is set and it's value is: x86-64-x32 6 #check if DEFAULTTUNE is set and it's value is: x86-64-x32
7 defaulttune = oeRuntimeTest.tc.d.getVar("DEFAULTTUNE", True) 7 defaulttune = oeRuntimeTest.tc.d.getVar("DEFAULTTUNE")
8 if "x86-64-x32" not in defaulttune: 8 if "x86-64-x32" not in defaulttune:
9 skipModule("DEFAULTTUNE is not set to x86-64-x32") 9 skipModule("DEFAULTTUNE is not set to x86-64-x32")
10 10