diff options
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(): | |||
102 | 102 | ||
103 | def remove_include(): | 103 | def 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 | ||
122 | def get_tests(exclusive_modules=[], include_hidden=False): | 124 | def get_tests(exclusive_modules=[], include_hidden=False): |