Your IP : 3.139.236.144
�
�Rac @ s� d Z d d l Z d d l Z d d l Z d d l Z d e f d � � YZ d e f d � � YZ e e j � e _ e e j � e _ d � Z
d � Z d d � Z
e d
k r� e j e
� � n d S( s*
gyptest.py -- test runner for GYP tests.
i����Nt
CommandRunnerc B sk e Z d Z e Z e Z i d � Z d � Z d d � Z d d d � Z
d d d � Z d d d d � Z RS( sZ
Executor class for commands, including "commands" implemented by
Python functions.
c C s | j | � d S( N( t subst_dictionary( t selft
dictionary( ( s_ /opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/gyptest.pyt __init__ s c C s
| | _ d S( N( t _subst_dictionary( R R ( ( s_ /opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/gyptest.pyR s c C sG | d k r | j } n | rC y | | } WqC t k
r? qC Xn | S( sC
Substitutes (via the format operator) the values in the specified
dictionary into the specified command.
The command can be an (action, string) tuple. In all cases, we
perform substitution on strings and don't worry if something isn't
a string. (It's probably a Python function to be executed.)
N( t NoneR t TypeError( R t stringR ( ( s_ /opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/gyptest.pyt subst s
c C s� | j s
d St | � t d � k ra | d } | d } d | j d j t t | � � f } n t | � t g � k r� d j | � } n | j | � } | j d � s� | d 7} n t j j
| � t j j � d S( Ni i s %s(%s)s , t s
( ( t verboset typet __name__t joint mapt reprR t endswitht syst stdoutt writet flush( R t commandR t stderrt funct argst s( ( s_ /opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/gyptest.pyt display0 s
(
c
C s� | j s
d St | � t d � k rs | j | � } t j | � } | d d k rs t j f t | d � } qs n t | � t d
� k r� | d } | d } | | � S| t j k r� d } n t j } | t j
k r� d } n! | d k r� t j } n t j } t j | d t j d k d | d | �} | j � | d k rX| j j � | _ n( | t j k r�| j | j j � � n | d t j
f k r�| j | j
j � � n | j Sd S( s$
Executes a single command.
i t t cdi t shellt win32R R N( ( t activeR R t shlext splitt ost chdirt tupleR R R t
subprocesst PIPER t STDOUTt Popent platformt waitt readR t
returncode(
R R R R t cmdargsR R t suboutt suberrt p( ( s_ /opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/gyptest.pyt executeB s>