Your IP : 216.73.216.213
�
g fs# � @ s� d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z m Z m Z d e j d � k r e j
d � � n y7 e j d d g d e j d e j �j
� \ Z Z Wn! e k
r� e j
d
� � Yn Xd d � Z d
Z e e d � \ Z Z e d k r#e j
d e � � n d d d d � Z d e j d � k roe j d � Z d e j e f Z n
d e j Z d e e f j d � Z Gd d � d � Z Gd d � d e j � Z d d � Z e d k r�e � n d S) � N)�run_unittest�TESTFN�unlinkz--with-systemtap�CONFIG_ARGSz*Python was not configured --with-systemtap�stapz-V�stdout�stderrzCouldn't find stap on the pathc C s[ t j d d d d | g d t j d t j d t j �} | j d | � \ } } | | f S) Nr �-z-vvz-c�stdinr r �input)�
subprocess�Popen�PIPE�communicate)�script�cmd�p�out�err� r �8/opt/alt/python34/lib64/python3.4/test/test_systemtap.py�invoke_systemtap_script s r s. probe begin { println("hello world") exit () }�trues hello world
z1Test systemtap script did not run; stderr was: %sc C sh | r d t j | f } n d t j | f } t j j d d � } | r[ d | | } n t | | � S)Nz%s %sz%s -c %r�LD_LIBRARY_PATH� zenv LD_LIBRARY_PATH=%s )�sys�
executable�os�environ�getr )r �
pythoncode�
pythonfileZ pythoncmdr r r r �invoke_python_under_systemtap2 s r"