Skip to content

Commit 9fd9ed6

Browse files
committed
Check output file size
1 parent 6d532b5 commit 9fd9ed6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

dicom2mesh/test/test-ppa-dicom2mesh.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,16 @@ echo "Running dicom2mesh..."
2525
dicom2mesh -i "$INPUT_FILE" -o "$OUTPUT_FILE" # <-- You will adjust this command line as needed
2626

2727
# Step 4: Check output
28-
if [ -f "$OUTPUT_FILE" ]; then
29-
echo "✅ Output file '$OUTPUT_FILE' was successfully generated."
28+
if [ -s "$OUTPUT_FILE" ]; then
29+
echo "✅ Output file '$OUTPUT_FILE' exists and is not empty."
30+
ls -lh "$OUTPUT_FILE"
3031
exit 0
32+
elif [ -f "$OUTPUT_FILE" ]; then
33+
echo "❌ Output file '$OUTPUT_FILE' exists but is empty."
34+
exit 1
3135
else
3236
echo "❌ Output file '$OUTPUT_FILE' was not found."
3337
exit 1
3438
fi
3539

40+

0 commit comments

Comments
 (0)