oeqa/sdkext/devtool: use finally instead of repeating cleanup

Use the finally: block to always to cleanup.

Now that the test harness in testsdk.bbclass has monkey-patched
CalledProcessException to display the output we don't need to do that in the
test case.

(From OE-Core rev: 9f0f6326083ee76b72b431fbfcbe12c1ab2793b2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2017-03-01 12:21:34 +00:00
committed by Richard Purdie
parent 726832895d
commit 88c1fb2f0c
2 changed files with 13 additions and 26 deletions

View File

@@ -100,7 +100,7 @@ def testsdkext_main(d):
import logging
from bb.utils import export_proxies
from oeqa.utils import avoid_paths_in_environ, make_logger_bitbake_compatible
from oeqa.utils import avoid_paths_in_environ, make_logger_bitbake_compatible, subprocesstweak
from oeqa.sdkext.context import OESDKExtTestContext, OESDKExtTestContextExecutor
pn = d.getVar("PN")
@@ -109,6 +109,8 @@ def testsdkext_main(d):
# extensible sdk use network
export_proxies(d)
subprocesstweak.errors_have_output()
# extensible sdk can be contaminated if native programs are
# in PATH, i.e. use perl-native instead of eSDK one.
paths_to_avoid = [d.getVar('STAGING_DIR'),