]> code.ossystems Code Review - openembedded-core.git/commitdiff
staging.bbclass: make subprocess.check_output() capture stderr
authorRobert Yang <liezhi.yang@windriver.com>
Tue, 10 Oct 2017 08:54:12 +0000 (01:54 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 6 Jan 2018 10:13:39 +0000 (10:13 +0000)
This is very useful for debugging. The similar to testsdk.bbclass.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/staging.bbclass
meta/classes/testsdk.bbclass

index c479bd93eac003378496e6340b38b3af0d6aced1..1b9e84d97eee1212d1d13a644fc80ac4a8b14695 100644 (file)
@@ -171,7 +171,7 @@ def staging_processfixme(fixme, target, recipesysroot, recipesysrootnative, d):
         fixme_path = d.getVar(fixmevar)
         cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path)
     bb.debug(2, cmd)
-    subprocess.check_output(cmd, shell=True)
+    subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
 
 
 def staging_populate_sysroot_dir(targetsysroot, nativesysroot, native, d):
@@ -228,7 +228,7 @@ def staging_populate_sysroot_dir(targetsysroot, nativesysroot, native, d):
 
     staging_processfixme(fixme, targetdir, targetsysroot, nativesysroot, d)
     for p in postinsts:
-        subprocess.check_output(p, shell=True)
+        subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)
 
 #
 # Manifests here are complicated. The main sysroot area has the unpacked sstate
@@ -576,7 +576,7 @@ python extend_recipe_sysroot() {
             staging_processfixme(fixme[f], multilibs[f].getVar("RECIPE_SYSROOT"), recipesysroot, recipesysrootnative, d)
 
     for p in postinsts:
-        subprocess.check_output(p, shell=True)
+        subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)
 
     for dep in manifests:
         c = setscenedeps[dep][0]
index 6b51a33db2a2b4f05f63f2fc97a0faf0d2f2ba0a..9fe8c34fc247344aabefbf1cca35e41e90842dd2 100644 (file)
@@ -159,7 +159,8 @@ def testsdkext_main(d):
             f.write('INHERIT += "own-mirrors"')
 
         # We need to do this in case we have a minimal SDK
-        subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % sdk_env, cwd=sdk_dir, shell=True)
+        subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % \
+                sdk_env, cwd=sdk_dir, shell=True, stderr=subprocess.STDOUT)
 
         tc = OESDKExtTestContext(td=test_data, logger=logger, sdk_dir=sdk_dir,
             sdk_env=sdk_env, target_pkg_manifest=target_pkg_manifest,