diff options
Diffstat (limited to 'scripts/oe-selftest')
-rwxr-xr-x | scripts/oe-selftest | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/scripts/oe-selftest b/scripts/oe-selftest index 52366b1c8d..490915759f 100755 --- a/scripts/oe-selftest +++ b/scripts/oe-selftest | |||
@@ -159,56 +159,6 @@ def preflight_check(): | |||
159 | 159 | ||
160 | return True | 160 | return True |
161 | 161 | ||
162 | def add_include(): | ||
163 | global builddir | ||
164 | if "#include added by oe-selftest.py" \ | ||
165 | not in ftools.read_file(os.path.join(builddir, "conf/local.conf")): | ||
166 | log.info("Adding: \"include selftest.inc\" in local.conf") | ||
167 | ftools.append_file(os.path.join(builddir, "conf/local.conf"), \ | ||
168 | "\n#include added by oe-selftest.py\ninclude machine.inc\ninclude selftest.inc") | ||
169 | |||
170 | if "#include added by oe-selftest.py" \ | ||
171 | not in ftools.read_file(os.path.join(builddir, "conf/bblayers.conf")): | ||
172 | log.info("Adding: \"include bblayers.inc\" in bblayers.conf") | ||
173 | ftools.append_file(os.path.join(builddir, "conf/bblayers.conf"), \ | ||
174 | "\n#include added by oe-selftest.py\ninclude bblayers.inc") | ||
175 | |||
176 | def remove_include(): | ||
177 | global builddir | ||
178 | if builddir is None: | ||
179 | return | ||
180 | if "#include added by oe-selftest.py" \ | ||
181 | in ftools.read_file(os.path.join(builddir, "conf/local.conf")): | ||
182 | log.info("Removing the include from local.conf") | ||
183 | ftools.remove_from_file(os.path.join(builddir, "conf/local.conf"), \ | ||
184 | "\n#include added by oe-selftest.py\ninclude machine.inc\ninclude selftest.inc") | ||
185 | |||
186 | if "#include added by oe-selftest.py" \ | ||
187 | in ftools.read_file(os.path.join(builddir, "conf/bblayers.conf")): | ||
188 | log.info("Removing the include from bblayers.conf") | ||
189 | ftools.remove_from_file(os.path.join(builddir, "conf/bblayers.conf"), \ | ||
190 | "\n#include added by oe-selftest.py\ninclude bblayers.inc") | ||
191 | |||
192 | def remove_inc_files(): | ||
193 | global builddir | ||
194 | if builddir is None: | ||
195 | return | ||
196 | try: | ||
197 | os.remove(os.path.join(builddir, "conf/selftest.inc")) | ||
198 | for root, _, files in os.walk(get_test_layer()): | ||
199 | for f in files: | ||
200 | if f == 'test_recipe.inc': | ||
201 | os.remove(os.path.join(root, f)) | ||
202 | except OSError as e: | ||
203 | pass | ||
204 | |||
205 | for incl_file in ['conf/bblayers.inc', 'conf/machine.inc']: | ||
206 | try: | ||
207 | os.remove(os.path.join(builddir, incl_file)) | ||
208 | except: | ||
209 | pass | ||
210 | |||
211 | |||
212 | def get_tests_modules(include_hidden=False): | 162 | def get_tests_modules(include_hidden=False): |
213 | modules_list = list() | 163 | modules_list = list() |
214 | for modules_path in oeqa.selftest.__path__: | 164 | for modules_path in oeqa.selftest.__path__: |
@@ -583,7 +533,6 @@ def main(): | |||
583 | log.error("Failed to import %s" % test) | 533 | log.error("Failed to import %s" % test) |
584 | log.error(e) | 534 | log.error(e) |
585 | return 1 | 535 | return 1 |
586 | add_include() | ||
587 | 536 | ||
588 | if args.machine: | 537 | if args.machine: |
589 | # Custom machine sets only weak default values (??=) for MACHINE in machine.inc | 538 | # Custom machine sets only weak default values (??=) for MACHINE in machine.inc |
@@ -808,7 +757,4 @@ if __name__ == "__main__": | |||
808 | ret = 1 | 757 | ret = 1 |
809 | import traceback | 758 | import traceback |
810 | traceback.print_exc() | 759 | traceback.print_exc() |
811 | finally: | ||
812 | remove_include() | ||
813 | remove_inc_files() | ||
814 | sys.exit(ret) | 760 | sys.exit(ret) |