summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-02-04 14:13:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-08 08:00:27 +0000
commit336d28c413bafbba5662965998870d0154c2be0d (patch)
tree81888befbadfa22b2f9afd198bdaf999a30c4553
parenteba9f8a16d3a09ac0212af5043a7620b03c9b13a (diff)
downloadpoky-336d28c413bafbba5662965998870d0154c2be0d.tar.gz
scripts/oe-selftest: fix startup backtrace
Fixing a backtrace dump that happens if the script is started without sourcing the oe-init-build-env first. (From OE-Core rev: 0d769abcab272f41d74ed4d7915d26c7c309253a) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/oe-selftest4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index 2332b224ee..74c998bc43 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -102,6 +102,8 @@ def add_include():
102 102
103def remove_include(): 103def remove_include():
104 builddir = os.environ.get("BUILDDIR") 104 builddir = os.environ.get("BUILDDIR")
105 if builddir is None:
106 return
105 if "#include added by oe-selftest.py" \ 107 if "#include added by oe-selftest.py" \
106 in ftools.read_file(os.path.join(builddir, "conf/local.conf")): 108 in ftools.read_file(os.path.join(builddir, "conf/local.conf")):
107 log.info("Removing the include from local.conf") 109 log.info("Removing the include from local.conf")
@@ -116,7 +118,7 @@ def remove_inc_files():
116 for f in files: 118 for f in files:
117 if f == 'test_recipe.inc': 119 if f == 'test_recipe.inc':
118 os.remove(os.path.join(root, f)) 120 os.remove(os.path.join(root, f))
119 except OSError as e: 121 except (AttributeError, OSError,) as e: # AttributeError may happen if BUILDDIR is not set
120 pass 122 pass
121 123
122def get_tests(exclusive_modules=[], include_hidden=False): 124def get_tests(exclusive_modules=[], include_hidden=False):