diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2016-04-11 06:55:35 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-04-12 22:50:21 +0100 |
commit | d27ca36e2a3d3ba60870aa73f17a6e22737b0c13 (patch) | |
tree | b798fc113ef2450e8256cd1b326244bd9c2c2a05 /meta/lib/oeqa/runexported.py | |
parent | 85dbd7bf9e4b6eccdbb8102e462dd681240c1c57 (diff) | |
download | poky-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-x | meta/lib/oeqa/runexported.py | 19 |
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 | ||
31 | sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "oeqa"))) | 31 | sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "oeqa"))) |
32 | 32 | ||
33 | from oeqa.oetest import runTests | 33 | from oeqa.oetest import TestContext |
34 | from oeqa.utils.sshcontrol import SSHControl | 34 | from oeqa.utils.sshcontrol import SSHControl |
35 | from oeqa.utils.dump import get_host_dumper | 35 | from 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 | ||
72 | class TestContext(object): | 72 | class 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 | ||
77 | def main(): | 76 | def 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 | ||