diff options
| -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): | |||
| 311 | import traceback | 311 | import traceback |
| 312 | bb.fatal("Loading tests failed:\n%s" % traceback.format_exc()) | 312 | bb.fatal("Loading tests failed:\n%s" % traceback.format_exc()) |
| 313 | 313 | ||
| 314 | target.deploy() | ||
| 315 | 314 | ||
| 316 | try: | 315 | if export: |
| 317 | target.start() | 316 | signal.signal(signal.SIGTERM, tc.origsigtermhandler) |
| 318 | if export: | 317 | tc.origsigtermhandler = None |
| 319 | exportTests(d,tc) | 318 | exportTests(d,tc) |
| 320 | else: | 319 | else: |
| 320 | target.deploy() | ||
| 321 | try: | ||
| 322 | target.start() | ||
| 321 | starttime = time.time() | 323 | starttime = time.time() |
| 322 | result = runTests(tc) | 324 | result = runTests(tc) |
| 323 | stoptime = time.time() | 325 | stoptime = time.time() |
| @@ -330,9 +332,9 @@ def testimage_main(d): | |||
| 330 | bb.plain(msg) | 332 | bb.plain(msg) |
| 331 | else: | 333 | else: |
| 332 | raise bb.build.FuncFailed("%s - FAILED - check the task log and the ssh log" % pn ) | 334 | raise bb.build.FuncFailed("%s - FAILED - check the task log and the ssh log" % pn ) |
| 333 | finally: | 335 | finally: |
| 334 | signal.signal(signal.SIGTERM, tc.origsigtermhandler) | 336 | signal.signal(signal.SIGTERM, tc.origsigtermhandler) |
| 335 | target.stop() | 337 | target.stop() |
| 336 | 338 | ||
| 337 | testimage_main[vardepsexclude] =+ "BB_ORIGENV" | 339 | testimage_main[vardepsexclude] =+ "BB_ORIGENV" |
| 338 | 340 | ||
