[meta-oe] libgpiod: ptest: redirect stderr to stdout for test executables

Message ID 20211130145250.6287-1-brgl@bgdev.pl
State New
Headers show
Series [meta-oe] libgpiod: ptest: redirect stderr to stdout for test executables | expand

Commit Message

Bartosz Golaszewski Nov. 30, 2021, 2:52 p.m. UTC
Catch2 (used by the C++ tests) prints its output to stderr instead of
stdout. Redirect stderr to stdout for all test executables.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
---
 meta-oe/recipes-support/libgpiod/files/run-ptest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta-oe/recipes-support/libgpiod/files/run-ptest b/meta-oe/recipes-support/libgpiod/files/run-ptest
index 60c661fc1..61b9b69fc 100644
--- a/meta-oe/recipes-support/libgpiod/files/run-ptest
+++ b/meta-oe/recipes-support/libgpiod/files/run-ptest
@@ -7,7 +7,7 @@  cd $ptestdir/tests
 
 for testbin in $testbins; do
 	if test -e ./$testbin; then
-		./$testbin > ./$testbin.out
+		./$testbin > ./$testbin.out 2>&1
 		if [ $? -ne 0 ]; then
 			echo "FAIL: $testbin"
 		else