Changeset e8f397 for tests


Ignore:
Timestamp:
Jun 29, 2012, 1:23:20 PM (13 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
a06358c
Parents:
aec098
git-author:
Frederik Heber <heber@…> (03/07/12 10:36:43)
git-committer:
Frederik Heber <heber@…> (06/29/12 13:23:20)
Message:

PoolWorker is now truely listenting.

Location:
tests/regression/Fragmentation/Automation
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-addingjobs.at

    raec098 re8f397  
    77WORKERPORT=1035
    88CONTROLLERPORT=1036
    9 LISTENPORT=1037
     9WORKERLISTENPORT=1037
    1010
    1111# start service in background
     
    1818AT_CHECK([fgrep "Sending 1 jobs ..." stdout], 0, [ignore], [ignore], [kill $server_pid])
    1919
    20 # work on jobs
    21 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $LISTENPORT], 0, [ignore], [ignore], [kill $server_pid])
     20# enlist a worker to work on jobs
     21${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $WORKERLISTENPORT &
     22worker_pid=$!
     23AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
     24
     25# send kill signal to worker such that it shuts down
     26AT_CHECK([kill -INT $worker_pid], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
    2227
    2328# shutdown
    24 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT shutdown], 0, [ignore], [ignore], [kill $server_pid])
     29AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT shutdown], 0, [ignore], [ignore], [kill $server_pid] $worker_pid)
    2530
    2631# check that server is truely down
    27 AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid])
    28 AT_CHECK([kill $server_pid], 1, [ignore], [ignore])
     32AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
     33AT_CHECK([kill $server_pid $worker_pid], 1, [ignore], [ignore])
    2934
    3035AT_CLEANUP
  • tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-completerun.at

    raec098 re8f397  
    77WORKERPORT=1050
    88CONTROLLERPORT=1051
    9 LISTENPORT=1052
     9WORKERLISTENPORT=1052
    1010
    1111# start service in background
     
    1919AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT createjobs "cat" "Nothing"], 0, [stdout], [ignore], [kill $server_pid])
    2020AT_CHECK([fgrep "Sending 1 jobs ..." stdout], 0, [ignore], [ignore], [kill $server_pid])
     21
    2122# Checking results
    2223AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT checkresults], 0, [stdout], [ignore], [kill $server_pid])
    23 AT_CHECK([fgrep "0 jobs are calculated so far." stdout], 0, [ignore], [ignore], [kill $server_pid])
    24 # start working
    25 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $LISTENPORT], 0, [stdout], [ignore], [kill $server_pid])
    26 AT_CHECK([fgrep "result #1 sent" stdout], 0, [ignore], [ignore], [kill $server_pid])
    27 # Checking results
    28 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT checkresults], 0, [stdout], [ignore], [kill $server_pid])
    29 AT_CHECK([fgrep "1 jobs are calculated so far." stdout], 0, [ignore], [ignore], [kill $server_pid])
    30 # get first result
    31 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT receiveresults], 0, [stdout], [ignore], [kill $server_pid])
    32 AT_CHECK([fgrep "Received 1 results" stdout], 0, [ignore], [ignore], [kill $server_pid])
    33 AT_CHECK([fgrep -c "Nothing" stdout], 0, [stdout], [ignore], [kill $server_pid])
    34 AT_CHECK([grep "1" stdout], 0, [ignore], [ignore], [kill $server_pid])
    35 # work some more
    36 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $LISTENPORT], 0, [stdout], [ignore], [kill $server_pid])
    37 AT_CHECK([fgrep "result #2 sent" stdout], 0, [ignore], [ignore], [kill $server_pid])
    38 # Checking results
    39 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT checkresults], 0, [stdout], [ignore], [kill $server_pid])
    40 AT_CHECK([fgrep "1 jobs are calculated so far." stdout], 0, [ignore], [ignore], [kill $server_pid])
    41 # get second result
    42 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT receiveresults], 0, [stdout], [ignore], [kill $server_pid])
    43 AT_CHECK([fgrep "Received 1 results" stdout], 0, [ignore], [ignore], [kill $server_pid])
    44 AT_CHECK([fgrep -c "Nothing" stdout], 0, [stdout], [ignore], [kill $server_pid])
    45 AT_CHECK([grep "1" stdout], 0, [ignore], [ignore], [kill $server_pid])
    46 # get no more results
    47 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT receiveresults], 0, [stdout], [ignore], [kill $server_pid])
    48 AT_CHECK([grep "Nothing" stdout], 1, [ignore], [ignore], [kill $server_pid])
     24AT_CHECK([fgrep "#2 are waiting in the queue and #0 jobs are calculated so far." stdout], 0, [ignore], [ignore], [kill $server_pid])
     25
     26# enlist a worker to work on jobs
     27${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $WORKERLISTENPORT &
     28worker_pid=$!
     29AT_CHECK([sleep 2], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
     30
     31# send kill signal to worker such that it shuts down
     32AT_CHECK([kill -INT $worker_pid], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
     33
     34# Checking results
     35AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT checkresults], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
     36AT_CHECK([fgrep "#0 are waiting in the queue and #2 jobs are calculated so far." stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
     37
     38# get results
     39AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT receiveresults], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
     40AT_CHECK([fgrep "Received 2 results" stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
     41AT_CHECK([fgrep -c "Nothing" stdout], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
     42AT_CHECK([grep "2" stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
     43
     44# get no more results
     45AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT receiveresults], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
     46AT_CHECK([grep "Nothing" stdout], 1, [ignore], [ignore], [kill $server_pid $worker_pid])
     47
    4948# shutdown
    50 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT shutdown], 0, [stdout], [ignore], [kill $server_pid])
     49AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT shutdown], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
    5150
    5251# check that server is truely down
    53 AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid])
    54 AT_CHECK([kill $server_pid], 1, [ignore], [ignore])
     52AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
     53AT_CHECK([kill $server_pid $worker_pid], 1, [ignore], [ignore])
    5554
    5655AT_CLEANUP
  • tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-resubmitjobs.at

    raec098 re8f397  
    1818AT_CHECK([fgrep "Sending 1 jobs ..." stdout], 0, [ignore], [ignore], [kill $server_pid])
    1919
    20 # work on jobs
    21 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $WORKERLISTENPORT], 0, [ignore], [stderr], [kill $server_pid])
    22 AT_CHECK([fgrep "Job 1 failed on executing" stderr], 0, [ignore], [ignore], [kill $server_pid])
     20# enlist a worker to work on jobs
     21${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $WORKERLISTENPORT 2>workererr &
     22worker_pid=$!
     23AT_CHECK([sleep 2], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
     24
     25# send kill signal to worker such that it shuts down
     26AT_CHECK([kill -INT $worker_pid], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
     27AT_CHECK([fgrep "Job 1 failed on executing" workererr], 0, [ignore], [ignore], [kill $server_pid])
    2328
    2429# shutdown
     
    2934AT_CHECK([kill $server_pid], 1, [ignore], [ignore])
    3035
     36AT_CHECK([rm -f workererr], 0, [ignore], [ignore])
     37
    3138AT_CLEANUP
  • tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-server-worker.at

    raec098 re8f397  
    77WORKERPORT=1025
    88CONTROLLERPORT=1026
    9 LISTENPORT=1027
     9WORKERLISTENPORT=1027
    1010
    1111# start service in background
     
    1717AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT createjobs "cat" "Nothing"], 0, [ignore], [ignore], [kill $server_pid])
    1818
    19 # first worker has a job
    20 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $LISTENPORT], 0, [stdout], [ignore], [kill $server_pid])
    21 AT_CHECK([fgrep "result #1 sent" stdout], 0, [ignore], [ignore], [kill $server_pid])
     19# enlist a worker to work on jobs
     20${AUTOTEST_PATH}/Fragmentation/Automation/PoolWorker 127.0.0.1 $WORKERPORT 127.0.0.1 $WORKERLISTENPORT &
     21worker_pid=$!
     22AT_CHECK([sleep 2], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
    2223
    23 # check number of done jobs
     24# send kill signal to worker such that it shuts down
     25AT_CHECK([kill -INT $worker_pid], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
     26
     27# check number of done jobs
    2428AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT checkresults], 0, [stdout], [ignore], [kill $server_pid])
    25 AT_CHECK([fgrep "1 jobs are calculated so far" stdout], 0, [ignore], [ignore], [kill $server_pid])
     29AT_CHECK([fgrep "#0 are waiting in the queue and #1 jobs are calculated so far." stdout], 0, [ignore], [ignore], [kill $server_pid])
    2630
    2731# shutdown controller socket
Note: See TracChangeset for help on using the changeset viewer.