public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] fix file_test.sh for systems without rpm installed
@ 2009-08-12 21:13 Paul Larson
  2009-08-13  7:05 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Larson @ 2009-08-12 21:13 UTC (permalink / raw)
  To: LTP Mailing List

[-- Attachment #1: Type: text/plain, Size: 161 bytes --]

If you run file_test.sh on a system without rpm installed, it should
return tconf instead of tfail.

Signed-off-by: Paul Larson <paul.larson@canonical.com>
---


[-- Attachment #2: file_test.patch --]
[-- Type: text/x-patch, Size: 906 bytes --]

diff --git a/testcases/commands/ade/file/file_test.sh b/testcases/commands/ade/file/file_test.sh
index 4fc9dec..0225b56 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"
+`which rpm`
+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"
 

[-- Attachment #3: Type: text/plain, Size: 355 bytes --]

------------------------------------------------------------------------------
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

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] fix file_test.sh for systems without rpm installed
  2009-08-12 21:13 [LTP] fix file_test.sh for systems without rpm installed Paul Larson
@ 2009-08-13  7:05 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2009-08-13  7:05 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1: Type: text/plain, Size: 236 bytes --]

On Wednesday 12 August 2009 17:13:11 Paul Larson wrote:
> If you run file_test.sh on a system without rpm installed, it should
> return tconf instead of tfail.

this has the same problems as i mentioned with your mail_tests patch
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 355 bytes --]

------------------------------------------------------------------------------
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

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-13  7:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-12 21:13 [LTP] fix file_test.sh for systems without rpm installed Paul Larson
2009-08-13  7:05 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox