23 include_once(__DIR__.
'/../../../lib/php/Test/Agent/AgentTestMockHelper.php');
41 public function run($args)
43 $sysConf = $this->testDb->getFossSysConf();
47 $agentDir = dirname(dirname(__DIR__));
48 $execDir =
"$agentDir/agent";
49 system(
"install -D $agentDir/VERSION $sysConf/mods-enabled/$agentName/VERSION");
51 $pipeFd = popen($cmd =
"$execDir/$agentName $args",
"r");
52 $success = $pipeFd !==
false;
57 while (($buffer = fgets($pipeFd, 4096)) !==
false) {
60 $retCode = pclose($pipeFd);
62 print
"failed opening pipe to $cmd";
65 unlink(
"$sysConf/mods-enabled/$agentName/VERSION");
66 rmdir(
"$sysConf/mods-enabled/$agentName");
67 rmdir(
"$sysConf/mods-enabled");
69 return array($success, $output, $retCode);
Handles scheduler interaction.