Re: Package-specific test case and critical path test case project: drafts for review

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2010-12-21 at 18:32 -0700, Michal Jaegermann wrote:
+AD4 On Tue, Dec 21, 2010 at 06:12:47PM -0500, James Laska wrote:
+AD4 +AD4 Something to help testers find the right src.rpm name of the
+AD4 +AD4 component under test?
+AD4 
+AD4 Something like that?

Exactly, thanks for sharing.  I've added some comments below for some
common gotchas that always get me with bash scripts.  Hope it's helpful.

+AD4 +ACMAIQ-/bin/bash
+AD4 
+AD4 me+AD0AJA(basename +ACQ-0)
+AD4 usage () +AHs
+AD4     echo +ACI-Usage: +ACQ-me +ADw-name+AD4AIg
+AD4     echo +ACI-where +ADw-name+AD4 is either path to a file or an rpm package name+ACI
+AD4     exit 1
+AD4 +AH0
+AD4 
+AD4 +AFs -z +ACIAJA-1+ACI +AF0 +ACYAJg usage
+AD4 
+AD4 arg+AD0AIgAk-1+ACI
+AD4 case +ACQ-arg in
+AD4     +ACo-/+ACo) file+AD0AIg--f+ACI +ADsAOw
+AD4 esac

It might be a bit more error-proof to use, since the file argument could
be in the current directory (no '/'):

        test -f +ACUAew-arg+AH0 +ACYAJg file+AD0AIg--f+ACI +AHwAfA file+AD0AIgAi

+AD4 pkg+AD0AJA(rpm -q +ACQ-file --qf '+ACUAew-sourcerpm+AH0AXA-n' +ACQ-arg+AHw-head -1)

If conditionally initializing the value of +ACQ-file, you might want to
provide a default value above.  Perhaps something like the following to
default to the empty '' string if no value is set.  If you use the
earlier statement, it will be initialized.

        +ACQAew-file:-+AH0

+AD4 bname+AD0AJAB7-pkg+ACU--+ACoAfQ
+AD4 echo +ACQAew-bname+ACU--+ACoAfQ

Nice, I didn't realize that a single '+ACU' would do the +ACo-shortest+ACo match.
Thanks+ACE

+AD4 echo +ACQAew-pkg+ACU.src.rpm+AH0
+AD4 exit
+AD4 
+AD4 You can pass here as an argument /sbin/dmsetup or device-mapper with
+AD4 the same effect (source package for these is called 'lvm2').

Yeah, exactly.  As an extra data point, dmalcolm posted a somewhat
script that opens up a bugzilla web page to assist in filing a bug
against a component.  I'm sure that could be adjusted to find the
+ACUAew-sourcerpm+AH0 name using the procedure you outlined.

http://lists.fedoraproject.org/pipermail/test/2010-December/096079.html

Thanks,
James

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
test mailing list
test@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe: 
https://admin.fedoraproject.org/mailman/listinfo/test

[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]

  Powered by Linux