[TMP] Crash handling from splitSources.py

This commit is contained in:
Kamil Śliwak 2020-11-17 16:43:35 +01:00
parent 9440691a3a
commit b6ba8fd067
3 changed files with 3 additions and 8 deletions

View File

@ -122,7 +122,7 @@ do
testImportExportEquivalence "$solfile"
elif [ ${SPLITSOURCES_RC} == 2 ]
then
# The script will exit with return code 2, if an UnicodeDecodeError occurred.
# Return code 2 means an exit due to UnicodeDecodeError in the input file.
# This is the case if e.g. some tests are using invalid utf-8 sequences. We will ignore
# these errors, but print the actual output of the script.
echo -e "\n${OUTPUT}\n"
@ -130,7 +130,6 @@ do
else
# All other return codes will be treated as critical errors. The script will exit.
echo -e "\nGot unexpected return code ${SPLITSOURCES_RC} from ${SPLITSOURCES}. Aborting."
echo -e "\n${OUTPUT}\n"
cd "$WORKINGDIR"
# Delete temporary files

View File

@ -77,7 +77,4 @@ if __name__ == '__main__':
sys.exit(1)
except UnicodeDecodeError as ude:
print("UnicodeDecodeError in '" + filePath + "': " + str(ude), file=sys.stderr)
print("This is expected for some tests containing invalid utf8 sequences. "
"Exception will be ignored.", file=sys.stderr)
sys.exit(2)

View File

@ -58,9 +58,8 @@ while read -r file; do
then
echo -n "<skipping utf8 error>"
else
echo "Received unexpected return code $RETURN_CODE while processing $file: "
echo "-----"
echo "$OUTPUT"
# NOTE: The split script is expected to print error details to stderr in this case.
echo "$SPLITSOURCES exited with code $RETURN_CODE while processing $file."
exit 3
fi