diskimage-builder/tests/image_output_formats.bash
Monty Taylor 1187f9d5df Add docker output support
We can already produce tarballs, which is the input format docker import
expects. This makes it trivial to add docker as an output format.

Co-Authored-By: Dan Prince <dprince@redhat.com>

Change-Id: Ib60db3b717d33d4cf3181d70fe0ffbfa86fd5d02
2015-07-19 10:20:39 +00:00

24 lines
565 B
Bash
Executable File

#!/bin/bash
set -eux
set -o pipefail
source $(dirname $0)/test_functions.bash
test_formats="tar raw qcow2 docker"
for binary in qemu-img docker ; do
if [ -z "$(which $binary)" ]; then
echo "Warning: No $binary binary found, cowardly refusing to run tests."
exit 0
fi
done
for format in '' $test_formats; do
build_test_image $format
echo "Test passed for output formats '$format'."
done
combined_format=$(echo $test_formats | tr ' ' ',')
build_test_image $combined_format
echo "Test passed for output format '$combined_format'."