Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions upstream/test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,20 @@ function run() {
echo "#${v#*--}"
set -o pipefail
"$@" | tee -a $OP_TEST_LOG_DIR/log.out
[[ $? -eq 0 ]] || { echo -e "\nFailed with rc=$? !!!\nLogs are in '$OP_TEST_LOG_DIR/log.out'."; exit $?; }
exit_code=$?
if [ $exit_code -ne 0 ]; then echo -e "\nFailed with rc=$exit_code !!!\nLogs are in '$OP_TEST_LOG_DIR/log.out'."; exit $exit_code; fi
set +o pipefail
elif [[ $OP_TEST_DEBUG -ge 1 ]] ; then
set -o pipefail
"$@" | tee -a $OP_TEST_LOG_DIR/log.out
[[ $? -eq 0 ]] || { echo -e "\nFailed with rc=$? !!!\nLogs are in '$OP_TEST_LOG_DIR/log.out'."; exit $?; }
exit_code=$?
if [ $exit_code -ne 0 ]; then echo -e "\nFailed with rc=$exit_code !!!\nLogs are in '$OP_TEST_LOG_DIR/log.out'."; exit $exit_code; fi
set +o pipefail
else
set -o pipefail
"$@" | tee -a $OP_TEST_LOG_DIR/log.out >/dev/null 2>&1
[[ $? -eq 0 ]] || { echo -e "\nFailed with rc=$? !!!\nLogs are in '$OP_TEST_LOG_DIR/log.out'."; exit $?; }
exit_code=$?
if [ $exit_code -ne 0 ]; then echo -e "\nFailed with rc=$exit_code !!!\nLogs are in '$OP_TEST_LOG_DIR/log.out'."; exit $exit_code; fi
set +o pipefail
fi
}
Expand Down