summaryrefslogtreecommitdiffstats
path: root/scripts/oe-selftest
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-12-19 15:51:43 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-20 15:22:17 +0000
commit2f4008d6948a85ed8c35ffcc8dbfaa47d406c55d (patch)
tree64e64f9243e3eaf5faa3ec5bddfadc4db4fd0646 /scripts/oe-selftest
parent041ac0f9c109308543153ed348995971b8bcdbd6 (diff)
downloadpoky-2f4008d6948a85ed8c35ffcc8dbfaa47d406c55d.tar.gz
oe-selftest: import git module only when needed
git module is not included into standard Python library and therefore causes import errors on the systems where PythonGit is not installed. As git module only used in the code implementing --repository functionality it's better to import git only in the scope that requires it. [YOCTO #10821] (From OE-Core rev: 66be32c1a075201d6ee0e9b9e10b84e6a2ace745) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-selftest')
-rwxr-xr-xscripts/oe-selftest2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index f4b861f2c3..bfcea66f1c 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -36,7 +36,6 @@ import re
36import fnmatch 36import fnmatch
37import collections 37import collections
38import imp 38import imp
39import git
40 39
41sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/lib') 40sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/lib')
42import scriptpath 41import scriptpath
@@ -577,6 +576,7 @@ def main():
577 log.info("Finished") 576 log.info("Finished")
578 577
579 if args.repository: 578 if args.repository:
579 import git
580 # Commit tests results to repository 580 # Commit tests results to repository
581 metadata = metadata_from_bb() 581 metadata = metadata_from_bb()
582 git_dir = os.path.join(os.getcwd(), 'selftest') 582 git_dir = os.path.join(os.getcwd(), 'selftest')