+# Function to assert no difference between the content
+# of two given direcories (recursive).
+function assert_no_diff_dir
+{
+ local src_dir=$1
+ local dst_dir=$2
+
+ if [ ! -d $src_dir ]; then
+ echo_red "FAIL"
+ log "FAIL"
+ return
+ fi
+
+ if [ ! -d $dst_dir ]; then
+ echo_red "FAIL"
+ log "FAIL"
+ return
+ fi
+
+ local src_cksum=`find $src_dir -type f | grep -v "\.svn" | sort | xargs cat | cksum`
+ local dst_cksum=`find $dst_dir -type f | grep -v "\.svn" | sort | xargs cat | cksum`
+
+ if [ "$src_cksum" == "$dst_cksum" ]; then
+ echo_green "OK"
+ log "OK"
+ else
+ echo_red "FAIL"
+ log "FAIL"
+ fi
+}
+
+# Function to assert that all given files do exists.