Merge "run_functests: handle build without tar"
This commit is contained in:
commit
f6aeae70c1
@ -162,22 +162,25 @@ function run_disk_element_test() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check inside the tar for sentinel files
|
if [[ "tar" =~ "$output_format" ]]; then
|
||||||
if ! [ -f "$dest_dir/image.tar" ]; then
|
# check inside the tar for sentinel files
|
||||||
echo "Error: Build failed for element: $element, test-element: $test_element."
|
if ! [ -f "$dest_dir/image.tar" ]; then
|
||||||
echo "No image $dest_dir/image.tar found!"
|
echo "Error: Build failed for element: $element, test-element: $test_element."
|
||||||
logfile_status "FAIL" "${logfile}"
|
echo "No image $dest_dir/image.tar found!"
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
if tar -tf $dest_dir/image.tar | grep -q /tmp/dib-test-should-fail; then
|
|
||||||
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
|
else
|
||||||
echo "PASS: Element $element, test-element: $test_element"
|
if tar -tf $dest_dir/image.tar | grep -q /tmp/dib-test-should-fail; then
|
||||||
logfile_status "PASS" "${logfile}"
|
echo "Error: Element: $element, test-element $test_element should have failed, but passed."
|
||||||
|
logfile_status "FAIL" "${logfile}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# if we got here, the test passed
|
||||||
|
echo "PASS: Element $element, test-element: $test_element"
|
||||||
|
logfile_status "PASS" "${logfile}"
|
||||||
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"
|
||||||
|
Loading…
Reference in New Issue
Block a user