Skip to content
Snippets Groups Projects
Commit 7fb6e89e authored by tpylak's avatar tpylak
Browse files

LMS-820 minor: make integration test error more verbose about communicating errors

SVN: 10630
parent 459fcb72
No related branches found
No related tags found
No related merge requests found
...@@ -359,9 +359,9 @@ function assert_same_inode { ...@@ -359,9 +359,9 @@ function assert_same_inode {
function assert_dir_exists { function assert_dir_exists {
local DIR=$1 local DIR=$1
if [ ! -d "$DIR" ]; then if [ ! -d "$DIR" ]; then
report_error Directory $DIR does not exist! report_error Directory \"$DIR\" does not exist!
else else
echo [OK] Directory $DIR exists echo [OK] Directory \"$DIR\" exists
fi fi
} }
...@@ -558,7 +558,14 @@ function launch_tests { ...@@ -558,7 +558,14 @@ function launch_tests {
# assumes that parent has exactly one subdirectory, echos its full path # assumes that parent has exactly one subdirectory, echos its full path
function get_single_subdirectory_path { function get_single_subdirectory_path {
local parent_dir=$1 local parent_dir=$1
echo $parent_dir/`ls -1 $parent_dir | head -1`
local count=`ls -1 $parent_dir | wc -l`
if [ ! $count -eq 1 ]; then
report_error "Directory $parent_dir should contain exactly one subdirectory, but it has $count subdirectories."
echo "ERROR_INCORRECT_NUMBER_OF_CHILDREN"
else
echo $parent_dir/`ls -1 $parent_dir | head -1`
fi
} }
# Finds a dataset directory which has a given sufix in dataset code and returns its name. # Finds a dataset directory which has a given sufix in dataset code and returns its name.
...@@ -586,6 +593,7 @@ function find_dataset_dir { ...@@ -586,6 +593,7 @@ function find_dataset_dir {
return return
fi fi
done done
report_error "Could not find any dataset inside $identified_dir which would contain $code_suffix as a suffix"
} }
function find_dataset_dir_in_store { function find_dataset_dir_in_store {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment