Example #1
0
        $para = explode("):(", $line);
        $tmp = explode(",", $para[0]);
        $tmp2 = explode("=", $tmp[0]);
        $name = $tmp2[1];
        $xmlPath = $para[1];
        $input = $para[2];
        $cpStr = "cd " . $autoPath . "; python control.py " . $name . ";";
        $runStr = "ssh " . $host . " '" . $cpStr . "cd " . $bsPath . ";" . $exeStr . $host . ":" . $port . "" . $input . " ';";
        echo $runStr;
        unset($output);
        exec($runStr, $output);
        if (!empty($_POST['forClick']) or !empty($_POST['forClick_bex']) or !empty($_POST['forClick_tade']) or !empty($_POST['forClick_adx'])) {
            $tmp = processClick($output, $name, $cb);
            $string_c = $string_c . $tmp;
        } else {
            $tmp = processRender($output, $name, $rs, $nginx);
            $string_w = $string_w . $tmp;
        }
    }
    #end if valid line
}
#end while
if (!empty($_POST['forClick']) or !empty($_POST['forClick_bex']) or !empty($_POST['forClick_tade']) or !empty($_POST['forClick_adx'])) {
    echo $string_c;
} else {
    $string_w = $string_w . "</body></html>";
    fwrite($file_w, $string_w);
    fclose($file_w);
    $link = "http://tb037x.corp.youdao.com:28081/m_teamTools/m_adTestDsp/m_dspRenderClick/render.html";
    echo "渲染回测链接:<a href=" . $link . " target='blank'>" . $link . "</a>";
}
Example #2
0
        $string_c = $string_c . $tmp;
    }
    #end of foreach
} else {
    #end of if
    $renderCaseId = array("4775", "4777", "4779", "4781", "4783", "5049");
    $renderCaseName = array("SWF_RENDER", "JPG_RENDER", "ITEM_RENDER", "THIRDPARTY_RENDER", "THIRDPARTYITEM_RENDER", "ZHIXUAN_ITEMDYNAMIC");
    #$renderCaseId=array("5049");
    #$renderCaseName=array("ZHIXUAN_ITEMDYNAMIC");
    for ($i = 0; $i < count($renderCaseId); $i++) {
        $cpStr = "cd " . $autoPath . "; python task.py -t " . $autoTaskId . " -c  " . $renderCaseId[$i] . ";";
        $runStr = "ssh " . $host . " '" . $cpStr . "cd " . $bsPath . ";" . $exeStr . $host . ":" . $port . " -url youdao.com -v';";
        echo $runStr;
        unset($output);
        exec($runStr, $output);
        $tmp = processRender($output, $renderCaseName[$i], $rs, $nginx);
        $string_w = $string_w . $tmp;
    }
    #end of foreach
}
#
if (!empty($_POST['forClick']) or !empty($_POST['forClick_bex']) or !empty($_POST['forClick_tade']) or !empty($_POST['forClick_adx'])) {
    echo $string_c;
} else {
    $string_w = $string_w . "</body></html>";
    fwrite($file_w, $string_w);
    fclose($file_w);
    $link = "http://tb037x.corp.youdao.com:28081/m_teamTools/m_adTestDsp/m_dspRenderClick/render.html";
    echo "渲染回测链接:<a href=" . $link . " target='blank'>" . $link . "</a>";
}
?>