Rename debug output files

This commit is contained in:
Manuel Thalmann 2023-03-24 23:19:58 +00:00
parent e42cd21de8
commit 78c2baf355

View file

@ -96,7 +96,7 @@ RUN \
maxCount=120; \ maxCount=120; \
while ps -p $pid > /dev/null && [ $x -ne $maxCount ]; do \ while ps -p $pid > /dev/null && [ $x -ne $maxCount ]; do \
# Create screenshot and print it to the console # Create screenshot and print it to the console
fileName=screens/pit$try-$x.png; \ fileName=screens/install-try$try-$x.png; \
import -window root $fileName; \ import -window root $fileName; \
tiv -w 10000 -h 10000 $fileName; \ tiv -w 10000 -h 10000 $fileName; \
x=$(bash -c "declare -i x=$x+1; echo "'$x'); \ x=$(bash -c "declare -i x=$x+1; echo "'$x'); \
@ -104,7 +104,7 @@ RUN \
sleep 1; \ sleep 1; \
done; \ done; \
# Kill installer after timeout indicated by `maxCount` # Kill installer after timeout indicated by `maxCount`
[ $x -eq $maxCount ] && { pkill -9 MDK537.exe; mv log.txt logs/timeout-$try.txt; }; \ [ $x -eq $maxCount ] && { pkill -9 MDK537.exe; mv log.txt logs/timeout-try$try.log; }; \
} & \ } & \
}; \ }; \
wait $pid; \ wait $pid; \
@ -114,9 +114,9 @@ RUN \
&& [ -f log.txt ] \ && [ -f log.txt ] \
&& { \ && { \
# Move logs to location based on exit code # Move logs to location based on exit code
[ $exitCode -eq 0 ] && mv log.txt logs/success-$try.txt; \ [ $exitCode -eq 0 ] && mv log.txt logs/success-try$try.log; \
[ $exitCode -eq 42 ] && mv log.txt logs/timeout-prevented-$try.txt; \ [ $exitCode -eq 42 ] && mv log.txt logs/timeout-handled-try$try.log; \
[ $exitCode -ne 0 ] && mv log.txt logs/fail-$try.txt; \ [ $exitCode -ne 0 ] && mv log.txt logs/fail-try$try.log; \
}; \ }; \
[ $exitCode -ne 0 ] && { \ [ $exitCode -ne 0 ] && { \
[ $exitCode -eq 42 ] && echo "The installation got stuck" || \ [ $exitCode -eq 42 ] && echo "The installation got stuck" || \