summaryrefslogtreecommitdiff
path: root/meta/lib
diff options
context:
space:
mode:
authorLucian Musat <george.l.musat@intel.com>2015-09-29 14:52:57 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-29 15:15:48 +0100
commit6950a5b1220d1ff81dae15195fe0d8e06977fec8 (patch)
tree3f9585be43c0dee39b1e46f26279bd968029457c /meta/lib
parent432e85d8879ed074e04306174398a53e4903f84f (diff)
downloadopenembedded-core-6950a5b1220d1ff81dae15195fe0d8e06977fec8.tar.gz
openembedded-core-6950a5b1220d1ff81dae15195fe0d8e06977fec8.tar.bz2
openembedded-core-6950a5b1220d1ff81dae15195fe0d8e06977fec8.zip
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. Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/utils/decorators.py12
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):
if passed:
local_log.results("Testcase "+str(test_case)+": PASSED")
- original_class.run = run
-
- # Create symlink to the current log
- if os.path.islink(linkfile):
- os.unlink(linkfile)
- elif os.path.isfile(linkfile):
+ # Create symlink to the current log
+ if os.path.exists(linkfile):
os.remove(linkfile)
- os.symlink(logfile, linkfile)
+ os.symlink(logfile, linkfile)
+
+ original_class.run = run
return original_class