示例#1
0
    while ($myrow = mysql_fetch_assoc($result)) {
        $data[runID][$myrow['runID']] = $myrow;
        $limitedRunIDs[] = $myrow['runID'];
        if (!isset($machine[$myrow['runMachineID']])) {
            list($ip, $client, $hostnameID, $hostname) = getMachineInfo($myrow['runID']);
            $machine[$hostnameID][ip] = $ip;
            $machine[$hostnameID][client] = $client;
            $machine[$hostnameID][hostnameID] = $hostnameID;
            $machine[$hostnameID][hostname] = $hostname;
        }
        $data[runID][$myrow['runID']][machineIPAddr] = $machine[$myrow['runMachineID']][ip];
        $data[runID][$myrow['runID']][p4Client] = $machine[$myrow['runMachineID']][client];
        $data[runID][$myrow['runID']][hostname] = $machine[$myrow['runMachineID']][hostname];
        $data[runID][$myrow['runID']][scriptCount] = 0;
        $data[runID][$myrow['runID']][caseCount] = 0;
        $data[runID][$myrow['runID']][scripts][passed] = 0;
    }
}
getTestScriptResults($data, $condition, $limitedRunIDs);
$smarty = new TLSmarty();
$smarty->assign("chosenQueueID", is_null($queueIDform) ? "" : $queueIDform);
$smarty->assign("errors", $error);
$smarty->assign("data", $data);
# note: for the href to work you will need to edit gui/javascript/highlightTableRow.js
#       in order to propery set the <rowname>href attribute
$spanInfo = array(array(id => "runID", show => "yes", message => "runID", colName => "runID", tdTag => 'id="runID" width="6%"', href => 'smokeruns_ts.php?runID={$data.runID.$runID.runID}'), array(id => "versioncolumn", show => "yes", message => "Version", colName => "versionDottedQuad"), array(id => "buildcolumn", show => "yes", message => "Build", colName => "buildNum"), array(id => "purpose", show => "no", message => "Purpose", colName => "runPurpose"), array(id => "user", show => "yes", message => "User", colName => "NTID"), array(id => "total", show => "yes", message => "Total", colName => "scriptCount"), array(id => "passed", show => "yes", message => "Passed", evalColName => '{$data.runID.$runID.scripts.passed}'), array(id => "status", show => "yes", color => "yes", message => "Status", colName => "runStatus"), array(id => "machine", show => "no", message => "Where Run", colName => "hostname"), array(id => "cli", show => "no", color => "no", tdTag => 'class="cli"', message => "Command Line", colName => "runExecuteMethod"));
$smarty->assign("spaninfo", $spanInfo);
$smarty->display('smokeruns.tpl');
?>

示例#2
0
        if ($myrow['scriptLogLocation'] != "") {
            $data[scriptIDs][$myrow['scriptResultID']][logFile] .= "/" . $myrow['scriptLogLocation'] . "/";
        }
        $data[scriptIDs][$myrow['scriptResultID']][logFile] .= $myrow['scriptLogFile'];
        $cmdLine = preg_replace("/-testbed\\s+\\w+/", "", $myrow['scriptCommandLine']);
        $cmdLine = preg_replace("/(scpFtpPassword) (.*) (-path)/", '$1 **** $3', $cmdLine);
        #$cmdLine = preg_replace("/-FILE\.\w+\s+\S+/", "", $cmdLine);
        #$cmdLine = preg_replace("/-PATA_IMAGE\s+\S+/", "", $cmdLine);
        $data[scriptIDs][$myrow['scriptResultID']][commandLine] = $cmdLine;
        $data[scriptCount] = 0;
    }
}
$caseData = array();
$condition[] = "scriptResults.runID = {$runIDform}";
$condition[] = "runs.runID = {$runIDform}";
getTestScriptResults($caseData, $condition);
$data[scriptNums][passed] = 0;
$data[scriptNums][failed] = 0;
$data[scriptNums][skipped] = 0;
$data[scriptNums][aborted] = 0;
$data[scriptNums][running] = 0;
$data[scriptCount] = 0;
if ($caseData) {
    while (list($resultID, $values) = each($caseData[runID][$runIDform][scripts][resultID])) {
        $data[scriptIDs][$resultID][cases] = $values;
        if ($values[caseCount] == $values[casesPassed]) {
            $data[scriptNums][passed]++;
            $data[scriptIDs][$resultID][status] = "passed";
        } elseif ($values[casesFailed]) {
            $data[scriptNums][failed]++;
            $data[scriptIDs][$resultID][status] = "failed";