diff options
-rwxr-xr-x | scripts/oe-selftest | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/scripts/oe-selftest b/scripts/oe-selftest index fd58a66123..fa6245a3a6 100755 --- a/scripts/oe-selftest +++ b/scripts/oe-selftest | |||
@@ -100,6 +100,11 @@ def add_include(): | |||
100 | ftools.append_file(os.path.join(builddir, "conf/local.conf"), \ | 100 | ftools.append_file(os.path.join(builddir, "conf/local.conf"), \ |
101 | "\n#include added by oe-selftest.py\ninclude selftest.inc") | 101 | "\n#include added by oe-selftest.py\ninclude selftest.inc") |
102 | 102 | ||
103 | if "#include added by oe-selftest.py" \ | ||
104 | not in ftools.read_file(os.path.join(builddir, "conf/bblayers.conf")): | ||
105 | log.info("Adding: \"include bblayers.inc\" in bblayers.conf") | ||
106 | ftools.append_file(os.path.join(builddir, "conf/bblayers.conf"), \ | ||
107 | "\n#include added by oe-selftest.py\ninclude bblayers.inc") | ||
103 | 108 | ||
104 | def remove_include(): | 109 | def remove_include(): |
105 | builddir = os.environ.get("BUILDDIR") | 110 | builddir = os.environ.get("BUILDDIR") |
@@ -111,6 +116,11 @@ def remove_include(): | |||
111 | ftools.remove_from_file(os.path.join(builddir, "conf/local.conf"), \ | 116 | ftools.remove_from_file(os.path.join(builddir, "conf/local.conf"), \ |
112 | "#include added by oe-selftest.py\ninclude selftest.inc") | 117 | "#include added by oe-selftest.py\ninclude selftest.inc") |
113 | 118 | ||
119 | if "#include added by oe-selftest.py" \ | ||
120 | in ftools.read_file(os.path.join(builddir, "conf/bblayers.conf")): | ||
121 | log.info("Removing the include from bblayers.conf") | ||
122 | ftools.remove_from_file(os.path.join(builddir, "conf/bblayers.conf"), \ | ||
123 | "#include added by oe-selftest.py\ninclude bblayers.inc") | ||
114 | 124 | ||
115 | def remove_inc_files(): | 125 | def remove_inc_files(): |
116 | try: | 126 | try: |
@@ -122,6 +132,11 @@ def remove_inc_files(): | |||
122 | except (AttributeError, OSError,) as e: # AttributeError may happen if BUILDDIR is not set | 132 | except (AttributeError, OSError,) as e: # AttributeError may happen if BUILDDIR is not set |
123 | pass | 133 | pass |
124 | 134 | ||
135 | try: | ||
136 | os.remove(os.path.join(os.environ.get("BUILDDIR"), "conf/bblayers.inc")) | ||
137 | except: | ||
138 | pass | ||
139 | |||
125 | def get_tests(exclusive_modules=[], include_hidden=False): | 140 | def get_tests(exclusive_modules=[], include_hidden=False): |
126 | testslist = [] | 141 | testslist = [] |
127 | for x in exclusive_modules: | 142 | for x in exclusive_modules: |
@@ -167,7 +182,6 @@ def main(): | |||
167 | print e | 182 | print e |
168 | pass | 183 | pass |
169 | 184 | ||
170 | |||
171 | if args.run_tests or args.run_all_tests: | 185 | if args.run_tests or args.run_all_tests: |
172 | if not preflight_check(): | 186 | if not preflight_check(): |
173 | return 1 | 187 | return 1 |