PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  4h^c@s\ddlZddlZddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z ddl m Z ddl m Z ddl mZddl mZdd l mZyddlZWnek reZnXd ejfd YZd ejfd YZdZedkrXejddndS(iN(t ProcessStates(tSupervisorStates(t DummyOptions(t DummyPConfig(tDummyPGroupConfig(t DummyProcess(tDummyProcessGroup(tDummyDispatchertEntryPointTestscBs#eZdZer!dZnRS(c Cs!ddlm}tjjtjjtjjtdd}ddl}|j}d|_ t j }zkt j }tjj|d}tjj|d}|t _ |dd |d |d |d gd tWd|t _ tj|X|j} |j| jddk| dS(Ni(tmaintfixturessdonothing.confcSsdS(Ni((((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt"stlogtpidtargss-cs-ls-js-nttestssupervisord startedi(tsupervisor.supervisordR tostpathtjointabspathtdirnamet__file__tStringIOtfilenotsyststdoutttempfiletmkdtemptTruetshutiltrmtreetgetvaluet assertTruetfind( tselfR tconfRt new_stdoutt old_stdoutttempdirR R toutput((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_main_noprofiles&        !   c Cs$ddlm}tjjtjjtjjtdd}ddl}|j}d|_ t j }znt j }tjj|d}tjj|d}|t _ |dd |d |d |d d gdtWd|t _ tj|X|j} |j| jddk| dS(Ni(R R sdonothing.confcSsdS(Ni((((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyR 9sR R Rs-cs-ls-js-ns"--profile_options=cumulative,callsRscumulative time, call count(RR RRRRRRRRRRRRRRRR R!R"( R#R R$RR%R&R'R R R(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_main_profile2s(          (t__name__t __module__R)tpstatsR*(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyRs tSupervisordTestscBs1eZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"RS(!cCsddlm}|dS(Ni(tclear(tsupervisor.eventsR/(R#R/((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttearDownJscCsddlm}|S(Ni(t Supervisor(RR2(R#R2((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt_getTargetClassNscCs|j|S(N(R3(R#toptions((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt_makeOneRscCst}t|ddd}t|dd|gg}||_t|_t|_|j|}|j|j |j t|j |j t |j |j t|j |jdg|j |jg|j |jdg|j |jt|j t|jd|j |jdjj||j |j t|j |jt|j |jt|j |jt|j |jt|j |jtdS(Ntfoos/bin/footpconfigst setuid_calledt rlimits_seti(RRRtprocess_group_configsRRtfirstR5R t assertEqualtenvironment_processedtfds_cleaned_uptFalseR9tparse_criticalstparse_warningst parse_infostautochildlogdir_clearedtlentprocess_groupstconfigR4thttpservers_openedt signals_sett daemonizedtpidfile_writtent cleaned_up(R#R4tpconfigtgconfigst supervisord((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_main_firstUs0     cCst}t|ddd}t|dd|gg}||_t|_t|_|j|}|j |j |j t|j |j t|j t|d|j |jdg|j |jg|j |jg|j |jt|j t|jd|j |jdjj||j |j t|j |jt|j |jt|j |jt|j |jt|j |jtdS(NR6s/bin/fooR7R9R8i(RRRR:RRR?R;R5R R<R=R>t assertFalsethasattrR@RARBRCRDRERFR4RGRHRIRJRK(R#R4RLRMRN((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_main_notfirstos0     cCst}d|_t|ddd}t|}t|_t|_d|_ d|_ i|d6|_ |j |}|j dt|j|jddS(Nitprocesss /bin/process1tonce(ii(NN(ii(Rtwaitpid_returnRRR?tdrainedRtkillingtNonetlaststopt waitstatust pidhistoryR5treapR<tfinished(R#R4RLRSRN((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt test_reaps       cCst}d|_t|ddd}t|}t|_t|_d|_ d |_ i|d6|_ |j |}|j dt|j|jd|j|jjdddS( NiiRSs /bin/process1iRTsreaped unknown pid 2(ii(NN(RRURRR?RVRRWRXRYRZR[R5R\R<R]tloggertdata(R#R4RLRSRN((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_reap_unknown_pids       cCset}tj|_|j|}|j|j|jjt j |j|j j dddS(Nis(received SIGTERM indicating exit request( RtsignaltSIGTERMt_signalR5t handle_signalR<R4tmoodRtSHUTDOWNR_R`(R#R4RN((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_handle_sigterms    cCset}tj|_|j|}|j|j|jjt j |j|j j dddS(Nis'received SIGINT indicating exit request( RRbtSIGINTRdR5ReR<R4RfRRgR_R`(R#R4RN((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_handle_sigints    cCset}tj|_|j|}|j|j|jjt j |j|j j dddS(Nis(received SIGQUIT indicating exit request( RRbtSIGQUITRdR5ReR<R4RfRRgR_R`(R#R4RN((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_handle_sigquits    cCs~t}tj|_|j|}|j|jjtj |j |j|jjtj |j|j j dddS(Nis*received SIGHUP indicating restart request(RRbtSIGHUPRdR5R<R4RfRtRUNNINGRet RESTARTINGR_R`(R#R4RN((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt#test_handle_sighup_in_running_states     cCst}tj|_|j|}tj|j_|j |jjtj|j |j |jjtj|j |j j dddS(Nis@ignored SIGHUP indicating restart request (shutdown in progress)( RRbRmRdR5RRgR4RfR<ReR_R`(R#R4RN((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt$test_handle_sighup_in_shutdown_states     cCsnt}tj|_|j|}|j|j|jjt j d}|j |j j d|kdS(Ns(received SIGCHLD indicating a child quits'received SIGCLD indicating a child quiti(s(received SIGCHLD indicating a child quits'received SIGCLD indicating a child quit(RRbtSIGCHLDRdR5ReR<R4RfRRnR!R_R`(R#R4RNtmsgs((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_handle_sigchlds    cCst}tj|_t|ddd}t|dtj}tjd|_ |j |}t|dddg}t |dd||_ |j |j|jjtj|j|jt|j|jjdd dS( Ntprocess1s /bin/process1tstateiR6s/bin/fooR7is.received SIGUSR2 indicating log reopen request(RRbtSIGUSR2RdRRRtSTOPPINGttimetdelayR5RR:ReR<R4RfRRnt logs_reopenedRR_R`(R#R4tpconfig1RuRNR7((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_handle_sigusr2s       cCset}tj|_|j|}|j|j|jjt j |j|j j dddS(Nis#received SIGUSR1 indicating nothing( RRbtSIGUSR1RdR5ReR<R4RfRRnR_R`(R#R4RN((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_handle_unknown_signals    cCs5t}|j|}|j|jtjdS(N(RR5R<t get_stateRRn(R#R4RN((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_get_state s c Cst}|j|}t|dd}t|dd|g}t|dd}t|dd|g}||g}|j\}}} |j|g|j|g|j| g|j|\}}} |j|||j|g|j| g||j_|j\}}} |j|||j||j|t|dd}t|d|g} t|dd}t|d|g} || | g}|j|\}}} |j|| | g|j|g|j| |gdS(NRutgroup1R7tprocess2tgroup2tprocess3tprocess4( RR5RRtdiff_to_activeR<R4R:tadd_process_group( R#R4RNRLRRtnewtaddedtchangedtremovedt new_group1t new_group2((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_diff_add_removes:     csddlmmt|j}fd}fd}|dddd}|d|g}|d d }|d |g}||g}|dddd }|d|g}|d d }|d |g} |j||j| |j|\} } } |j| | gggg|j| |gt|j}|dd} |d d }|d| |g}|g}|j|d| g|j|\} } } |j| | gggg|j| |gdS( Ni(t ProcessConfigtProcessGroupConfigcsi|d6|d6dd6dd6dd6td6td6d d 6dd 6dd 6dd 6dd6td6dd6dd6dd6dd6td6dd6dd6td6dd6d d6td6td6d!d6dd6dd 6}|j||S("Ntnametcommandt directorytumaskitpriorityt autostartt autorestarti t startsecst startretriestuidtstdout_logfileitstdout_capture_maxbyteststdout_events_enabledtstdout_logfile_backupststdout_logfile_maxbyteststderr_logfiletstderr_capture_maxbyteststderr_events_enabledtstderr_logfile_backupststderr_logfile_maxbytestredirect_stderrt stopsignalt stopwaitsecst stopasgroupt killasgroupit exitcodest environmentt serverurl(ii(RXRR?tupdate(RRtparamstresult(RR4(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt make_pconfig?s" cs|d|S(Ni((RR7(RR4(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt make_gconfigRsRuRRRRRtold(tsupervisor.optionsRRRR5RRR<(R#RNRRRLRRRtgroup3tgroup4RRRR|tpconfig2((RRR4sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_diff_changed9s:      cs5ddlmddlmmt|j}fd}fd}dfd}|dd }|d }|d |g|}|d d }|d }|d|g|}||g} |dd}|d }|d |g|} |d d }|d }|d|g|} |j| |j| |j| \} } }|j | |gggg|j | |gt|j}|dd}|d }|d |g|}|d d }|d }|d|g|}||g} |dd}|d}|d |g|} |d d }|d }|d|g|} |j| |j| |j| \} } }|j | |gggg|j | |gt|j}|dd}|d }|d |g|d}|d d }|d }|d|g|}||g} |dd}|d }|d |g|d} |d d }|d }|d|g|} |j| |j| |j| \} } }|j | |gggg|j | |gdS(Ni(t EventTypes(tEventListenerConfigtEventListenerPoolConfigcsi|d6|d6dd6dd6dd6td6td6d d 6dd 6dd 6dd 6dd6td6dd6dd6td6dd6dd6td6dd6dd6td6td6dd6d d6td6td6d#d 6dd!6dd"6}|j||S($NRRRRiRRRi RRRRiRRRRt stdout_syslogRRRRRt stderr_syslogRRRRRiRRR(ii(RXRR?R(RRRR(RR4(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyR~s& cs4g}x'|D]}|jt|dq W|S(N(tappendtgetattrRX(tpool_event_namesRtpool_event_name(R(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt make_econfigs s&supervisor.dispatchers:default_handlercs|d|d||S(Nii ((RR7t pool_eventstresult_handler(RR4(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyRsRus process1-newtTICK_60RRt TICK_3600Rs process1-oldtTICK_5snew-result-handlersold-result-handler( R0RRRRRR5RRR<(R#RNRRRRLteconfigRRRRRRRR((RRRR4sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_diff_changed_eventlistenerws                        cCst}t|ddd}t|dd|g}|g|_|j|}|j|ji|j|}|j|jjdg|j ||jd}|j|}|j||jd|j | dS(NR6s/bin/fooR7( RRRR:R5R<RERtkeysR!(R#R4RLtgconfigRNRtgroup((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_add_process_groups    csddlm}gfd}|j|j|t}t|ddd}t|dd|g}|g|_|j|}|j |t |_ |j |j dgdS(Ni(teventscsjddS(Ni(R(tevent(tL(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pytcallbacksR6s/bin/fooR7i(t supervisorRt subscribetProcessGroupAddedEventRRRR:R5RRRt runforeverR<(R#RRR4RLRRN((RsE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_add_process_group_events     cCst}t|ddd}t|dd|g}|j|}|jt|jd|j||jd}|jd}|j |j |j |ji|j ||j|t dg|jd_|jd}|j |jjdg|j | dS(NR6s/bin/fooR7tasdf(RRRR5t assertRaisestKeyErrortremove_process_groupRRER!tbefore_remove_calledR<RRXtunstopped_processesR(R#R4RLRRNRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_remove_process_groups      csddlm}gfd}|j|j|t}t|ddd}t|dd|g}|g|_|j|}|j |t dg|j d_ |jdt|_|j|jdgdS(Ni(RcsjddS(Ni(R(R(R(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyR*sR6s/bin/fooR7i(RRRtProcessGroupRemovedEventRRRR:R5RRRXREtstopped_processesRRRRR<(R#RRR4RLRRN((RsE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_remove_process_group_event's      cszddlm}gfd}|j|j|t}|j|}t|_|j|j dgdS(Ni(RcsjddS(Ni(R(R(R(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyR>si( RRRtSupervisorStateChangeEventRR5RRRR<(R#RRR4RN((RsE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt+test_runforever_emits_generic_startup_event;s   cszddlm}gfd}|j|j|t}t|_|j|}|j|j dgdS(Ni(RcsjddS(Ni(R(R(R(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyRJsi( RRRtSupervisorRunningEventRRRR5RR<(R#RRR4RN((RsE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt,test_runforever_emits_generic_specific_eventGs   cCsat}t|_|j|}|jt|jd|j|jt|jddS(Nii(RRRR5R<RDtticksR(R#R4RN((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_runforever_calls_tickSs    c Cs*t}dgddgf|j_|j|}t|dd}t|d|g}t|}tdt}tdt}tdtd t }i|d6|d6|d6|_ i|d6|_ t|_ |j |j|jt|j|jt|j|jt|j|jtdS( NiiiR6s/bin/fooR7treadabletwritableterror(RtpollerRR5RRRRRtOSErrort dispatchersRERRR<t transitionedtread_event_handledtwrite_event_handledt error_handled( R#R4RNRLRtpgroupRRR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt test_runforever_poll_dispatchers[s"    cCst}dggf|j_|j|}t|dd}t|d|g}t|}ddlm}t dt d|j }i|d6|_ i|d6|_ t |_|j|j |jdS( NiR6s/bin/fooR7i(t asyncore_25RR(RRRR5RRRtsupervisor.medusaRRRtExitNowRRERRR(R#R4RNRLRRtasyncoretexitnow((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt)test_runforever_select_dispatcher_exitnowns   cs>t}|j|}t|}t|}i|d6|_tj|j_gfd}ddl m }|j |j |ddl m}t|_|j|j|j|j|j|jtd|j|jtd|j |jtd|j|jtd|j dS(NR6csj|dS(N(R(R(R(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyRsi(R(Rii(RR5RRRERRgR4RfRRRRRRRRRRRR!t all_stoppedt isinstanceRtSupervisorStoppingEvent(R#R4RNRRRRR((RsE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt%test_runforever_stopping_emits_events|s$    cst}|j|}t|dd}t|d|g}t|}gfd}i|d6|_tj|j_ t |j_ ddl m }|j|j|j|j|jt dS(NR6s/bin/fooR7csjddS(Ni(R((R(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyRsi(R(RR5RRRRERRoR4RfRRRRRRRR<R(R#R4RNRLRRRR((RsE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt test_exits   cst}|j|}t|dd}t|}t|d|g}t|}|g|_gfd}i|d6|_tj |j _ t |j _ |j|j|jddS(NR6s/bin/fooR7csjddS(Ni(R((R(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyRsi(RR5RRRRRRERRoR4RfRRRtassertNotEqualtlastshutdownreport(R#R4RNRLRSRRR((RsE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyttest_exit_delayeds      cCs3ddlm}|tj}|j|ddS(Ni(tgetSupervisorStateDescriptionRn(tsupervisor.statesRRRnR<(R#RR((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt"test_getSupervisorStateDescriptionscsNddlm}gfd}|j|j|t}|j|}|jdd|j|jdd|j|jdd|j|jdd|jt d|jdd |j|jdd|j|jdd|j|jdd|jt d |jdj |j |jdd |j|jdd|j|jdd|j|jdd|jt d |jdj |j |jdd |j|jdd|j|jdd|j|jdd|jt d |jdj |j dS(Ni(Rcsj|dS(N(R(R(R(sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyRstnowiii<iiii=ii(RRRt TickEventRR5ttickR<RRDt __class__t Tick5Eventt Tick60Eventt Tick3600Event(R#RRR4RN((RsE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt test_ticks: (#R+R,R1R3R5RORRR^RaRhRjRlRpRqRtR}RRRRRRRRRRRRRRRRRRR (((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyR.IsB           * > w           cCstjtjtS(N(tunittestt findTestCasesRtmodulesR+(((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyt test_suitest__main__t defaultTestR(R RyRbRRRRRRRtsupervisor.tests.baseRRRRRRR-t ImportErrorRXtTestCaseRR.RR+R (((sE/usr/lib/python2.7/site-packages/supervisor/tests/test_supervisord.pyts2         /