run_functests: handle build without tar
It seems this code does not consider that you might set test-output-formats with only "qcow2" -- it currently also tries to inspect a .tar output. Skip if tar isn't in the output format list, and fall through to passing so both paths are considered success, only exiting if there is a failure. Change-Id: Ia21dbfd298d04b04ec02dfe76a0acd7c9a7a31f2
This commit is contained in:
parent
21f9ea4f78
commit
92b5b84c0d
@ -162,6 +162,7 @@ function run_disk_element_test() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "tar" =~ "$output_format" ]]; then
|
||||
# check inside the tar for sentinel files
|
||||
if ! [ -f "$dest_dir/image.tar" ]; then
|
||||
echo "Error: Build failed for element: $element, test-element: $test_element."
|
||||
@ -173,11 +174,13 @@ function run_disk_element_test() {
|
||||
echo "Error: Element: $element, test-element $test_element should have failed, but passed."
|
||||
logfile_status "FAIL" "${logfile}"
|
||||
exit 1
|
||||
else
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# if we got here, the test passed
|
||||
echo "PASS: Element $element, test-element: $test_element"
|
||||
logfile_status "PASS" "${logfile}"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ -f "${dest_dir}/dib-test-should-fail" ]; then
|
||||
echo "PASS: Element $element, test-element: $test_element"
|
||||
|
Loading…
Reference in New Issue
Block a user