From 79d4f09e9ddd169b32948c6e74c788676d769e4c Mon Sep 17 00:00:00 2001 From: Matthew Stidham Date: Thu, 11 Nov 2021 14:12:19 -0800 Subject: [PATCH] Explain logic for parsing output of command Signed-off-by: Matthew Stidham --- py-scripts/regression_test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/py-scripts/regression_test.sh b/py-scripts/regression_test.sh index 2f27f3f7..ffbb2dd5 100755 --- a/py-scripts/regression_test.sh +++ b/py-scripts/regression_test.sh @@ -494,6 +494,8 @@ function test() { echo_print echo "$testcommand" start=$(date +%s) + # this command saves stdout and stderr to the stdout file, and has a special file for stderr text. + # Modified from https://unix.stackexchange.com/a/364176/327076 { eval "$testcommand" 2>&1 >&3 3>&- | tee "${TEST_DIR}/${NAME}_stderr.txt" 3>&-; } > "${TEST_DIR}/${NAME}.txt" 3>&1 chmod 664 "${TEST_DIR}/${NAME}.txt" FILESIZE=$(stat -c%s "${TEST_DIR}/${NAME}_stderr.txt") || 0