Skip to content

Commit

Permalink
Display failed exit code.
Browse files Browse the repository at this point in the history
  • Loading branch information
John-LittleBearLabs committed Sep 16, 2024
1 parent 2725a9c commit 053c524
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/tour.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ echo Build clitester
cmake --build tester_build --config Release

echo Start test server
( timeout 600 python3 ./ipfs_chromium/test_data/test_server.py 8080 2>&1 | tee server.log & ) &
( timeout 999 python3 ./ipfs_chromium/test_data/test_server.py 8080 2>&1 | tee server.log & ) &
for t in 1{0..9}
do
if grep -n . server.log
Expand All @@ -59,11 +59,15 @@ function url_case() {
echo "test case description =${4}"
ll="${5-note}"
echo "log level = ${ll}"
if timeout 430 ./tester_build/clitester "${ll}" "${1}://${2}"
set +x
timeout 440 ./tester_build/clitester "${ll}" "${1}://${2}"
ec=$?
set -x
if [ ${ec} -eq 0 ]
then
echo clitester exited with successful status
else
echo "Directly reported error code from clitester run - usually means timeout killed it. " "${@}"
echo "Directly reported error code ${ec} from clitester run - usually means timeout killed it. " "${@}"
exit 6
fi
n=`sed 's,[^A-Za-z0-9\.],_,g' <<< ${2}`
Expand Down Expand Up @@ -96,9 +100,13 @@ function url_case() {
}
unstable_case() {
if ! timeout 400 ./tester_build/clitester "ipns://${1}"
set +x
timeout 401 ./tester_build/clitester "ipns://${1}"
ec=$?
set -x
if [ ${ec} -ne 0 ]
then
echo "clitester (or timeout) exited with failure code for ipns://${1}"
echo "clitester (or timeout) failed with exit code ${ec} for ipns://${1}"
exit 5
fi
n=`sed 's,[^A-Za-z0-9\.],_,g' <<< ${1}`
Expand Down

0 comments on commit 053c524

Please sign in to comment.