Skip to content

Commit

Permalink
save rc after exec program
Browse files Browse the repository at this point in the history
  • Loading branch information
jyganci authored and adelosa committed Oct 8, 2023
1 parent fb5b5aa commit 7167a07
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions bash/runcmdproc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ fi
export TESTCMDFILE=${rtpath}/bash/testcmd3

bash/exec ${rtpath}/${program}
rc=$?
if [ $debug -eq 1 ]; then echo "${program}: rc=$rc"; fi
if [ "$rc" -ne "0" ]; then
echo "Error ${program} rc=$rc - exiting"
exit $rc
Expand All @@ -75,7 +77,9 @@ fi
export TESTCMDFILE1=${rtpath}/bash/testcmd4a
export TESTCMDFILE2=${rtpath}/bash/testcmd4b

bash/exec ${rtpath}/${program} noinit dump
bash/exec ${rtpath}/${program}
rc=$?
if [ $debug -eq 1 ]; then echo "${program} test 1: rc=$rc"; fi
if [ "$rc" -ne "0" ]; then
echo "Error ${program} rc=$rc - exiting"
exit $rc
Expand All @@ -85,7 +89,9 @@ fi
export TESTCMDFILE1=${rtpath}/bash/testcmd4a
export TESTCMDFILE2=${rtpath}/bash/testcmd4c

bash/exec ${rtpath}/${program} noinit dump
bash/exec ${rtpath}/${program}
rc=$?
if [ $debug -eq 1 ]; then echo "${program} test 2: rc=$rc"; fi
if [ "$rc" -ne "0" ]; then
echo "Error ${program} rc=$rc - exiting"
exit $rc
Expand All @@ -94,7 +100,10 @@ fi
# names of test files for third test
export TESTCMDFILE1=${rtpath}/bash/testcmd4c
export TESTCMDFILE2=${rtpath}/bash/testcmd4b
bash/exec ${rtpath}/${program} noinit dump

bash/exec ${rtpath}/${program}
rc=$?
if [ $debug -eq 1 ]; then echo "${program} test 3: rc=$rc"; fi
if [ "$rc" -ne "0" ]; then
echo "Error ${program} rc=$rc - exiting"
exit $rc
Expand Down

0 comments on commit 7167a07

Please sign in to comment.