NAME
Tapper::MCP::Master - Wait for new testruns and start a new child when needed
SYNOPSIS
use Tapper::MCP::Master;
my $mcp = Tapper::MCP::Master->new();
$mcp->run();
Attributes
dead_child
Number of pending dead child processes.
child
Contains all information about all child processes.
consolefiles
Output files for console logs ordered by file descriptor number.
readset
IO::Select object containing all opened console file handles.
Associated Scheduler object.
FUNCTIONS
set_interrupt_handlers
Set interrupt handlers for important signals. No parameters, no return values.
@return success - 0
console_open
Open console connection for given host and appropriate console log output file for the testrun on host. Returns console on success or an error string for failure.
@param string - system name @param int - testrun id
@retval success - IO::Socket::INET @retval error - error string
console_close
Close a given console connection.
@param IO::Socket::INET - console connection socket
@retval success - 0 @retval error - error string
handle_dead_children
Each test run is handled by a child process. All information needed for communication with this child process is kept in $self->child. Reset all these information when the test run is finished and the child process ends.
consolelogfrom
Read console log from a handle and write it to the appropriate file.
@param file handle - read from this handle
@retval success - 0 @retval error - error string
notify_event
Inform the notification framework that an event occured in MCP.
@param string - event name @param hash ref - message
run_due_tests
Run the tests that are due.
@param TestrunScheduling - job to run @param boolean - are we in revive mode?
@retval success - 0 @retval error - error string
runloop
Main loop of this module. Checks for new tests and runs them. The looping itself is put outside of function to allow testing.
prepare_server
Create communication data structures used in MCP.
@return
revive_children
Restart the children that were running before MCP was shut down/crashed. The function expects no parameters and has no return values.
run
Set up all needed data structures then wait for new tests.
AUTHOR
AMD OSRC Tapper Team <tapper@amd64.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2012 by Advanced Micro Devices, Inc..
This is free software, licensed under:
The (two-clause) FreeBSD License