diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/testimage.bbclass | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index 70e28004fe..c62e391ec2 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass @@ -311,13 +311,15 @@ def testimage_main(d): import traceback bb.fatal("Loading tests failed:\n%s" % traceback.format_exc()) - target.deploy() - try: - target.start() - if export: - exportTests(d,tc) - else: + if export: + signal.signal(signal.SIGTERM, tc.origsigtermhandler) + tc.origsigtermhandler = None + exportTests(d,tc) + else: + target.deploy() + try: + target.start() starttime = time.time() result = runTests(tc) stoptime = time.time() @@ -330,9 +332,9 @@ def testimage_main(d): bb.plain(msg) else: raise bb.build.FuncFailed("%s - FAILED - check the task log and the ssh log" % pn ) - finally: - signal.signal(signal.SIGTERM, tc.origsigtermhandler) - target.stop() + finally: + signal.signal(signal.SIGTERM, tc.origsigtermhandler) + target.stop() testimage_main[vardepsexclude] =+ "BB_ORIGENV" |