]> code.ossystems Code Review - openembedded-core.git/commitdiff
oetest: Fix regresion when testing real hardware
authorMariano Lopez <mariano.lopez@linux.intel.com>
Tue, 25 Aug 2015 01:31:08 +0000 (20:31 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 30 Aug 2015 11:34:41 +0000 (12:34 +0100)
This fix the regresion introduced in commit
9c72c1a5aa0b49d3895bbefee7a264adfcc6f4ca
when testing with real hardware. This regression
happens when a test in real hardware fails.

[YOCTO #8203]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
meta/lib/oeqa/oetest.py

index 9cb8a537953c937431aa8dc896e395c31b15c17a..f54113626b267b8536b8288e86e39611e975907d 100644 (file)
@@ -13,6 +13,7 @@ import inspect
 import subprocess
 import bb
 from oeqa.utils.decorators import LogResults
+from oeqa.targetcontrol import QemuTarget
 from sys import exc_info, exc_clear
 
 def loadTests(tc, type="runtime"):
@@ -123,12 +124,13 @@ class oeRuntimeTest(oeTest):
         if not exc_info() == (None, None, None):
             exc_clear()
             self.tc.host_dumper.create_dir(self._testMethodName)
-            self.target.target_dumper.dump_target(
-                    self.tc.host_dumper.dump_dir)
             self.tc.host_dumper.dump_host()
-            print ("%s dump data from host and target "
-                    "stored in %s" % (self._testMethodName,
-                     self.target.target_dumper.dump_dir))
+            #Only QemuTarget has a serial console
+            if (isinstance(self.target, QemuTarget)):
+                self.target.target_dumper.dump_target(
+                        self.tc.host_dumper.dump_dir)
+            print ("%s dump data stored in %s" % (self._testMethodName,
+                     self.tc.host_dumper.dump_dir))
 
     #TODO: use package_manager.py to install packages on any type of image
     def install_packages(self, packagelist):