Here's the fixed version, forgot I needed to redo these...
If you run file_test.sh on a system without rpm installed, it should
return tconf instead of tfail.
Signed-off-by: Paul Larson <[email protected]>
---
diff --git a/testcases/commands/ade/file/file_test.sh b/testcases/commands/ade/file/file_test.sh
index 4fc9dec..4e30d43 100755
--- a/testcases/commands/ade/file/file_test.sh
+++ b/testcases/commands/ade/file/file_test.sh
@@ -472,6 +472,8 @@ export TCID=file09
export TST_COUNT=9
$LTPBIN/tst_resm TINFO "TEST #9: file command recognizes RPM files"
+`type rpm &> /dev/null`
+if [ $? = 0 ]; then
if [ -f /etc/redhat-release ]; then
bDIR=/usr/src/redhat
bCMD=rpmbuild
@@ -574,6 +576,9 @@ else
$LTPBIN/tst_resm TFAIL "file: Failed to recognize RPM file"
TFAILCNT=$(( $TFAILCNT+1 ))
fi
+else
+ $LTPBIN/tst_resm TCONF "rpm not installed"
+fi
# TEST #10
@@ -582,11 +587,7 @@ fi
export TCID=file10
export TST_COUNT=10
-if [ -f /etc/redhat-release ]; then
- KERNEL=vmlinuz
-else
- KERNEL=vmlinux
-fi
+KERNEL=vmlinu
$LTPBIN/tst_resm TINFO "TEST #10: file command recognizes $KERNEL file"
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list