| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python2.7/dist-packages/twisted/scripts/test/ |
Upload File : |
ó
ê=Nc @ s¸ d Z d d l Z d d l m Z m Z d d l m Z d d l m Z d d l m
Z
d d l m Z d Z
d Z d d d d d d d d d
„ Z d „ Z d e f d
„ ƒ YZ d S( s'
Tests for L{twisted.scripts.tap2rpm}.
iÿÿÿÿN( t TestCaset SkipTest( t procutils( t Failure( t utils( t tap2rpms s c
C s" g } | s; d } t | d ƒ } | j d ƒ | j ƒ n | j d d | g ƒ | rm | j d | g ƒ n | r‰ | j d | g ƒ n | r¥ | j d | g ƒ n | rÁ | j d | g ƒ n | rÝ | j d
| g ƒ n | rù | j d | g ƒ n | r| j d | g ƒ n t j | ƒ S(
sF
Helper function to invoke tap2rpm with the given parameters.
s dummy-tap-filet ws # Dummy TAP file
s --quiets --tapfiles --maintainers
--protocols
--descriptions --long_descriptions
--set-versions --rpmfiles --type( t opent writet closet extendR t run(
t tapfilet
maintainert protocolt descriptiont longDescriptiont
setVersiont rpmfilet type_t argst handle( ( sE /usr/lib/python2.7/dist-packages/twisted/scripts/test/test_tap2rpm.pyt _makeRPMs s,
c sy t j g ˆ D] } d | t f ^ q
ƒ } ‡ f d † } d „ } t j d d d | d | f ƒ } | j | | ƒ | S( s
Helper function to read the given header tags from the given RPM file.
Returns a Deferred that fires with dictionary mapping a tag name to a list
of the associated values in the RPM header. If a tag has only a single
value in the header (like NAME or VERSION), it will be returned as a 1-item
list.
Run "rpm --querytags" to see what tags can be queried.
s
[%%{%s}%s]c sU i } xH t ˆ | j t ƒ ƒ D]. \ } } | j t ƒ j t ƒ } | | | <q W| S( N( t zipt splitt RECORD_SEPARATORt stript UNIT_SEPARATOR( t outputt rest tagt values( t taglist( sE /usr/lib/python2.7/dist-packages/twisted/scripts/test/test_tap2rpm.pyt parseTagValuesK s
%c sf | j t ƒ t | j ƒ j d ƒ r: t t d ƒ ƒ ‰ n | ‰ | j j } | j ‡ f d † ƒ | S( Ns got stderr: 'error: sR rpm is missing its package database. Run 'sudo rpm -qa > /dev/null' to create one.c s ˆ S( N( ( t _( t
newFailure( sE /usr/lib/python2.7/dist-packages/twisted/scripts/test/test_tap2rpm.pyt <lambda>o s ( t trapt IOErrort strt valuet
startswithR R t processEndedt addBoth( t failuret d( ( R# sE /usr/lib/python2.7/dist-packages/twisted/scripts/test/test_tap2rpm.pyt checkErrorResultT s
t rpms -qs
--queryformats -p( R t joinR R t getProcessOutputt addCallbacks( R R R t queryFormatR! R. R- ( ( R sE /usr/lib/python2.7/dist-packages/twisted/scripts/test/test_tap2rpm.pyt
_queryRPMTags8 s & t TestTap2RPMc B s’ e Z d „ Z d „ Z d d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d
„ Z d „ Z d „ Z
d
„ Z d „ Z d „ Z RS( c C s
| j ƒ S( N( t _checkForRpmbuild( t self( ( sE /usr/lib/python2.7/dist-packages/twisted/scripts/test/test_tap2rpm.pyt setUp| s c C s"