From 642d87230227a46069db1c5600f34f9aaaf78c69 Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: Dec 29 2013 13:45:53 +0000 Subject: Merge commit 'refs/merge-requests/48' of git://gitorious.org/testautomation/t_functional into merge-requests/48 --- diff --git a/tests/p_file/02_file_mime_image.sh b/tests/p_file/02_file_mime_image.sh index 4bd69b6..57b19c3 100755 --- a/tests/p_file/02_file_mime_image.sh +++ b/tests/p_file/02_file_mime_image.sh @@ -1,10 +1,19 @@ #!/bin/bash # Author: ??? # Christoph Galuschka +# Rene Diepstraten t_Log "Running $0 - checking if file can recognize image mime file type " -file /usr/lib/anaconda-runtime/boot/syslinux-splash.png -i | grep -q 'image/png' +case $centos_ver in + 5|6) + pngfile=/usr/lib/anaconda-runtime/boot/syslinux-splash.png + ;; + *) + pngfile=/usr/share/anaconda/boot/syslinux-splash.png + ;; +esac -t_CheckExitStatus $? +file $pngfile -i | grep -q 'image/png' +t_CheckExitStatus $? \ No newline at end of file diff --git a/tests/p_file/03_file_mime_symlink.sh b/tests/p_file/03_file_mime_symlink.sh index 442334d..d26721a 100755 --- a/tests/p_file/03_file_mime_symlink.sh +++ b/tests/p_file/03_file_mime_symlink.sh @@ -8,13 +8,19 @@ TEST_FILE_PATH="/tmp/p_file_link_test" ln -s /etc/hosts $TEST_FILE_PATH -if (t_GetPkgRel basesystem | grep -q el5) - then - file -i $TEST_FILE_PATH | grep -q 'x-not-regular-file' - ret_val=$? -else - file -i $TEST_FILE_PATH | grep -q 'application/x-symlink' - ret_val=$? -fi +case $centos_ver in + 5) + mimetype='x-not-regular-file' + ;; + 6) + mimetype='application/x-symlink' + ;; + *) + mimetype='inode/symlink' + ;; +esac + +file -i $TEST_FILE_PATH | grep -q $mimetype +ret_val=$? t_CheckExitStatus $ret_val