
    daf<                     n   d Z ddlZddlZddlZddlZddlmZ ddlm	Z	  ej                  dd      r ej                  d      ej                  s ej                  d      ej                  j                  ej                  j                  ej                  j                  ej                  j                  ej                  j                  e                              Zej                  j%                  ed	      Zej                  j%                  ed
      ZddZej,                  d        Zd Zd Zy)z=Support functions for testing scripts in the Tools directory.    N)support)import_helperT)addressmemoryz test too slow on ASAN/MSAN buildztest module requires subprocessToolsscriptsc                     | r%t         j                  j                  t        |       }nd} t        }t         j                  j                  |      st        j                  |  d      y )Nr   z directory could not be found)ospathjointoolsdir
scriptsdirisdirunittestSkipTest)tooltooldirs     3/root/Python-3.12.4/Lib/test/test_tools/__init__.pyskip_if_missingr      sQ    '',,x.77==!4&(E FGG "    c              '      K   t        j                  j                  t        | g| }t	        j
                  |      5 }| d d d        y # 1 sw Y   y xY wwN)r
   r   r   r   r   DirsOnSysPath)namesubdirsr   cms       r   imports_under_toolr   &   sH     ggll8T4G4G		$	$W	-   s   ;AA	AAAc                     t        j                  t              5  t        j                  |       cd d d        S # 1 sw Y   y xY wr   )r   r   r   	importlibimport_module)toolnames    r   import_toolr"   ,   s3    		$	$Z	0 1&&x01 1 1s	   9Ac                  p    t        j                  t        j                  j	                  t
              g|  S r   )r   load_package_testsr
   r   dirname__file__)argss    r   
load_testsr(   0   s%    %%bggooh&?G$GGr   r   )__doc__
contextlibr   os.pathr
   r   testr   test.supportr   check_sanitizerr   has_subprocess_supportr   normpathr%   r&   basepathr   r   r   r   contextmanagerr   r"   r(    r   r   <module>r4      s   C      & 745 (

>
?? %%
(

=
>> 77
GGOOGGOOH-/0	12 77<<'*WW\\(I.
H  
1Hr   