diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-02-04 14:13:56 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-07 18:52:45 +0000 |
commit | 0d769abcab272f41d74ed4d7915d26c7c309253a (patch) | |
tree | 759530e2a08666537151cbc0cf3f283c7f6c8ab9 /scripts/oe-selftest | |
parent | 2d3c9f89852bd009fc7accee495ede2fbcadc3bb (diff) | |
download | openembedded-core-0d769abcab272f41d74ed4d7915d26c7c309253a.tar.gz openembedded-core-0d769abcab272f41d74ed4d7915d26c7c309253a.tar.bz2 openembedded-core-0d769abcab272f41d74ed4d7915d26c7c309253a.zip |
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.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/oe-selftest')
-rwxr-xr-x | scripts/oe-selftest | 4 |
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(): def remove_include(): builddir = os.environ.get("BUILDDIR") + if builddir is None: + return if "#include added by oe-selftest.py" \ in ftools.read_file(os.path.join(builddir, "conf/local.conf")): log.info("Removing the include from local.conf") @@ -116,7 +118,7 @@ def remove_inc_files(): for f in files: if f == 'test_recipe.inc': os.remove(os.path.join(root, f)) - except OSError as e: + except (AttributeError, OSError,) as e: # AttributeError may happen if BUILDDIR is not set pass def get_tests(exclusive_modules=[], include_hidden=False): |