summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runexported.py
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-05-02 13:19:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-19 09:05:18 +0100
commitb4c23e9e9583e704043a32ce4175ac5bc1193943 (patch)
tree2fcf81b02fd4d6582a90d41ab59874c666003616 /meta/lib/oeqa/runexported.py
parent86d65d79ad5dfdc53928baa0fe9aa8adbfa80a72 (diff)
downloadpoky-b4c23e9e9583e704043a32ce4175ac5bc1193943.tar.gz
oetest.py: Use the real ExportTestContext in exported tests
There are parts of the fuctionallity missing when using the dummy ExportTestContext class in runexported.py. This changes the use of ExportTestContext dummy class from runexported.py to the real class in oetest.py. (From OE-Core rev: b0f105eecf25d334dd5fd0d936ec98cb8430ed23) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runexported.py')
-rwxr-xr-xmeta/lib/oeqa/runexported.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py
index f333879c22..52c1171a3a 100755
--- a/meta/lib/oeqa/runexported.py
+++ b/meta/lib/oeqa/runexported.py
@@ -30,7 +30,7 @@ except ImportError:
30 30
31sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "oeqa"))) 31sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "oeqa")))
32 32
33from oeqa.oetest import TestContext 33from oeqa.oetest import ExportTestContext
34from oeqa.utils.sshcontrol import SSHControl 34from oeqa.utils.sshcontrol import SSHControl
35from oeqa.utils.dump import get_host_dumper 35from oeqa.utils.dump import get_host_dumper
36 36
@@ -69,10 +69,6 @@ class MyDataDict(dict):
69 def getVar(self, key, unused = None): 69 def getVar(self, key, unused = None):
70 return self.get(key, "") 70 return self.get(key, "")
71 71
72class ExportTestContext(TestContext):
73 def __init__(self, d):
74 self.d = d
75
76def main(): 72def main():
77 73
78 parser = argparse.ArgumentParser() 74 parser = argparse.ArgumentParser()
@@ -111,20 +107,12 @@ def main():
111 if not os.path.isdir(d["DEPLOY_DIR"]): 107 if not os.path.isdir(d["DEPLOY_DIR"]):
112 print("WARNING: The path to DEPLOY_DIR does not exist: %s" % d["DEPLOY_DIR"]) 108 print("WARNING: The path to DEPLOY_DIR does not exist: %s" % d["DEPLOY_DIR"])
113 109
114
115 target = FakeTarget(d) 110 target = FakeTarget(d)
116 for key in loaded["target"].keys(): 111 for key in loaded["target"].keys():
117 setattr(target, key, loaded["target"][key]) 112 setattr(target, key, loaded["target"][key])
118 113
119 target.exportStart() 114 target.exportStart()
120 tc = ExportTestContext(d) 115 tc = ExportTestContext(d, target, True)
121
122 setattr(tc, "d", d)
123 setattr(tc, "target", target)
124 for key in loaded.keys():
125 if key != "d" and key != "target" and key != "host_dumper":
126 setattr(tc, key, loaded[key])
127
128 tc.loadTests() 116 tc.loadTests()
129 tc.runTests() 117 tc.runTests()
130 118