diff options
author | Lucian Musat <george.l.musat@intel.com> | 2015-09-29 14:52:57 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-01 07:43:33 +0100 |
commit | 9549f57c802eff11974f261340ef0a75a68340f1 (patch) | |
tree | bc62fca7f25761dd126c896a070c98e643bf33d9 | |
parent | 790b6c7ead1554dd7b8f69c0f3857714b5e278fb (diff) | |
download | poky-9549f57c802eff11974f261340ef0a75a68340f1.tar.gz |
oeqa/decorators: Fixed a problem with decorator logs link.
When not doing actual tests with testimage, like for example
exporting tests, the link to the log file was still created
although the actual log file was not existent. Fixed it by
moving the link creation part into the run() method.
(From OE-Core rev: 6950a5b1220d1ff81dae15195fe0d8e06977fec8)
Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/utils/decorators.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py index 7116208380..7a86970873 100644 --- a/meta/lib/oeqa/utils/decorators.py +++ b/meta/lib/oeqa/utils/decorators.py | |||
@@ -167,14 +167,12 @@ def LogResults(original_class): | |||
167 | if passed: | 167 | if passed: |
168 | local_log.results("Testcase "+str(test_case)+": PASSED") | 168 | local_log.results("Testcase "+str(test_case)+": PASSED") |
169 | 169 | ||
170 | original_class.run = run | 170 | # Create symlink to the current log |
171 | 171 | if os.path.exists(linkfile): | |
172 | # Create symlink to the current log | ||
173 | if os.path.islink(linkfile): | ||
174 | os.unlink(linkfile) | ||
175 | elif os.path.isfile(linkfile): | ||
176 | os.remove(linkfile) | 172 | os.remove(linkfile) |
177 | os.symlink(logfile, linkfile) | 173 | os.symlink(logfile, linkfile) |
174 | |||
175 | original_class.run = run | ||
178 | 176 | ||
179 | return original_class | 177 | return original_class |
180 | 178 | ||