예제 #1
0
        }
        if ($client_at == 'bj') {
            $conn = ftp_connect("192.168.50.209") or die("Could not connect");
        } else {
            $conn = ftp_connect("192.168.60.209") or die("Could not connect");
        }
        ftp_login($conn, "ftp", "123456");
        ftp_chdir($conn, "simulator/img");
        ftp_put($conn, $jobid . '.img', $_FILES['img_file']['tmp_name'], FTP_BINARY);
        ftp_close($conn);
        //move_uploaded_file($_FILES['img_file']['tmp_name'],'../../upload_area/exec_logs/upload_imgs/' . $jobid . '.img' );
        //分解任务为单个模块
        foreach ($total_case as $module => $module_total_case) {
            if ($module != 'total' && $module_total_case != 0) {
                $sub_jobid = $jobid . '-' . $module;
                $platform_mgr->addCloudJob($sub_jobid, $client_at, $topo_type, $module, $module_total_case, $args->productline_id, $args->tplan_id, $args->device_id, $args->build_id, $args->user_name);
            }
        }
        echo "<script> {this.location.href='/lib/dcnJobs/jobsView.php?div=cloud';} </script>";
        return 0;
    }
}
function init_args()
{
    $args = new stdClass();
    $args->testproject_id = isset($_SESSION['testprojectID']) ? $_SESSION['testprojectID'] : 0;
    $args->currentUser = $_SESSION['currentUser'];
    $args->productline_id = $_COOKIE['job_productline_id'];
    $args->tplan_id = $_COOKIE['job_tplan_id'];
    $args->build_id = $_COOKIE['job_build_id'];
    $args->device_id = $_COOKIE['job_device_id'];