Services
Contents |
[edit] Client behavior
- create_msession
- job loop
- get command
- set status/set result (report state changes during job/report results)
- destroy msession (set msession abort reason)
[edit] Server services
Default params:
- machine_id (machine.machine_id) - mid
- password (machine.passwd) - pass
Default code:
- process login ( mid, pass )
- check if msession hasn't been aborted by msession.msession_abort_reason_msg_id
- check if msession.end_time is null
Output:
- agerr (access error) - 0, 1
- agerr_msg
- login failed
- msession was aborted by server (abort_reason_id)
- error - msession already ended
- ...
[edit] msession create (mscreate)
Create new msession for machine.
Params:
- default params
- client code revision (msession.client_rev) - crev
- client process ID (msession.pid) - pid
Code:
- default code
- create new msession ( crev, pid, sysdate )
- create new mslog entry
- msession_status_id = 2 ( msession just created )
- attemt_number = 1
- change_time = now()
- estimated_finish_time = NULL
Output:
- msession_id
[edit] msession destroy (msdestroy)
Create new msession for machine.
Params:
- default params
- msession_id
Code:
- default code
- ...
[edit] get command (cget)
Params:
- default params
- msession_id - msid
- attempt_number - an
- estimated_finish_time - eftime (sleep time if new job not found)
- previous msjobp_cmd_id - pmcid
Code:
- default code
- try to find/create msjobp_commamd_id, msjobp_id and msjob_id
- new msjob
- number = 1
- pid = null
- new msjobp command
- status_id = 1 (created) (command_status)
- pid, start_time, end_time, output_id = null
- new msjob
- if new job not found then set msession_status_id to 3 ( waiting for new job )
- new mslog
Output:
- msjobp_command_id and name
- other params
- for 'get_src' command - rep_path_id (rep_path.path), rev_id (rev.rev_num)
- for 'patch' command - patch_id (fspath.web_path, fsfile.name)
[edit] set status (sset)
Params:
- default params
- msjobp_cmd_id - mcid
- cmd_status_id - csid
Code:
- default code
- set msjobp_cmd.status_id for mcid to csid
[edit] set results (rset)
Params:
- default params
- msjobp_cmd_id - mcid
- cmd_status_id - csid
- end time - etime
Code:
- default code
- set msjobp_cmd.status_id for mcid to csid
- set end_time
- ...
[edit] login (login)
Params:
- default params
- ...
[edit] add mslog (alog)
Params:
- default params
- msession_id - msid
- msstatus_id = mssid
- attempt_number
- estimated_finish_time - eftime
Code:
- default code
- set msession status
- set msstatus_id to smid
- set end_time
- ...
[edit] Server services - TODO
[edit] set_msjob_pid
[edit] set_mscomand_pid
[edit] get_patch
[edit] Reasons to test
Database changes:
- repA changes
- new revision (trunk or branch)
- repB changes
- ...
- new patch
- new request
- ..
[edit] Jobs
[edit] Database jobs
- monitor repositories
- clean up msession_status table
- clean up msession_status_id for dead msessions
- test patches if apply good on new revisions
[edit] Web server admin jobs
- stop some msessions
- need new client revs
- bad behavior
- ...
[edit] Run loop
[edit] Atributtes
msession
- abort_reason_id (end_time)
mslog
- msstatus_id
- attempt_number
- change_time
- estimated_finish_time
msjob
- pid
msjob_command
- status_id (command_status)
[edit] Client status updates
- get work info
- prepare clean working copy
- svn checksum
- svn update
- prepare temp source
- remove temp working copy
- copy clean wc to temp wc
- check temp wc validity - bypass Subversion bug
- patch working copy
- create result dir
[edit] Configuration
- Create general clients (rep_id).
- Create job (job_id) with job parts (jobp_id) with trunk repository path (rep_path_id).
- For branches which you would like to test clone job_id and modify rep_path_id.
[edit] Run commands
Repositories:
- RepA (no dependencies)
- RepB depends on RepA (e.g. ParTcl depends on Parrot)
Run this loop for RepA and then for RepB:
Create binary
- configure
- make
Test binary (internal tests)
- test package 1
- ...
- test package N
Test binary (external tests)
- test package 1
- ...
- test package M
[edit] Dependencies
- build RepA, build RepB, test RepA, test RepB
- build RepA, test RepA, build RepB, test RepB
Note: build = configure + make
[edit] TODO
[edit] DB
- save info to access_log
[edit] Code
- kdyz je nalezen novy test, tak je nutne doplnit vysledky u vsech testovani, kde se tento test mohl vyskytovat

