              self.power_ctl("cycle")
          else:
 -            status, output = conn.run("reboot")
-+            status, output = conn.run("{ sleep 1; reboot; } > /dev/null &")
++            status, output = conn.run("sync; { sleep 1; reboot; } > /dev/null &")
              if status != 0:
                  bb.error("Failed rebooting target and no power control command defined. You need to manually reset the device.\n%s" % output)
  

From 7f2988cc0e50062277908b485c3a623d025e4cf9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Erik=20Bot=C3=B6?= <erik.boto@pelagicore.com>
Date: Thu, 18 May 2017 15:12:56 +0200
Subject: [PATCH] Fix automated runtime testing using SystemdbootTarget

 3 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 6b6781d..3994d18 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -158,7 +158,7 @@ def testimage_main(d):
