diff options
author | Stefan Stanacar <stefanx.stanacar@intel.com> | 2013-12-04 13:42:58 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-12-04 14:17:40 +0000 |
commit | 6008745c56800e0f5f01a756be0701cebd9de4ae (patch) | |
tree | 9f6d1d4986257d4c7b681706a02e5fe55b6fb56f /scripts/oe-selftest | |
parent | adb6e64d69fc947f2c8fa708dcbe854fd2b574f8 (diff) | |
download | openembedded-core-contrib-6008745c56800e0f5f01a756be0701cebd9de4ae.tar.gz |
lib/oeqa/selftest/base, scripts/oe-selftest: fix wrong remove path and do a complete cleanup at the end
The script should clean-up all the .inc files that might
have been created by tests regardless of the outcome or if
the script is interrupted. (currently the
last test will leave a conf/selftest.inc around, even
if it's not included anywhere)
Also fix delete_recipeinc to actually delete what's supposed to.
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-selftest')
-rwxr-xr-x | scripts/oe-selftest | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/oe-selftest b/scripts/oe-selftest index db42e73470d..29fe0100de2 100755 --- a/scripts/oe-selftest +++ b/scripts/oe-selftest @@ -97,6 +97,17 @@ def remove_include(): ftools.remove_from_file(os.path.join(builddir, "conf/local.conf"), \ "#include added by oe-selftest.py\ninclude selftest.inc") + +def remove_inc_files(): + try: + os.remove(os.path.join(os.environ.get("BUILDDIR"), "conf/selftest.inc")) + for root, _, files in os.walk(get_test_layer()): + for f in files: + if f == 'test_recipe.inc': + os.remove(os.path.join(root, f)) + except OSError as e: + pass + def get_tests(): testslist = [] for x in sys.argv[1:]: @@ -145,4 +156,5 @@ if __name__ == "__main__": traceback.print_exc(5) finally: remove_include() + remove_inc_files() sys.exit(ret) |