diff --git a/tests/full-version-label.sh b/tests/full-version-label.sh index 663c4e60c59..2a988980252 100755 --- a/tests/full-version-label.sh +++ b/tests/full-version-label.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -eo pipefail # The purpose of this test is to ensure that the output of the "nodeos --full-version" command matches the version string defined by our CMake files echo '##### Nodeos Full Version Label Test #####' # orient ourselves diff --git a/tests/print-build-info.sh b/tests/print-build-info.sh index a5d20214338..79195e9603d 100755 --- a/tests/print-build-info.sh +++ b/tests/print-build-info.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -eo pipefail # The purpose of this test is to ensure that the output of the "nodeos --print-build-info" command. # This includes verifying valid output in JSON shape and checking parameters (only boost for now). echo '##### Nodeos Print Build Info Test #####' @@ -8,13 +9,10 @@ echo '##### Nodeos Print Build Info Test #####' [[ "$EOSIO_ROOT" == '' ]] && EOSIO_ROOT=$(echo $(pwd)/ | grep -ioe '.*/build/' | sed 's,/build/,,') echo "Using EOSIO_ROOT=\"$EOSIO_ROOT\"." -OUTPUT=$($EOSIO_ROOT/build/bin/nodeos --print-build-info 2>&1) -EXIT_CODE=$? -echo "$OUTPUT" -if [[ $EXIT_CODE -eq 0 ]]; then - echo 'Expected non-zero nodeos exit code.' - exit 1 -fi +exec 9>&1 # enable tee to write to STDOUT as a file +PRINT_BUILD_INFO="$EOSIO_ROOT/build/bin/nodeos --print-build-info 2>&1 | tee >(cat - >&9) || :" +echo "$ $PRINT_BUILD_INFO" +OUTPUT="$(eval $PRINT_BUILD_INFO)" OUTPUT=$(echo "$OUTPUT" | tr -d '\r\n') OUTPUT=$(echo "$OUTPUT" | sed -E 's/^.+JSON://') diff --git a/tests/version-label.sh b/tests/version-label.sh index 2add83d7ebc..769b8f60c1e 100755 --- a/tests/version-label.sh +++ b/tests/version-label.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -eo pipefail # The purpose of this test is to ensure that the output of the "nodeos --version" command matches the version string defined by our CMake files echo '##### Nodeos Version Label Test #####' # orient ourselves