diff options
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/controllers/masterimage.py | 16 | ||||
-rw-r--r-- | meta/lib/oeqa/oetest.py | 60 | ||||
-rwxr-xr-x | meta/lib/oeqa/runexported.py | 8 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/_ptest.py | 16 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/date.py | 4 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/multilib.py | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/parselogs.py | 4 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/rpm.py | 6 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/scp.py | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/smart.py | 18 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/systemd.py | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/x32lib.py | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/sdk/gcc.py | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/tinfoil.py | 16 | ||||
-rw-r--r-- | meta/lib/oeqa/targetcontrol.py | 52 | ||||
-rw-r--r-- | meta/lib/oeqa/utils/commands.py | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/utils/dump.py | 4 | ||||
-rw-r--r-- | meta/lib/oeqa/utils/package_manager.py | 12 | ||||
-rw-r--r-- | meta/lib/oeqa/utils/targetbuild.py | 8 | ||||
-rw-r--r-- | meta/lib/oeqa/utils/testexport.py | 14 |
20 files changed, 125 insertions, 125 deletions
diff --git a/meta/lib/oeqa/controllers/masterimage.py b/meta/lib/oeqa/controllers/masterimage.py index 9ce3bf803d..d796fc3c30 100644 --- a/meta/lib/oeqa/controllers/masterimage.py +++ b/meta/lib/oeqa/controllers/masterimage.py | |||
@@ -32,14 +32,14 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta | |||
32 | super(MasterImageHardwareTarget, self).__init__(d) | 32 | super(MasterImageHardwareTarget, self).__init__(d) |
33 | 33 | ||
34 | # target ip | 34 | # target ip |
35 | addr = d.getVar("TEST_TARGET_IP", True) or bb.fatal('Please set TEST_TARGET_IP with the IP address of the machine you want to run the tests on.') | 35 | addr = d.getVar("TEST_TARGET_IP") or bb.fatal('Please set TEST_TARGET_IP with the IP address of the machine you want to run the tests on.') |
36 | self.ip = addr.split(":")[0] | 36 | self.ip = addr.split(":")[0] |
37 | try: | 37 | try: |
38 | self.port = addr.split(":")[1] | 38 | self.port = addr.split(":")[1] |
39 | except IndexError: | 39 | except IndexError: |
40 | self.port = None | 40 | self.port = None |
41 | bb.note("Target IP: %s" % self.ip) | 41 | bb.note("Target IP: %s" % self.ip) |
42 | self.server_ip = d.getVar("TEST_SERVER_IP", True) | 42 | self.server_ip = d.getVar("TEST_SERVER_IP") |
43 | if not self.server_ip: | 43 | if not self.server_ip: |
44 | try: | 44 | try: |
45 | self.server_ip = subprocess.check_output(['ip', 'route', 'get', self.ip ]).split("\n")[0].split()[-1] | 45 | self.server_ip = subprocess.check_output(['ip', 'route', 'get', self.ip ]).split("\n")[0].split()[-1] |
@@ -49,8 +49,8 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta | |||
49 | 49 | ||
50 | # test rootfs + kernel | 50 | # test rootfs + kernel |
51 | self.image_fstype = self.get_image_fstype(d) | 51 | self.image_fstype = self.get_image_fstype(d) |
52 | self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype) | 52 | self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), d.getVar("IMAGE_LINK_NAME") + '.' + self.image_fstype) |
53 | self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin') | 53 | self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin') |
54 | if not os.path.isfile(self.rootfs): | 54 | if not os.path.isfile(self.rootfs): |
55 | # we could've checked that IMAGE_FSTYPES contains tar.gz but the config for running testimage might not be | 55 | # we could've checked that IMAGE_FSTYPES contains tar.gz but the config for running testimage might not be |
56 | # the same as the config with which the image was build, ie | 56 | # the same as the config with which the image was build, ie |
@@ -64,16 +64,16 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta | |||
64 | # master ssh connection | 64 | # master ssh connection |
65 | self.master = None | 65 | self.master = None |
66 | # if the user knows what they are doing, then by all means... | 66 | # if the user knows what they are doing, then by all means... |
67 | self.user_cmds = d.getVar("TEST_DEPLOY_CMDS", True) | 67 | self.user_cmds = d.getVar("TEST_DEPLOY_CMDS") |
68 | self.deploy_cmds = None | 68 | self.deploy_cmds = None |
69 | 69 | ||
70 | # this is the name of the command that controls the power for a board | 70 | # this is the name of the command that controls the power for a board |
71 | # e.g: TEST_POWERCONTROL_CMD = "/home/user/myscripts/powercontrol.py ${MACHINE} what-ever-other-args-the-script-wants" | 71 | # e.g: TEST_POWERCONTROL_CMD = "/home/user/myscripts/powercontrol.py ${MACHINE} what-ever-other-args-the-script-wants" |
72 | # the command should take as the last argument "off" and "on" and "cycle" (off, on) | 72 | # the command should take as the last argument "off" and "on" and "cycle" (off, on) |
73 | self.powercontrol_cmd = d.getVar("TEST_POWERCONTROL_CMD", True) or None | 73 | self.powercontrol_cmd = d.getVar("TEST_POWERCONTROL_CMD") or None |
74 | self.powercontrol_args = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS", False) or "" | 74 | self.powercontrol_args = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS", False) or "" |
75 | 75 | ||
76 | self.serialcontrol_cmd = d.getVar("TEST_SERIALCONTROL_CMD", True) or None | 76 | self.serialcontrol_cmd = d.getVar("TEST_SERIALCONTROL_CMD") or None |
77 | self.serialcontrol_args = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS", False) or "" | 77 | self.serialcontrol_args = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS", False) or "" |
78 | 78 | ||
79 | self.origenv = os.environ | 79 | self.origenv = os.environ |
@@ -82,7 +82,7 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta | |||
82 | # ssh + keys means we need the original user env | 82 | # ssh + keys means we need the original user env |
83 | bborigenv = d.getVar("BB_ORIGENV", False) or {} | 83 | bborigenv = d.getVar("BB_ORIGENV", False) or {} |
84 | for key in bborigenv: | 84 | for key in bborigenv: |
85 | val = bborigenv.getVar(key, True) | 85 | val = bborigenv.getVar(key) |
86 | if val is not None: | 86 | if val is not None: |
87 | self.origenv[key] = str(val) | 87 | self.origenv[key] = str(val) |
88 | 88 | ||
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index 95d3bf72fc..d1aef967e4 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py | |||
@@ -221,15 +221,15 @@ class TestContext(object): | |||
221 | path = [os.path.dirname(os.path.abspath(__file__))] | 221 | path = [os.path.dirname(os.path.abspath(__file__))] |
222 | extrapath = "" | 222 | extrapath = "" |
223 | else: | 223 | else: |
224 | path = d.getVar("BBPATH", True).split(':') | 224 | path = d.getVar("BBPATH").split(':') |
225 | extrapath = "lib/oeqa" | 225 | extrapath = "lib/oeqa" |
226 | 226 | ||
227 | self.testslist = self._get_tests_list(path, extrapath) | 227 | self.testslist = self._get_tests_list(path, extrapath) |
228 | self.testsrequired = self._get_test_suites_required() | 228 | self.testsrequired = self._get_test_suites_required() |
229 | 229 | ||
230 | self.filesdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "runtime/files") | 230 | self.filesdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "runtime/files") |
231 | self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split() | 231 | self.imagefeatures = d.getVar("IMAGE_FEATURES").split() |
232 | self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split() | 232 | self.distrofeatures = d.getVar("DISTRO_FEATURES").split() |
233 | 233 | ||
234 | # get testcase list from specified file | 234 | # get testcase list from specified file |
235 | # if path is a relative path, then relative to build/conf/ | 235 | # if path is a relative path, then relative to build/conf/ |
@@ -406,9 +406,9 @@ class RuntimeTestContext(TestContext): | |||
406 | self.target = target | 406 | self.target = target |
407 | 407 | ||
408 | self.pkgmanifest = {} | 408 | self.pkgmanifest = {} |
409 | manifest = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), | 409 | manifest = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), |
410 | d.getVar("IMAGE_LINK_NAME", True) + ".manifest") | 410 | d.getVar("IMAGE_LINK_NAME") + ".manifest") |
411 | nomanifest = d.getVar("IMAGE_NO_MANIFEST", True) | 411 | nomanifest = d.getVar("IMAGE_NO_MANIFEST") |
412 | if nomanifest is None or nomanifest != "1": | 412 | if nomanifest is None or nomanifest != "1": |
413 | try: | 413 | try: |
414 | with open(manifest) as f: | 414 | with open(manifest) as f: |
@@ -424,19 +424,19 @@ class RuntimeTestContext(TestContext): | |||
424 | def _get_test_suites(self): | 424 | def _get_test_suites(self): |
425 | testsuites = [] | 425 | testsuites = [] |
426 | 426 | ||
427 | manifests = (self.d.getVar("TEST_SUITES_MANIFEST", True) or '').split() | 427 | manifests = (self.d.getVar("TEST_SUITES_MANIFEST") or '').split() |
428 | if manifests: | 428 | if manifests: |
429 | for manifest in manifests: | 429 | for manifest in manifests: |
430 | testsuites.extend(self._read_testlist(manifest, | 430 | testsuites.extend(self._read_testlist(manifest, |
431 | self.d.getVar("TOPDIR", True)).split()) | 431 | self.d.getVar("TOPDIR")).split()) |
432 | 432 | ||
433 | else: | 433 | else: |
434 | testsuites = self.d.getVar("TEST_SUITES", True).split() | 434 | testsuites = self.d.getVar("TEST_SUITES").split() |
435 | 435 | ||
436 | return testsuites | 436 | return testsuites |
437 | 437 | ||
438 | def _get_test_suites_required(self): | 438 | def _get_test_suites_required(self): |
439 | return [t for t in self.d.getVar("TEST_SUITES", True).split() if t != "auto"] | 439 | return [t for t in self.d.getVar("TEST_SUITES").split() if t != "auto"] |
440 | 440 | ||
441 | def loadTests(self): | 441 | def loadTests(self): |
442 | super(RuntimeTestContext, self).loadTests() | 442 | super(RuntimeTestContext, self).loadTests() |
@@ -449,10 +449,10 @@ class RuntimeTestContext(TestContext): | |||
449 | """ | 449 | """ |
450 | 450 | ||
451 | modules = self.getTestModules() | 451 | modules = self.getTestModules() |
452 | bbpaths = self.d.getVar("BBPATH", True).split(":") | 452 | bbpaths = self.d.getVar("BBPATH").split(":") |
453 | 453 | ||
454 | shutil.rmtree(self.d.getVar("TEST_EXTRACTED_DIR", True)) | 454 | shutil.rmtree(self.d.getVar("TEST_EXTRACTED_DIR")) |
455 | shutil.rmtree(self.d.getVar("TEST_PACKAGED_DIR", True)) | 455 | shutil.rmtree(self.d.getVar("TEST_PACKAGED_DIR")) |
456 | for module in modules: | 456 | for module in modules: |
457 | json_file = self._getJsonFile(module) | 457 | json_file = self._getJsonFile(module) |
458 | if json_file: | 458 | if json_file: |
@@ -466,8 +466,8 @@ class RuntimeTestContext(TestContext): | |||
466 | 466 | ||
467 | import oe.path | 467 | import oe.path |
468 | 468 | ||
469 | extracted_path = self.d.getVar("TEST_EXTRACTED_DIR", True) | 469 | extracted_path = self.d.getVar("TEST_EXTRACTED_DIR") |
470 | packaged_path = self.d.getVar("TEST_PACKAGED_DIR", True) | 470 | packaged_path = self.d.getVar("TEST_PACKAGED_DIR") |
471 | 471 | ||
472 | for key,value in needed_packages.items(): | 472 | for key,value in needed_packages.items(): |
473 | packages = () | 473 | packages = () |
@@ -548,7 +548,7 @@ class RuntimeTestContext(TestContext): | |||
548 | 548 | ||
549 | from oeqa.utils.package_manager import get_package_manager | 549 | from oeqa.utils.package_manager import get_package_manager |
550 | 550 | ||
551 | pkg_path = os.path.join(self.d.getVar("TEST_INSTALL_TMP_DIR", True), pkg) | 551 | pkg_path = os.path.join(self.d.getVar("TEST_INSTALL_TMP_DIR"), pkg) |
552 | pm = get_package_manager(self.d, pkg_path) | 552 | pm = get_package_manager(self.d, pkg_path) |
553 | extract_dir = pm.extract(pkg) | 553 | extract_dir = pm.extract(pkg) |
554 | shutil.rmtree(pkg_path) | 554 | shutil.rmtree(pkg_path) |
@@ -562,8 +562,8 @@ class RuntimeTestContext(TestContext): | |||
562 | 562 | ||
563 | from oeqa.utils.package_manager import get_package_manager | 563 | from oeqa.utils.package_manager import get_package_manager |
564 | 564 | ||
565 | pkg_path = os.path.join(self.d.getVar("TEST_INSTALL_TMP_DIR", True), pkg) | 565 | pkg_path = os.path.join(self.d.getVar("TEST_INSTALL_TMP_DIR"), pkg) |
566 | dst_dir = self.d.getVar("TEST_PACKAGED_DIR", True) | 566 | dst_dir = self.d.getVar("TEST_PACKAGED_DIR") |
567 | pm = get_package_manager(self.d, pkg_path) | 567 | pm = get_package_manager(self.d, pkg_path) |
568 | pkg_info = pm.package_info(pkg) | 568 | pkg_info = pm.package_info(pkg) |
569 | file_path = pkg_info[pkg]["filepath"] | 569 | file_path = pkg_info[pkg]["filepath"] |
@@ -611,7 +611,7 @@ class ImageTestContext(RuntimeTestContext): | |||
611 | def __init__(self, d, target, host_dumper): | 611 | def __init__(self, d, target, host_dumper): |
612 | super(ImageTestContext, self).__init__(d, target) | 612 | super(ImageTestContext, self).__init__(d, target) |
613 | 613 | ||
614 | self.tagexp = d.getVar("TEST_SUITES_TAGS", True) | 614 | self.tagexp = d.getVar("TEST_SUITES_TAGS") |
615 | 615 | ||
616 | self.host_dumper = host_dumper | 616 | self.host_dumper = host_dumper |
617 | 617 | ||
@@ -629,7 +629,7 @@ class ImageTestContext(RuntimeTestContext): | |||
629 | Check if the test requires a package and Install/Unistall it in the DUT | 629 | Check if the test requires a package and Install/Unistall it in the DUT |
630 | """ | 630 | """ |
631 | 631 | ||
632 | pkg_dir = self.d.getVar("TEST_EXTRACTED_DIR", True) | 632 | pkg_dir = self.d.getVar("TEST_EXTRACTED_DIR") |
633 | super(ImageTestContext, self).install_uninstall_packages(test_id, pkg_dir, install) | 633 | super(ImageTestContext, self).install_uninstall_packages(test_id, pkg_dir, install) |
634 | 634 | ||
635 | class ExportTestContext(RuntimeTestContext): | 635 | class ExportTestContext(RuntimeTestContext): |
@@ -643,7 +643,7 @@ class ExportTestContext(RuntimeTestContext): | |||
643 | super(ExportTestContext, self).__init__(d, target, exported) | 643 | super(ExportTestContext, self).__init__(d, target, exported) |
644 | 644 | ||
645 | tag = parsedArgs.get("tag", None) | 645 | tag = parsedArgs.get("tag", None) |
646 | self.tagexp = tag if tag != None else d.getVar("TEST_SUITES_TAGS", True) | 646 | self.tagexp = tag if tag != None else d.getVar("TEST_SUITES_TAGS") |
647 | 647 | ||
648 | self.sigterm = None | 648 | self.sigterm = None |
649 | 649 | ||
@@ -653,7 +653,7 @@ class ExportTestContext(RuntimeTestContext): | |||
653 | """ | 653 | """ |
654 | 654 | ||
655 | export_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) | 655 | export_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) |
656 | extracted_dir = self.d.getVar("TEST_EXPORT_EXTRACTED_DIR", True) | 656 | extracted_dir = self.d.getVar("TEST_EXPORT_EXTRACTED_DIR") |
657 | pkg_dir = os.path.join(export_dir, extracted_dir) | 657 | pkg_dir = os.path.join(export_dir, extracted_dir) |
658 | super(ExportTestContext, self).install_uninstall_packages(test_id, pkg_dir, install) | 658 | super(ExportTestContext, self).install_uninstall_packages(test_id, pkg_dir, install) |
659 | 659 | ||
@@ -666,7 +666,7 @@ class SDKTestContext(TestContext): | |||
666 | self.tcname = tcname | 666 | self.tcname = tcname |
667 | 667 | ||
668 | if not hasattr(self, 'target_manifest'): | 668 | if not hasattr(self, 'target_manifest'): |
669 | self.target_manifest = d.getVar("SDK_TARGET_MANIFEST", True) | 669 | self.target_manifest = d.getVar("SDK_TARGET_MANIFEST") |
670 | try: | 670 | try: |
671 | self.pkgmanifest = {} | 671 | self.pkgmanifest = {} |
672 | with open(self.target_manifest) as f: | 672 | with open(self.target_manifest) as f: |
@@ -677,7 +677,7 @@ class SDKTestContext(TestContext): | |||
677 | bb.fatal("No package manifest file found. Did you build the sdk image?\n%s" % e) | 677 | bb.fatal("No package manifest file found. Did you build the sdk image?\n%s" % e) |
678 | 678 | ||
679 | if not hasattr(self, 'host_manifest'): | 679 | if not hasattr(self, 'host_manifest'): |
680 | self.host_manifest = d.getVar("SDK_HOST_MANIFEST", True) | 680 | self.host_manifest = d.getVar("SDK_HOST_MANIFEST") |
681 | try: | 681 | try: |
682 | with open(self.host_manifest) as f: | 682 | with open(self.host_manifest) as f: |
683 | self.hostpkgmanifest = f.read() | 683 | self.hostpkgmanifest = f.read() |
@@ -688,16 +688,16 @@ class SDKTestContext(TestContext): | |||
688 | return "sdk" | 688 | return "sdk" |
689 | 689 | ||
690 | def _get_test_suites(self): | 690 | def _get_test_suites(self): |
691 | return (self.d.getVar("TEST_SUITES_SDK", True) or "auto").split() | 691 | return (self.d.getVar("TEST_SUITES_SDK") or "auto").split() |
692 | 692 | ||
693 | def _get_test_suites_required(self): | 693 | def _get_test_suites_required(self): |
694 | return [t for t in (self.d.getVar("TEST_SUITES_SDK", True) or \ | 694 | return [t for t in (self.d.getVar("TEST_SUITES_SDK") or \ |
695 | "auto").split() if t != "auto"] | 695 | "auto").split() if t != "auto"] |
696 | 696 | ||
697 | class SDKExtTestContext(SDKTestContext): | 697 | class SDKExtTestContext(SDKTestContext): |
698 | def __init__(self, d, sdktestdir, sdkenv, tcname, *args): | 698 | def __init__(self, d, sdktestdir, sdkenv, tcname, *args): |
699 | self.target_manifest = d.getVar("SDK_EXT_TARGET_MANIFEST", True) | 699 | self.target_manifest = d.getVar("SDK_EXT_TARGET_MANIFEST") |
700 | self.host_manifest = d.getVar("SDK_EXT_HOST_MANIFEST", True) | 700 | self.host_manifest = d.getVar("SDK_EXT_HOST_MANIFEST") |
701 | if args: | 701 | if args: |
702 | self.cm = args[0] # Compatibility mode for run SDK tests | 702 | self.cm = args[0] # Compatibility mode for run SDK tests |
703 | else: | 703 | else: |
@@ -715,8 +715,8 @@ class SDKExtTestContext(SDKTestContext): | |||
715 | return "sdkext" | 715 | return "sdkext" |
716 | 716 | ||
717 | def _get_test_suites(self): | 717 | def _get_test_suites(self): |
718 | return (self.d.getVar("TEST_SUITES_SDK_EXT", True) or "auto").split() | 718 | return (self.d.getVar("TEST_SUITES_SDK_EXT") or "auto").split() |
719 | 719 | ||
720 | def _get_test_suites_required(self): | 720 | def _get_test_suites_required(self): |
721 | return [t for t in (self.d.getVar("TEST_SUITES_SDK_EXT", True) or \ | 721 | return [t for t in (self.d.getVar("TEST_SUITES_SDK_EXT") or \ |
722 | "auto").split() if t != "auto"] | 722 | "auto").split() if t != "auto"] |
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py index 7e245c4120..9cfea0f7ab 100755 --- a/meta/lib/oeqa/runexported.py +++ b/meta/lib/oeqa/runexported.py | |||
@@ -43,8 +43,8 @@ class FakeTarget(object): | |||
43 | self.ip = None | 43 | self.ip = None |
44 | self.server_ip = None | 44 | self.server_ip = None |
45 | self.datetime = time.strftime('%Y%m%d%H%M%S',time.gmtime()) | 45 | self.datetime = time.strftime('%Y%m%d%H%M%S',time.gmtime()) |
46 | self.testdir = d.getVar("TEST_LOG_DIR", True) | 46 | self.testdir = d.getVar("TEST_LOG_DIR") |
47 | self.pn = d.getVar("PN", True) | 47 | self.pn = d.getVar("PN") |
48 | 48 | ||
49 | def exportStart(self): | 49 | def exportStart(self): |
50 | self.sshlog = os.path.join(self.testdir, "ssh_target_log.%s" % self.datetime) | 50 | self.sshlog = os.path.join(self.testdir, "ssh_target_log.%s" % self.datetime) |
@@ -130,8 +130,8 @@ def extract_sdk(d): | |||
130 | """ | 130 | """ |
131 | 131 | ||
132 | export_dir = os.path.dirname(os.path.realpath(__file__)) | 132 | export_dir = os.path.dirname(os.path.realpath(__file__)) |
133 | tools_dir = d.getVar("TEST_EXPORT_SDK_DIR", True) | 133 | tools_dir = d.getVar("TEST_EXPORT_SDK_DIR") |
134 | tarball_name = "%s.sh" % d.getVar("TEST_EXPORT_SDK_NAME", True) | 134 | tarball_name = "%s.sh" % d.getVar("TEST_EXPORT_SDK_NAME") |
135 | tarball_path = os.path.join(export_dir, tools_dir, tarball_name) | 135 | tarball_path = os.path.join(export_dir, tools_dir, tarball_name) |
136 | extract_path = os.path.join(export_dir, "sysroot") | 136 | extract_path = os.path.join(export_dir, "sysroot") |
137 | if os.path.isfile(tarball_path): | 137 | if os.path.isfile(tarball_path): |
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 | ||
19 | class PtestRunnerTest(oeRuntimeTest): | 19 | class 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 | |||
5 | class DateTest(oeRuntimeTest): | 5 | class 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 | |||
3 | from oeqa.utils.decorators import * | 3 | from oeqa.utils.decorators import * |
4 | 4 | ||
5 | def setUpModule(): | 5 | def 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 * | |||
7 | def setUpModule(): | 7 | def 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 | ||
17 | class SmartTest(oeRuntimeTest): | 17 | class 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 * | |||
6 | def setUpModule(): | 6 | def 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 | ||
5 | def setUpModule(): | 5 | def 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 | ||
diff --git a/meta/lib/oeqa/sdk/gcc.py b/meta/lib/oeqa/sdk/gcc.py index 8395b9b908..f3f4341a20 100644 --- a/meta/lib/oeqa/sdk/gcc.py +++ b/meta/lib/oeqa/sdk/gcc.py | |||
@@ -5,7 +5,7 @@ from oeqa.oetest import oeSDKTest, skipModule | |||
5 | from oeqa.utils.decorators import * | 5 | from oeqa.utils.decorators import * |
6 | 6 | ||
7 | def setUpModule(): | 7 | def setUpModule(): |
8 | machine = oeSDKTest.tc.d.getVar("MACHINE", True) | 8 | machine = oeSDKTest.tc.d.getVar("MACHINE") |
9 | if not oeSDKTest.hasHostPackage("packagegroup-cross-canadian-" + machine): | 9 | if not oeSDKTest.hasHostPackage("packagegroup-cross-canadian-" + machine): |
10 | skipModule("SDK doesn't contain a cross-canadian toolchain") | 10 | skipModule("SDK doesn't contain a cross-canadian toolchain") |
11 | 11 | ||
diff --git a/meta/lib/oeqa/selftest/tinfoil.py b/meta/lib/oeqa/selftest/tinfoil.py index 4f70e0d2f7..c8d635cd05 100644 --- a/meta/lib/oeqa/selftest/tinfoil.py +++ b/meta/lib/oeqa/selftest/tinfoil.py | |||
@@ -13,7 +13,7 @@ class TinfoilTests(oeSelfTest): | |||
13 | def test_getvar(self): | 13 | def test_getvar(self): |
14 | with bb.tinfoil.Tinfoil() as tinfoil: | 14 | with bb.tinfoil.Tinfoil() as tinfoil: |
15 | tinfoil.prepare(True) | 15 | tinfoil.prepare(True) |
16 | machine = tinfoil.config_data.getVar('MACHINE', True) | 16 | machine = tinfoil.config_data.getVar('MACHINE') |
17 | if not machine: | 17 | if not machine: |
18 | self.fail('Unable to get MACHINE value - returned %s' % machine) | 18 | self.fail('Unable to get MACHINE value - returned %s' % machine) |
19 | 19 | ||
@@ -41,7 +41,7 @@ class TinfoilTests(oeSelfTest): | |||
41 | if not best: | 41 | if not best: |
42 | self.fail('Unable to find recipe providing %s' % testrecipe) | 42 | self.fail('Unable to find recipe providing %s' % testrecipe) |
43 | rd = tinfoil.parse_recipe_file(best[3]) | 43 | rd = tinfoil.parse_recipe_file(best[3]) |
44 | self.assertEqual(testrecipe, rd.getVar('PN', True)) | 44 | self.assertEqual(testrecipe, rd.getVar('PN')) |
45 | 45 | ||
46 | def test_parse_recipe_copy_expand(self): | 46 | def test_parse_recipe_copy_expand(self): |
47 | with bb.tinfoil.Tinfoil() as tinfoil: | 47 | with bb.tinfoil.Tinfoil() as tinfoil: |
@@ -52,14 +52,14 @@ class TinfoilTests(oeSelfTest): | |||
52 | self.fail('Unable to find recipe providing %s' % testrecipe) | 52 | self.fail('Unable to find recipe providing %s' % testrecipe) |
53 | rd = tinfoil.parse_recipe_file(best[3]) | 53 | rd = tinfoil.parse_recipe_file(best[3]) |
54 | # Check we can get variable values | 54 | # Check we can get variable values |
55 | self.assertEqual(testrecipe, rd.getVar('PN', True)) | 55 | self.assertEqual(testrecipe, rd.getVar('PN')) |
56 | # Check that expanding a value that includes a variable reference works | 56 | # Check that expanding a value that includes a variable reference works |
57 | self.assertEqual(testrecipe, rd.getVar('BPN', True)) | 57 | self.assertEqual(testrecipe, rd.getVar('BPN')) |
58 | # Now check that changing the referenced variable's value in a copy gives that | 58 | # Now check that changing the referenced variable's value in a copy gives that |
59 | # value when expanding | 59 | # value when expanding |
60 | localdata = bb.data.createCopy(rd) | 60 | localdata = bb.data.createCopy(rd) |
61 | localdata.setVar('PN', 'hello') | 61 | localdata.setVar('PN', 'hello') |
62 | self.assertEqual('hello', localdata.getVar('BPN', True)) | 62 | self.assertEqual('hello', localdata.getVar('BPN')) |
63 | 63 | ||
64 | def test_parse_recipe_initial_datastore(self): | 64 | def test_parse_recipe_initial_datastore(self): |
65 | with bb.tinfoil.Tinfoil() as tinfoil: | 65 | with bb.tinfoil.Tinfoil() as tinfoil: |
@@ -72,7 +72,7 @@ class TinfoilTests(oeSelfTest): | |||
72 | dcopy.setVar('MYVARIABLE', 'somevalue') | 72 | dcopy.setVar('MYVARIABLE', 'somevalue') |
73 | rd = tinfoil.parse_recipe_file(best[3], config_data=dcopy) | 73 | rd = tinfoil.parse_recipe_file(best[3], config_data=dcopy) |
74 | # Check we can get variable values | 74 | # Check we can get variable values |
75 | self.assertEqual('somevalue', rd.getVar('MYVARIABLE', True)) | 75 | self.assertEqual('somevalue', rd.getVar('MYVARIABLE')) |
76 | 76 | ||
77 | def test_list_recipes(self): | 77 | def test_list_recipes(self): |
78 | with bb.tinfoil.Tinfoil() as tinfoil: | 78 | with bb.tinfoil.Tinfoil() as tinfoil: |
@@ -127,7 +127,7 @@ class TinfoilTests(oeSelfTest): | |||
127 | with bb.tinfoil.Tinfoil() as tinfoil: | 127 | with bb.tinfoil.Tinfoil() as tinfoil: |
128 | tinfoil.prepare(config_only=True) | 128 | tinfoil.prepare(config_only=True) |
129 | tinfoil.run_command('setVariable', 'TESTVAR', 'specialvalue') | 129 | tinfoil.run_command('setVariable', 'TESTVAR', 'specialvalue') |
130 | self.assertEqual(tinfoil.config_data.getVar('TESTVAR', True), 'specialvalue', 'Value set using setVariable is not reflected in client-side getVar()') | 130 | self.assertEqual(tinfoil.config_data.getVar('TESTVAR'), 'specialvalue', 'Value set using setVariable is not reflected in client-side getVar()') |
131 | 131 | ||
132 | # Now check that the setVariable's effects are no longer present | 132 | # Now check that the setVariable's effects are no longer present |
133 | # (this may legitimately break in future if we stop reinitialising | 133 | # (this may legitimately break in future if we stop reinitialising |
@@ -135,7 +135,7 @@ class TinfoilTests(oeSelfTest): | |||
135 | # setVariable entirely) | 135 | # setVariable entirely) |
136 | with bb.tinfoil.Tinfoil() as tinfoil: | 136 | with bb.tinfoil.Tinfoil() as tinfoil: |
137 | tinfoil.prepare(config_only=True) | 137 | tinfoil.prepare(config_only=True) |
138 | self.assertNotEqual(tinfoil.config_data.getVar('TESTVAR', True), 'specialvalue', 'Value set using setVariable is still present!') | 138 | self.assertNotEqual(tinfoil.config_data.getVar('TESTVAR'), 'specialvalue', 'Value set using setVariable is still present!') |
139 | 139 | ||
140 | # Now check that setVar on the main datastore works (uses setVariable internally) | 140 | # Now check that setVar on the main datastore works (uses setVariable internally) |
141 | with bb.tinfoil.Tinfoil() as tinfoil: | 141 | with bb.tinfoil.Tinfoil() as tinfoil: |
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py index 24669f461d..d1f441f841 100644 --- a/meta/lib/oeqa/targetcontrol.py +++ b/meta/lib/oeqa/targetcontrol.py | |||
@@ -19,7 +19,7 @@ from oeqa.controllers.testtargetloader import TestTargetLoader | |||
19 | from abc import ABCMeta, abstractmethod | 19 | from abc import ABCMeta, abstractmethod |
20 | 20 | ||
21 | def get_target_controller(d): | 21 | def get_target_controller(d): |
22 | testtarget = d.getVar("TEST_TARGET", True) | 22 | testtarget = d.getVar("TEST_TARGET") |
23 | # old, simple names | 23 | # old, simple names |
24 | if testtarget == "qemu": | 24 | if testtarget == "qemu": |
25 | return QemuTarget(d) | 25 | return QemuTarget(d) |
@@ -33,7 +33,7 @@ def get_target_controller(d): | |||
33 | except AttributeError: | 33 | except AttributeError: |
34 | # nope, perhaps a layer defined one | 34 | # nope, perhaps a layer defined one |
35 | try: | 35 | try: |
36 | bbpath = d.getVar("BBPATH", True).split(':') | 36 | bbpath = d.getVar("BBPATH").split(':') |
37 | testtargetloader = TestTargetLoader() | 37 | testtargetloader = TestTargetLoader() |
38 | controller = testtargetloader.get_controller_module(testtarget, bbpath) | 38 | controller = testtargetloader.get_controller_module(testtarget, bbpath) |
39 | except ImportError as e: | 39 | except ImportError as e: |
@@ -51,9 +51,9 @@ class BaseTarget(object, metaclass=ABCMeta): | |||
51 | self.connection = None | 51 | self.connection = None |
52 | self.ip = None | 52 | self.ip = None |
53 | self.server_ip = None | 53 | self.server_ip = None |
54 | self.datetime = d.getVar('DATETIME', True) | 54 | self.datetime = d.getVar('DATETIME') |
55 | self.testdir = d.getVar("TEST_LOG_DIR", True) | 55 | self.testdir = d.getVar("TEST_LOG_DIR") |
56 | self.pn = d.getVar("PN", True) | 56 | self.pn = d.getVar("PN") |
57 | 57 | ||
58 | @abstractmethod | 58 | @abstractmethod |
59 | def deploy(self): | 59 | def deploy(self): |
@@ -80,7 +80,7 @@ class BaseTarget(object, metaclass=ABCMeta): | |||
80 | @classmethod | 80 | @classmethod |
81 | def match_image_fstype(self, d, image_fstypes=None): | 81 | def match_image_fstype(self, d, image_fstypes=None): |
82 | if not image_fstypes: | 82 | if not image_fstypes: |
83 | image_fstypes = d.getVar('IMAGE_FSTYPES', True).split(' ') | 83 | image_fstypes = d.getVar('IMAGE_FSTYPES').split(' ') |
84 | possible_image_fstypes = [fstype for fstype in self.supported_image_fstypes if fstype in image_fstypes] | 84 | possible_image_fstypes = [fstype for fstype in self.supported_image_fstypes if fstype in image_fstypes] |
85 | if possible_image_fstypes: | 85 | if possible_image_fstypes: |
86 | return possible_image_fstypes[0] | 86 | return possible_image_fstypes[0] |
@@ -119,14 +119,14 @@ class QemuTarget(BaseTarget): | |||
119 | 119 | ||
120 | self.image_fstype = self.get_image_fstype(d) | 120 | self.image_fstype = self.get_image_fstype(d) |
121 | self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % self.datetime) | 121 | self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % self.datetime) |
122 | self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype) | 122 | self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), d.getVar("IMAGE_LINK_NAME") + '.' + self.image_fstype) |
123 | self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin') | 123 | self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin') |
124 | dump_target_cmds = d.getVar("testimage_dump_target", True) | 124 | dump_target_cmds = d.getVar("testimage_dump_target") |
125 | dump_host_cmds = d.getVar("testimage_dump_host", True) | 125 | dump_host_cmds = d.getVar("testimage_dump_host") |
126 | dump_dir = d.getVar("TESTIMAGE_DUMP_DIR", True) | 126 | dump_dir = d.getVar("TESTIMAGE_DUMP_DIR") |
127 | if d.getVar("QEMU_USE_KVM", False) is not None \ | 127 | if d.getVar("QEMU_USE_KVM", False) is not None \ |
128 | and d.getVar("QEMU_USE_KVM", False) == "True" \ | 128 | and d.getVar("QEMU_USE_KVM", False) == "True" \ |
129 | and "x86" in d.getVar("MACHINE", True): | 129 | and "x86" in d.getVar("MACHINE"): |
130 | use_kvm = True | 130 | use_kvm = True |
131 | else: | 131 | else: |
132 | use_kvm = False | 132 | use_kvm = False |
@@ -141,26 +141,26 @@ class QemuTarget(BaseTarget): | |||
141 | logger.addHandler(loggerhandler) | 141 | logger.addHandler(loggerhandler) |
142 | oe.path.symlink(os.path.basename(self.qemurunnerlog), os.path.join(self.testdir, 'qemurunner_log'), force=True) | 142 | oe.path.symlink(os.path.basename(self.qemurunnerlog), os.path.join(self.testdir, 'qemurunner_log'), force=True) |
143 | 143 | ||
144 | if d.getVar("DISTRO", True) == "poky-tiny": | 144 | if d.getVar("DISTRO") == "poky-tiny": |
145 | self.runner = QemuTinyRunner(machine=d.getVar("MACHINE", True), | 145 | self.runner = QemuTinyRunner(machine=d.getVar("MACHINE"), |
146 | rootfs=self.rootfs, | 146 | rootfs=self.rootfs, |
147 | tmpdir = d.getVar("TMPDIR", True), | 147 | tmpdir = d.getVar("TMPDIR"), |
148 | deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE", True), | 148 | deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE"), |
149 | display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True), | 149 | display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY"), |
150 | logfile = self.qemulog, | 150 | logfile = self.qemulog, |
151 | kernel = self.kernel, | 151 | kernel = self.kernel, |
152 | boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", True))) | 152 | boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT"))) |
153 | else: | 153 | else: |
154 | self.runner = QemuRunner(machine=d.getVar("MACHINE", True), | 154 | self.runner = QemuRunner(machine=d.getVar("MACHINE"), |
155 | rootfs=self.rootfs, | 155 | rootfs=self.rootfs, |
156 | tmpdir = d.getVar("TMPDIR", True), | 156 | tmpdir = d.getVar("TMPDIR"), |
157 | deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE", True), | 157 | deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE"), |
158 | display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True), | 158 | display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY"), |
159 | logfile = self.qemulog, | 159 | logfile = self.qemulog, |
160 | boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", True)), | 160 | boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT")), |
161 | use_kvm = use_kvm, | 161 | use_kvm = use_kvm, |
162 | dump_dir = dump_dir, | 162 | dump_dir = dump_dir, |
163 | dump_host_cmds = d.getVar("testimage_dump_host", True)) | 163 | dump_host_cmds = d.getVar("testimage_dump_host")) |
164 | 164 | ||
165 | self.target_dumper = TargetDumper(dump_target_cmds, dump_dir, self.runner) | 165 | self.target_dumper = TargetDumper(dump_target_cmds, dump_dir, self.runner) |
166 | 166 | ||
@@ -214,14 +214,14 @@ class SimpleRemoteTarget(BaseTarget): | |||
214 | 214 | ||
215 | def __init__(self, d): | 215 | def __init__(self, d): |
216 | super(SimpleRemoteTarget, self).__init__(d) | 216 | super(SimpleRemoteTarget, self).__init__(d) |
217 | addr = d.getVar("TEST_TARGET_IP", True) or bb.fatal('Please set TEST_TARGET_IP with the IP address of the machine you want to run the tests on.') | 217 | addr = d.getVar("TEST_TARGET_IP") or bb.fatal('Please set TEST_TARGET_IP with the IP address of the machine you want to run the tests on.') |
218 | self.ip = addr.split(":")[0] | 218 | self.ip = addr.split(":")[0] |
219 | try: | 219 | try: |
220 | self.port = addr.split(":")[1] | 220 | self.port = addr.split(":")[1] |
221 | except IndexError: | 221 | except IndexError: |
222 | self.port = None | 222 | self.port = None |
223 | bb.note("Target IP: %s" % self.ip) | 223 | bb.note("Target IP: %s" % self.ip) |
224 | self.server_ip = d.getVar("TEST_SERVER_IP", True) | 224 | self.server_ip = d.getVar("TEST_SERVER_IP") |
225 | if not self.server_ip: | 225 | if not self.server_ip: |
226 | try: | 226 | try: |
227 | self.server_ip = subprocess.check_output(['ip', 'route', 'get', self.ip ]).split("\n")[0].split()[-1] | 227 | self.server_ip = subprocess.check_output(['ip', 'route', 'get', self.ip ]).split("\n")[0].split()[-1] |
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index aecf8cf5a8..3a68b001b7 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py | |||
@@ -231,7 +231,7 @@ def runqemu(pn, ssh=True): | |||
231 | logger = logging.getLogger('BitBake.QemuRunner') | 231 | logger = logging.getLogger('BitBake.QemuRunner') |
232 | logger.setLevel(logging.DEBUG) | 232 | logger.setLevel(logging.DEBUG) |
233 | logger.propagate = False | 233 | logger.propagate = False |
234 | logdir = recipedata.getVar("TEST_LOG_DIR", True) | 234 | logdir = recipedata.getVar("TEST_LOG_DIR") |
235 | 235 | ||
236 | qemu = oeqa.targetcontrol.QemuTarget(recipedata) | 236 | qemu = oeqa.targetcontrol.QemuTarget(recipedata) |
237 | finally: | 237 | finally: |
diff --git a/meta/lib/oeqa/utils/dump.py b/meta/lib/oeqa/utils/dump.py index 71422a9aea..44037a989d 100644 --- a/meta/lib/oeqa/utils/dump.py +++ b/meta/lib/oeqa/utils/dump.py | |||
@@ -6,8 +6,8 @@ import itertools | |||
6 | from .commands import runCmd | 6 | from .commands import runCmd |
7 | 7 | ||
8 | def get_host_dumper(d): | 8 | def get_host_dumper(d): |
9 | cmds = d.getVar("testimage_dump_host", True) | 9 | cmds = d.getVar("testimage_dump_host") |
10 | parent_dir = d.getVar("TESTIMAGE_DUMP_DIR", True) | 10 | parent_dir = d.getVar("TESTIMAGE_DUMP_DIR") |
11 | return HostDumper(cmds, parent_dir) | 11 | return HostDumper(cmds, parent_dir) |
12 | 12 | ||
13 | 13 | ||
diff --git a/meta/lib/oeqa/utils/package_manager.py b/meta/lib/oeqa/utils/package_manager.py index 099ecc9728..0f6bdbc542 100644 --- a/meta/lib/oeqa/utils/package_manager.py +++ b/meta/lib/oeqa/utils/package_manager.py | |||
@@ -4,24 +4,24 @@ def get_package_manager(d, root_path): | |||
4 | """ | 4 | """ |
5 | from oe.package_manager import RpmPM, OpkgPM, DpkgPM | 5 | from oe.package_manager import RpmPM, OpkgPM, DpkgPM |
6 | 6 | ||
7 | pkg_class = d.getVar("IMAGE_PKGTYPE", True) | 7 | pkg_class = d.getVar("IMAGE_PKGTYPE") |
8 | if pkg_class == "rpm": | 8 | if pkg_class == "rpm": |
9 | pm = RpmPM(d, | 9 | pm = RpmPM(d, |
10 | root_path, | 10 | root_path, |
11 | d.getVar('TARGET_VENDOR', True)) | 11 | d.getVar('TARGET_VENDOR')) |
12 | pm.create_configs() | 12 | pm.create_configs() |
13 | 13 | ||
14 | elif pkg_class == "ipk": | 14 | elif pkg_class == "ipk": |
15 | pm = OpkgPM(d, | 15 | pm = OpkgPM(d, |
16 | root_path, | 16 | root_path, |
17 | d.getVar("IPKGCONF_TARGET", True), | 17 | d.getVar("IPKGCONF_TARGET"), |
18 | d.getVar("ALL_MULTILIB_PACKAGE_ARCHS", True)) | 18 | d.getVar("ALL_MULTILIB_PACKAGE_ARCHS")) |
19 | 19 | ||
20 | elif pkg_class == "deb": | 20 | elif pkg_class == "deb": |
21 | pm = DpkgPM(d, | 21 | pm = DpkgPM(d, |
22 | root_path, | 22 | root_path, |
23 | d.getVar('PACKAGE_ARCHS', True), | 23 | d.getVar('PACKAGE_ARCHS'), |
24 | d.getVar('DPKG_ARCH', True)) | 24 | d.getVar('DPKG_ARCH')) |
25 | 25 | ||
26 | pm.write_index() | 26 | pm.write_index() |
27 | pm.update() | 27 | pm.update() |
diff --git a/meta/lib/oeqa/utils/targetbuild.py b/meta/lib/oeqa/utils/targetbuild.py index 59593f5ef3..c001602b54 100644 --- a/meta/lib/oeqa/utils/targetbuild.py +++ b/meta/lib/oeqa/utils/targetbuild.py | |||
@@ -25,7 +25,7 @@ class BuildProject(metaclass=ABCMeta): | |||
25 | # Download self.archive to self.localarchive | 25 | # Download self.archive to self.localarchive |
26 | def _download_archive(self): | 26 | def _download_archive(self): |
27 | 27 | ||
28 | dl_dir = self.d.getVar("DL_DIR", True) | 28 | dl_dir = self.d.getVar("DL_DIR") |
29 | if dl_dir and os.path.exists(os.path.join(dl_dir, self.archive)): | 29 | if dl_dir and os.path.exists(os.path.join(dl_dir, self.archive)): |
30 | bb.utils.copyfile(os.path.join(dl_dir, self.archive), self.localarchive) | 30 | bb.utils.copyfile(os.path.join(dl_dir, self.archive), self.localarchive) |
31 | return | 31 | return |
@@ -40,7 +40,7 @@ class BuildProject(metaclass=ABCMeta): | |||
40 | 40 | ||
41 | cmd = '' | 41 | cmd = '' |
42 | for var in exportvars: | 42 | for var in exportvars: |
43 | val = self.d.getVar(var, True) | 43 | val = self.d.getVar(var) |
44 | if val: | 44 | if val: |
45 | cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd) | 45 | cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd) |
46 | 46 | ||
@@ -103,8 +103,8 @@ class SDKBuildProject(BuildProject): | |||
103 | self.testdir = testpath | 103 | self.testdir = testpath |
104 | self.targetdir = testpath | 104 | self.targetdir = testpath |
105 | bb.utils.mkdirhier(testpath) | 105 | bb.utils.mkdirhier(testpath) |
106 | self.datetime = d.getVar('DATETIME', True) | 106 | self.datetime = d.getVar('DATETIME') |
107 | self.testlogdir = d.getVar("TEST_LOG_DIR", True) | 107 | self.testlogdir = d.getVar("TEST_LOG_DIR") |
108 | bb.utils.mkdirhier(self.testlogdir) | 108 | bb.utils.mkdirhier(self.testlogdir) |
109 | self.logfile = os.path.join(self.testlogdir, "sdk_target_log.%s" % self.datetime) | 109 | self.logfile = os.path.join(self.testlogdir, "sdk_target_log.%s" % self.datetime) |
110 | BuildProject.__init__(self, d, uri, foldername, tmpdir=testpath) | 110 | BuildProject.__init__(self, d, uri, foldername, tmpdir=testpath) |
diff --git a/meta/lib/oeqa/utils/testexport.py b/meta/lib/oeqa/utils/testexport.py index 57be2ca449..be2a2110fc 100644 --- a/meta/lib/oeqa/utils/testexport.py +++ b/meta/lib/oeqa/utils/testexport.py | |||
@@ -72,9 +72,9 @@ def process_binaries(d, params): | |||
72 | return extract_bin_command | 72 | return extract_bin_command |
73 | 73 | ||
74 | if determine_if_poky_env(): # machine with poky environment | 74 | if determine_if_poky_env(): # machine with poky environment |
75 | exportpath = d.getVar("TEST_EXPORT_DIR", True) if export_env else d.getVar("DEPLOY_DIR", True) | 75 | exportpath = d.getVar("TEST_EXPORT_DIR") if export_env else d.getVar("DEPLOY_DIR") |
76 | rpm_deploy_dir = d.getVar("DEPLOY_DIR_RPM", True) | 76 | rpm_deploy_dir = d.getVar("DEPLOY_DIR_RPM") |
77 | arch = get_dest_folder(d.getVar("TUNE_FEATURES", True), os.listdir(rpm_deploy_dir)) | 77 | arch = get_dest_folder(d.getVar("TUNE_FEATURES"), os.listdir(rpm_deploy_dir)) |
78 | arch_rpm_dir = os.path.join(rpm_deploy_dir, arch) | 78 | arch_rpm_dir = os.path.join(rpm_deploy_dir, arch) |
79 | extracted_bin_dir = os.path.join(exportpath,"binaries", arch, "extracted_binaries") | 79 | extracted_bin_dir = os.path.join(exportpath,"binaries", arch, "extracted_binaries") |
80 | packaged_bin_dir = os.path.join(exportpath,"binaries", arch, "packaged_binaries") | 80 | packaged_bin_dir = os.path.join(exportpath,"binaries", arch, "packaged_binaries") |
@@ -92,7 +92,7 @@ def process_binaries(d, params): | |||
92 | return "" | 92 | return "" |
93 | for item in native_rpm_file_list:# will copy all versions of package. Used version will be selected on remote machine | 93 | for item in native_rpm_file_list:# will copy all versions of package. Used version will be selected on remote machine |
94 | bb.plain("Copying native package file: %s" % item) | 94 | bb.plain("Copying native package file: %s" % item) |
95 | sh.copy(os.path.join(rpm_deploy_dir, native_rpm_dir, item), os.path.join(d.getVar("TEST_EXPORT_DIR", True), "binaries", "native")) | 95 | sh.copy(os.path.join(rpm_deploy_dir, native_rpm_dir, item), os.path.join(d.getVar("TEST_EXPORT_DIR"), "binaries", "native")) |
96 | else: # nothing to do here; running tests under bitbake, so we asume native binaries are in sysroots dir. | 96 | else: # nothing to do here; running tests under bitbake, so we asume native binaries are in sysroots dir. |
97 | if param_list[1] or param_list[4]: | 97 | if param_list[1] or param_list[4]: |
98 | bb.warn("Native binary %s %s%s. Running tests under bitbake environment. Version can't be checked except when the test itself does it" | 98 | bb.warn("Native binary %s %s%s. Running tests under bitbake environment. Version can't be checked except when the test itself does it" |
@@ -148,7 +148,7 @@ def process_binaries(d, params): | |||
148 | else: # this is for target device | 148 | else: # this is for target device |
149 | if param_list[2] == "rpm": | 149 | if param_list[2] == "rpm": |
150 | return "No need to extract, this is an .rpm file" | 150 | return "No need to extract, this is an .rpm file" |
151 | arch = get_dest_folder(d.getVar("TUNE_FEATURES", True), os.listdir(binaries_path)) | 151 | arch = get_dest_folder(d.getVar("TUNE_FEATURES"), os.listdir(binaries_path)) |
152 | extracted_bin_path = os.path.join(binaries_path, arch, "extracted_binaries") | 152 | extracted_bin_path = os.path.join(binaries_path, arch, "extracted_binaries") |
153 | extracted_bin_list = [item for item in os.listdir(extracted_bin_path)] | 153 | extracted_bin_list = [item for item in os.listdir(extracted_bin_path)] |
154 | packaged_bin_path = os.path.join(binaries_path, arch, "packaged_binaries") | 154 | packaged_bin_path = os.path.join(binaries_path, arch, "packaged_binaries") |
@@ -206,9 +206,9 @@ def send_bin_to_DUT(d,params): | |||
206 | from oeqa.oetest import oeRuntimeTest | 206 | from oeqa.oetest import oeRuntimeTest |
207 | param_list = params | 207 | param_list = params |
208 | cleanup_list = list() | 208 | cleanup_list = list() |
209 | bins_dir = os.path.join(d.getVar("TEST_EXPORT_DIR", True), "binaries") if determine_if_poky_env() \ | 209 | bins_dir = os.path.join(d.getVar("TEST_EXPORT_DIR"), "binaries") if determine_if_poky_env() \ |
210 | else os.getenv("bin_dir") | 210 | else os.getenv("bin_dir") |
211 | arch = get_dest_folder(d.getVar("TUNE_FEATURES", True), os.listdir(bins_dir)) | 211 | arch = get_dest_folder(d.getVar("TUNE_FEATURES"), os.listdir(bins_dir)) |
212 | arch_rpms_dir = os.path.join(bins_dir, arch, "packaged_binaries") | 212 | arch_rpms_dir = os.path.join(bins_dir, arch, "packaged_binaries") |
213 | extracted_bin_dir = os.path.join(bins_dir, arch, "extracted_binaries", param_list[0]) | 213 | extracted_bin_dir = os.path.join(bins_dir, arch, "extracted_binaries", param_list[0]) |
214 | 214 | ||