* [OE-core][PATCH] oeqa: sdk: Capture stderr output
@ 2020-08-31 21:53 Joshua Watt
2020-09-01 11:03 ` Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: Joshua Watt @ 2020-08-31 21:53 UTC (permalink / raw)
To: openembedded-core; +Cc: Joshua Watt
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>
---
meta/lib/oeqa/sdk/case.py | 2 +-
meta/lib/oeqa/sdk/cases/assimp.py | 2 +-
meta/lib/oeqa/sdk/cases/buildcpio.py | 2 +-
meta/lib/oeqa/sdk/cases/buildepoxy.py | 2 +-
meta/lib/oeqa/sdk/cases/buildgalculator.py | 2 +-
meta/lib/oeqa/sdk/cases/buildlzip.py | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
index ebb03af9eb..c45882689c 100644
--- a/meta/lib/oeqa/sdk/case.py
+++ b/meta/lib/oeqa/sdk/case.py
@@ -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):
diff --git a/meta/lib/oeqa/sdk/cases/assimp.py b/meta/lib/oeqa/sdk/cases/assimp.py
index f26b17f2e9..f166758e49 100644
--- a/meta/lib/oeqa/sdk/cases/assimp.py
+++ b/meta/lib/oeqa/sdk/cases/assimp.py
@@ -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"])
diff --git a/meta/lib/oeqa/sdk/cases/buildcpio.py b/meta/lib/oeqa/sdk/cases/buildcpio.py
index e565826541..e7fc211a47 100644
--- a/meta/lib/oeqa/sdk/cases/buildcpio.py
+++ b/meta/lib/oeqa/sdk/cases/buildcpio.py
@@ -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"])
diff --git a/meta/lib/oeqa/sdk/cases/buildepoxy.py b/meta/lib/oeqa/sdk/cases/buildepoxy.py
index 4211955f8d..385f8ccca8 100644
--- a/meta/lib/oeqa/sdk/cases/buildepoxy.py
+++ b/meta/lib/oeqa/sdk/cases/buildepoxy.py
@@ -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"])
diff --git a/meta/lib/oeqa/sdk/cases/buildgalculator.py b/meta/lib/oeqa/sdk/cases/buildgalculator.py
index 1121ed20ef..eb3c8ddf39 100644
--- a/meta/lib/oeqa/sdk/cases/buildgalculator.py
+++ b/meta/lib/oeqa/sdk/cases/buildgalculator.py
@@ -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"])
diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py b/meta/lib/oeqa/sdk/cases/buildlzip.py
index 515acd2891..49ae756bf3 100644
--- a/meta/lib/oeqa/sdk/cases/buildlzip.py
+++ b/meta/lib/oeqa/sdk/cases/buildlzip.py
@@ -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"])
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [OE-core][PATCH] oeqa: sdk: Capture stderr output
2020-08-31 21:53 [OE-core][PATCH] oeqa: sdk: Capture stderr output Joshua Watt
@ 2020-09-01 11:03 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2020-09-01 11:03 UTC (permalink / raw)
To: Joshua Watt, openembedded-core
On Mon, 2020-08-31 at 16:53 -0500, Joshua Watt wrote:
> 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>
> ---
> meta/lib/oeqa/sdk/case.py | 2 +-
> meta/lib/oeqa/sdk/cases/assimp.py | 2 +-
> meta/lib/oeqa/sdk/cases/buildcpio.py | 2 +-
> meta/lib/oeqa/sdk/cases/buildepoxy.py | 2 +-
> meta/lib/oeqa/sdk/cases/buildgalculator.py | 2 +-
> meta/lib/oeqa/sdk/cases/buildlzip.py | 2 +-
> 6 files changed, 6 insertions(+), 6 deletions(-)
Thanks, I ran into this the other day and have a note left on my
desktop to remind me to try and figure out what was happening!
Cheers,
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-01 11:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-31 21:53 [OE-core][PATCH] oeqa: sdk: Capture stderr output Joshua Watt
2020-09-01 11:03 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox