]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/oetest: show stderr when running commands
authorRoss Burton <ross.burton@intel.com>
Wed, 14 Sep 2016 22:14:07 +0000 (23:14 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 15 Sep 2016 21:56:37 +0000 (22:56 +0100)
To help debug failures, redirect stderr to stdout in oeSDKTest.run() and
oeSDKExtTest.run().

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/oetest.py

index cf7e8628d8d49857a4a791fd3fe369bf9d4b42aa..95d3bf72fc0ee32436d0ca4a4f20140057db462d 100644 (file)
@@ -152,13 +152,12 @@ class oeSDKTest(oeTest):
 
     @classmethod
     def hasHostPackage(self, pkg):
-
         if re.search(pkg, oeTest.tc.hostpkgmanifest):
             return True
         return False
 
     def _run(self, cmd):
-        return subprocess.check_output(". %s > /dev/null; %s;" % (self.tc.sdkenv, cmd), shell=True).decode("utf-8")
+        return subprocess.check_output(". %s > /dev/null; %s;" % (self.tc.sdkenv, cmd), shell=True, stderr=subprocess.STDOUT).decode("utf-8")
 
 class oeSDKExtTest(oeSDKTest):
     def _run(self, cmd):
@@ -170,7 +169,7 @@ class oeSDKExtTest(oeSDKTest):
         env['PATH'] = avoid_paths_in_environ(paths_to_avoid)
 
         return subprocess.check_output(". %s > /dev/null;"\
-            " %s;" % (self.tc.sdkenv, cmd), shell=True, env=env).decode("utf-8")
+            " %s;" % (self.tc.sdkenv, cmd), stderr=subprocess.STDOUT, shell=True, env=env).decode("utf-8")
 
 def getmodule(pos=2):
     # stack returns a list of tuples containg frame information