+
     Bi^                         ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	R t
R tR tR tR tRR ltR tR	 t]R
8X  d
   ]! 4        R# R# )    Nc                     \        V R 4      ;_uu_ 4       pV F  p\        W2R7       K  	  VP                  4        RRR4       R#   + '       g   i     R# ; i)w)fileN)openprintflush)filenametestsfpnames   &&  &/usr/lib/python3.14/test/bisect_cmd.pywrite_testsr      s;    	h		D$  

 
			s   &AA	c                 h    V '       g   R # \        R\        V4      : RV : 24       \        W4       V # )NzWriting z tests into )r   lenr   )r	   r
   s   &&r   write_outputr   &   s&    	E
H
=> O    c                 $    R P                  V 4      # ) )join)argss   &r   format_shell_argsr   .   s    88D>r   c                      \         P                  .p V P                  \        P                  ! 4       4       V P                  \        P
                  ! 4       4       V P                  R4       V # )-X)r   faulthandler)sys
executableextend
subprocess_args_from_interpreter_flags"_optim_args_from_interpreter_flags)cmds    r   
python_cmdr"   2   sJ    >>
CJJz6689JJz<<>?JJ%&Jr   c                    \        4       pVP                  . RO4       VP                  V P                  4       \        P                  ! V\        P
                  RR7      pVP                  pV'       d5   \        V4      p\        RV: RV: 24       \        P                  ! V4       VP                  P                  4       pV# )-mT)stdoutuniversal_newlineszFailed to list tests: z failed with exit code )r$   testz--list-cases)r"   r   	test_argsr   runPIPE
returncoder   r   r   exitr%   
splitlines)r   r!   procexitcoder
   s   &    r   
list_casesr0   :   s    
,CJJ-.JJt~~>>#!+-13D H$h  	!KK""$ELr   c                    \         P                  ! 4       p \        W14       \        4       pVP	                  R RRRV.4       VP	                  V P
                  4       \        R\        V4      ,          4       \        P                  P                  4        \        P                  P                  4        \        P                  ! V4      pVP                  \        P                   P#                  V4      '       d   \        P$                  ! V4       # #   \        P                   P#                  T4      '       d   \        P$                  ! T4       i i ; i)z-ur$   r'   z--matchfilez+ %s)tempfilemktempr   r"   r   r(   r   r   r   r%   r   stderrr   r)   r+   ospathexistsunlink)r   r
   
huntrleakstmpr!   r.   s   &&&   r   	run_testsr;   K   s    
//
CCl

D$s;<

4>>"f(--.



~~c"77>>#IIcN 277>>#IIcN s   B>D >Ec                     \         P                  ! 4       p V P                  R RRR7       V P                  RRRR7       V P                  RR\        ^R	R
7       V P                  RR\        ^dRR
7       V P	                  4       w  rW!n        V# )z-iz--inputzUTest names produced by --list-tests written into a file. If not set, run --list-tests)helpz-oz--outputzResult of the bisectionz-nz--max-testsz:Maximum number of tests to stop the bisection (default: 1))typedefaultr=   z-Nz
--max-iterz5Maximum number of bisection iterations (default: 100))argparseArgumentParseradd_argumentintparse_known_argsr(   )parserr   r(   s      r   
parse_argsrF   _   s    $$&F
iI  J j6  8
m#q,  - lc.  /
 --/ODNKr   c                  j   \        4       p R F.  pWP                  9   g   K  \        RV R24       \        4        K0  	  V P                  '       dF   \	        V P                  4      ;_uu_ 4       pV Uu. uF  q3P                  4       NK  	  ppRRR4       M\        V 4      p\        R\        X4      ,          4       \        R\        V P                  4      ,          4       \        RV P                  : RV P                  : R24       \        V P                  V4      p\        4        \        P                  ! 4       p^p \        V4      V P                  8  Ed   WpP                  8:  d   \        V4      p\        V^,          ^4      p\         P"                  ! WH4      p	\        R	V R
V P                   R\        V	4       R\        V4       24       \        4        \%        W	4      p
\        RV: R\        V4      : 24       \        RV
4       V
'       d%   \        R4       T	p\        V P                  V4      pM\        R4       \        4        V^,          pEK  \        R\        T4      ,          4       T F  p\        RT,          4       K  	  \        4        T'       d   \        RT,          4       \(        P*                  ! \        P                  ! 4       T,
          4      p\        T4      T P                  8:  d+   \        RT: R\,        P.                  ! TR7      : 24       R# \        RT: R\,        P.                  ! TR7      : 24       \0        P2                  ! ^4       R# u upi   + '       g   i     EL; i  \&         d$    \        4        \        R4       \        4         ELTi ; i)-wz	WARNING: z% option should not be used to bisect!NzStart bisection with %s testszTest arguments: %sz!Bisection will stop when getting z1 or less tests (-n/--max-tests option), or after z" iterations (-N/--max-iter option)z[+] Iteration /z: run z tests/zran r,   z*Tests failed: continuing with this subtestz;Tests succeeded: skipping this subtest, trying a new subsetzBisection interrupted!zTests (%s):z* %szOutput written into %szBisection completed in z iterations and )secondszBisection failed after )rH   z--rerunz
--verbose2)rF   r(   r   inputr   stripr0   r   r   	max_testsmax_iterr   outputtime	monotonicmaxrandomsampler;   KeyboardInterruptmathceildatetime	timedeltar   r,   )r   optr   liner
   rO   
start_time	iterationntestsubtestsr/   r'   dts                r   mainra   s   s   <D... IcU"GHIG /
 zzz$**.01bdZZ\bE1  4 	
)CJ
67	
!24>>!B
BC	 ^^T]], - $++u-F	G!JI%j4>>)i==.HJE
A&E}}U2HN9+Qt}}o >Xws5zl< =G 0Huc%j9:&(#BC %dkk59STGNI 
-#e*
$%ftm 	G&/0	4>>#j0	1B
5zT^^#H..r:< 	= 	H..r:< 	=s 2 L  &'s1   .M03M+M0DN +M00N	*N21N2__main__)N)r@   rX   os.pathr5   rV   rS   r   r   r2   rP   r   r   r   r"   r0   r;   rF   ra   __name__ r   r   <module>rf      s`   (       
  "((BJ zF r   