Merge "run_functests: handle build without tar"

This commit is contained in:
Zuul 2020-03-31 05:03:05 +00:00 committed by Gerrit Code Review
commit f6aeae70c1

View File

@ -162,6 +162,7 @@ function run_disk_element_test() {
fi fi
fi fi
if [[ "tar" =~ "$output_format" ]]; then
# check inside the tar for sentinel files # check inside the tar for sentinel files
if ! [ -f "$dest_dir/image.tar" ]; then if ! [ -f "$dest_dir/image.tar" ]; then
echo "Error: Build failed for element: $element, test-element: $test_element." 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." echo "Error: Element: $element, test-element $test_element should have failed, but passed."
logfile_status "FAIL" "${logfile}" logfile_status "FAIL" "${logfile}"
exit 1 exit 1
else fi
fi
fi
# if we got here, the test passed
echo "PASS: Element $element, test-element: $test_element" echo "PASS: Element $element, test-element: $test_element"
logfile_status "PASS" "${logfile}" logfile_status "PASS" "${logfile}"
fi
fi
else else
if [ -f "${dest_dir}/dib-test-should-fail" ]; then if [ -f "${dest_dir}/dib-test-should-fail" ]; then
echo "PASS: Element $element, test-element: $test_element" echo "PASS: Element $element, test-element: $test_element"