]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa: sdk: Capture stderr output
authorJoshua Watt <JPEWhacker@gmail.com>
Mon, 31 Aug 2020 21:53:53 +0000 (16:53 -0500)
committerSteve Sakoman <steve@sakoman.com>
Thu, 3 Sep 2020 03:08:51 +0000 (17:08 -1000)
Redirect stderr to stdout when running subcommands while doing the SDK
tests. The tests will show stdout when CalledProcessError is raised,
but any output to stderr was lost.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 7cb4e9ab8c1596281060e94a216966060103956e)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oeqa/sdk/case.py
meta/lib/oeqa/sdk/cases/assimp.py
meta/lib/oeqa/sdk/cases/buildcpio.py
meta/lib/oeqa/sdk/cases/buildepoxy.py
meta/lib/oeqa/sdk/cases/buildgalculator.py
meta/lib/oeqa/sdk/cases/buildlzip.py

index ebb03af9eb0af116bd5516d19e36bedfd86de363..c45882689cb55b89e0739ab2630f12efe64469fb 100644 (file)
@@ -26,7 +26,7 @@ class OESDKTestCase(OETestCase):
                 return tarball
 
         tarball = os.path.join(workdir, archive)
-        subprocess.check_output(["wget", "-O", tarball, url])
+        subprocess.check_output(["wget", "-O", tarball, url], stderr=subprocess.STDOUT)
         return tarball
 
     def check_elf(self, path, target_os=None, target_arch=None):
index f26b17f2e92d54c0b7605779c4be3876bb405261..f166758e498736e1354f781fb1f6a33d734e04a1 100644 (file)
@@ -30,7 +30,7 @@ class BuildAssimp(OESDKTestCase):
             dirs["build"] = os.path.join(testdir, "build")
             dirs["install"] = os.path.join(testdir, "install")
 
-            subprocess.check_output(["tar", "xf", tarball, "-C", testdir])
+            subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT)
             self.assertTrue(os.path.isdir(dirs["source"]))
             os.makedirs(dirs["build"])
 
index 902e93f623b471bea444e0b621c5f4f36087327c..681d0e750daa9093019b29983680c27f81e36502 100644 (file)
@@ -24,7 +24,7 @@ class BuildCpioTest(OESDKTestCase):
             dirs["build"] = os.path.join(testdir, "build")
             dirs["install"] = os.path.join(testdir, "install")
 
-            subprocess.check_output(["tar", "xf", tarball, "-C", testdir])
+            subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT)
             self.assertTrue(os.path.isdir(dirs["source"]))
             os.makedirs(dirs["build"])
 
index 4211955f8d3af0efdbb55f0f635649a1f1422316..385f8ccca83efa9e132671965866e89946f67d26 100644 (file)
@@ -28,7 +28,7 @@ class EpoxyTest(OESDKTestCase):
             dirs["build"] = os.path.join(testdir, "build")
             dirs["install"] = os.path.join(testdir, "install")
 
-            subprocess.check_output(["tar", "xf", tarball, "-C", testdir])
+            subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT)
             self.assertTrue(os.path.isdir(dirs["source"]))
             os.makedirs(dirs["build"])
 
index bbaa5c55c913866e632db4cbccd6454790e4f5ed..4d85adcaf1df56f87703be074f81d5b1fc2a4147 100644 (file)
@@ -31,7 +31,7 @@ class GalculatorTest(OESDKTestCase):
             dirs["build"] = os.path.join(testdir, "build")
             dirs["install"] = os.path.join(testdir, "install")
 
-            subprocess.check_output(["tar", "xf", tarball, "-C", testdir])
+            subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT)
             self.assertTrue(os.path.isdir(dirs["source"]))
             os.makedirs(dirs["build"])
 
index 515acd2891f568e16061e0434b36c910e16703fd..49ae756bf3c4d1b14152dd2603b074ea2ced2c16 100644 (file)
@@ -20,7 +20,7 @@ class BuildLzipTest(OESDKTestCase):
             dirs["build"] = os.path.join(testdir, "build")
             dirs["install"] = os.path.join(testdir, "install")
 
-            subprocess.check_output(["tar", "xf", tarball, "-C", testdir])
+            subprocess.check_output(["tar", "xf", tarball, "-C", testdir], stderr=subprocess.STDOUT)
             self.assertTrue(os.path.isdir(dirs["source"]))
             os.makedirs(dirs["build"])