12 include_once(__DIR__.
'/../../../lib/php/Test/Agent/AgentTestMockHelper.php');
30 public function run($args)
32 $sysConf = $this->testDb->getFossSysConf();
34 $agentName =
"compatibility";
36 $agentDir = dirname(__DIR__, 4).
'/build/src/compatibility';
37 $execDir =
"$agentDir/agent";
38 system(
"install -D $agentDir/VERSION $sysConf/mods-enabled/$agentName/VERSION");
42 $pipeFd = popen($cmd =
"$execDir/$agentName $args",
"r");
43 $success = $pipeFd !==
false;
48 while (($buffer = fgets($pipeFd, 4096)) !==
false) {
51 $retCode = pclose($pipeFd);
53 print
"failed opening pipe to $cmd";
57 unlink(
"$sysConf/mods-enabled/$agentName/VERSION");
58 rmdir(
"$sysConf/mods-enabled/$agentName");
59 rmdir(
"$sysConf/mods-enabled");
61 return array($success, $output, $retCode);
Handles scheduler interaction.