scripts: Handle missing partitions in collect script

Add an extra check in the data collection script to ensure partitions
are found in the image.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt 2019-03-21 12:16:43 +00:00
parent c70ba4844f
commit bdf6b2d49d

View File

@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2017-2018 Intel Corporation
# Copyright (c) 2017-2019 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
@ -407,6 +407,11 @@ get_image_details()
fi
partitions=$(get_partitions "$loop_device")
if [ -z "$partitions" ]; then
release_device "$loop_device"
continue
fi
count=$(echo "$partitions"|wc -l)
expected=1