コード例 #1
0
ファイル: aphpunit.php プロジェクト: t-zuehlsdorff/asap
######################################
# check given parameter for test-run #
######################################
if (empty($argv[1])) {
    die("no directory with testcases given\n");
}
$strTestDir = $argv[1];
if (!is_dir($strTestDir)) {
    die("given path is not a directory: {$strTestDir}\n");
}
#########################
# initialize ipc-queues #
#########################
# initialize ipc-queue empty, to avoid messages from old test-cases
$objQueue = new \SimpleIPC(QUEUE_IDENTIFIER);
$objQueue->clear();
#################################
# initialize forking-management #
#################################
$objFork = new \Fork();
$objFork->setMaxForks(MAX_FORKS);
####################################
# initialize runtime-configuration #
####################################
# get id of the process - it will be the parent of all forked childs
$intParentPID = posix_getppid();
# get a list of all user-definied functions until here
# we can skip them when looking for newly definied test-cases
$arrAllFunctions = get_defined_functions();
$arrDefinedFunctions = $arrAllFunctions['user'];
############################################