summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runexported.py
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-04-11 06:55:35 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-12 22:50:21 +0100
commitd27ca36e2a3d3ba60870aa73f17a6e22737b0c13 (patch)
treeb798fc113ef2450e8256cd1b326244bd9c2c2a05 /meta/lib/oeqa/runexported.py
parent85dbd7bf9e4b6eccdbb8102e462dd681240c1c57 (diff)
downloadpoky-d27ca36e2a3d3ba60870aa73f17a6e22737b0c13.tar.gz
oeqa/runexported.py: Fix exported test
With the changes introduced to test the eSDK the runexported test failed during the execution. This change fix runexported test in the least invasive way, because of the release cycle. (From OE-Core rev: da0abb9679cb1fd639859a2fdbd82101d0a81259) 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.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py
index e9a29126c8..cc89e13c06 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 runTests 33from oeqa.oetest import TestContext
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
@@ -49,7 +49,7 @@ class FakeTarget(object):
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)
51 sshloglink = os.path.join(self.testdir, "ssh_target_log") 51 sshloglink = os.path.join(self.testdir, "ssh_target_log")
52 if os.path.exists(sshloglink): 52 if os.path.lexists(sshloglink):
53 os.remove(sshloglink) 53 os.remove(sshloglink)
54 os.symlink(self.sshlog, sshloglink) 54 os.symlink(self.sshlog, sshloglink)
55 print("SSH log file: %s" % self.sshlog) 55 print("SSH log file: %s" % self.sshlog)
@@ -69,10 +69,9 @@ 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 TestContext(object): 72class ExportTestContext(TestContext):
73 def __init__(self): 73 def __init__(self, d):
74 self.d = None 74 self.d = d
75 self.target = None
76 75
77def main(): 76def main():
78 77
@@ -121,7 +120,9 @@ def main():
121 host_dumper.parent_dir = loaded["host_dumper"]["parent_dir"] 120 host_dumper.parent_dir = loaded["host_dumper"]["parent_dir"]
122 host_dumper.cmds = loaded["host_dumper"]["cmds"] 121 host_dumper.cmds = loaded["host_dumper"]["cmds"]
123 122
124 tc = TestContext() 123 target.exportStart()
124 tc = ExportTestContext(d)
125
125 setattr(tc, "d", d) 126 setattr(tc, "d", d)
126 setattr(tc, "target", target) 127 setattr(tc, "target", target)
127 setattr(tc, "host_dumper", host_dumper) 128 setattr(tc, "host_dumper", host_dumper)
@@ -129,8 +130,8 @@ def main():
129 if key != "d" and key != "target" and key != "host_dumper": 130 if key != "d" and key != "target" and key != "host_dumper":
130 setattr(tc, key, loaded[key]) 131 setattr(tc, key, loaded[key])
131 132
132 target.exportStart() 133 tc.loadTests()
133 runTests(tc) 134 tc.runTests()
134 135
135 return 0 136 return 0
136 137