Exemple #1
0
function imm_prev_($score_id)
{
    $query = mysql_query("SELECT mode_id, machine, sort_order, suite_version_id\n                          FROM `awfy_score`\n                          LEFT JOIN awfy_build ON awfy_build.id = build_id\n                          LEFT JOIN awfy_run ON awfy_run.id = run_id\n                          WHERE awfy_score.id = " . $score_id) or die(mysql_error());
    $data = mysql_fetch_assoc($query);
    $prev = prev_($data["sort_order"], $data["machine"], $data["mode_id"], $data["suite_version_id"]);
    if (count($prev) == 1) {
        return $prev[0]["id"];
    }
    return 0;
}
Exemple #2
0
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
require_once "../internals.php";
require_once "data-func.php";
init_database();
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
$request->id = (int) $request->id;
if (!isset($request->subtest)) {
    $request->subtest = false;
}
if ($request->subtest == 1 || $request->subtest == 'true') {
    $query = mysql_query("SELECT mode_id, machine, finish_stamp as stamp, awfy_breakdown.score, suite_test_id, sort_order\n                          FROM `awfy_breakdown`\n                          LEFT JOIN awfy_score ON awfy_score.id = score_id\n                          LEFT JOIN awfy_build ON awfy_build.id = awfy_score.build_id\n                          LEFT JOIN awfy_run ON awfy_run.id = run_id\n                          WHERE awfy_breakdown.id = " . $request->id) or die(mysql_error());
    $data = mysql_fetch_assoc($query);
    $prev = prev_suite_test($data["sort_order"], $data["machine"], $data["mode_id"], $data["suite_test_id"]);
    if (count($prev) == 1) {
        $data["prev_score"] = $prev[0]["score"];
    }
    $data["suite_version_id"] = get("suite_test", $data["suite_test_id"], "suite_version_id");
    $data["suite_test"] = get("suite_test", $data["suite_test_id"], "name");
    die(json_encode($data));
} else {
    $query = mysql_query("SELECT mode_id, machine, finish_stamp as stamp, score, suite_version_id, sort_order\n                          FROM `awfy_score`\n                          LEFT JOIN awfy_build ON awfy_build.id = build_id\n                          LEFT JOIN awfy_run ON awfy_run.id = run_id\n                          WHERE awfy_score.id = " . $request->id) or die(mysql_error());
    $data = mysql_fetch_assoc($query);
    $prev = prev_($data["sort_order"], $data["machine"], $data["mode_id"], $data["suite_version_id"]);
    if (count($prev) == 1) {
        $data["prev_score"] = $prev[0]["score"];
    }
    die(json_encode($data));
}
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
require_once "../internals.php";
require_once "data-func.php";
init_database();
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
if (!empty($request->score_id)) {
    $suite_version_id = get("score", (int) $request->score_id, "suite_version_id");
    $build_id = get("score", (int) $request->score_id, "build_id");
    $run_id = get("build", $build_id, "run_id");
    $stamp = get("run", $run_id, "stamp");
    $machine = get("run", $run_id, "machine");
    $mode_id = get("build", $build_id, "mode_id");
    if ($request->type == "prev") {
        $prev = prev_($stamp, $machine, $mode_id, $suite_version_id, (int) $request->amount);
        $last = array_pop($prev);
    } else {
        $next = next_($stamp, $machine, $mode_id, $suite_version_id, (int) $request->amount);
        $last = array_pop($next);
    }
    $build_id = get("score", $last["id"], "build_id");
} else {
    $suite_test_id = get("breakdown", (int) $request->breakdown_id, "suite_test_id");
    $score_id = get("breakdown", (int) $request->breakdown_id, "score_id");
    $build_id = get("score", (int) $score_id, "build_id");
    $run_id = get("build", $build_id, "run_id");
    $stamp = get("run", $run_id, "stamp");
    $machine = get("run", $run_id, "machine");
    $mode_id = get("build", $build_id, "mode_id");
    if ($request->type == "prev") {
Exemple #4
0
//  +------------------------------------------------------------------------+
//  | play.php                                                               |
//  +------------------------------------------------------------------------+
require_once 'include/initialize.inc.php';
//require_once('include/library.inc.php');
//require_once('include/config.inc.php');
header('Content-type: application/json');
$action = get('action');
if ($action == 'play') {
    play();
} elseif ($action == 'pause') {
    pause();
} elseif ($action == 'stop') {
    stop();
} elseif ($action == 'prev') {
    prev_();
} elseif ($action == 'next') {
    next_();
} elseif ($action == 'playSelect') {
    playSelect();
} elseif ($action == 'addSelect') {
    addSelect();
} elseif ($action == 'insertSelect') {
    insertSelect();
} elseif ($action == 'seekImageMap') {
    seekImageMap();
} elseif ($action == 'playIndex') {
    playIndex();
} elseif ($action == 'deleteIndex') {
    deleteIndex();
} elseif ($action == 'deleteIndexAjax') {
Exemple #5
0
}
$prev_build_id = 0;
if ($request->subtest == 1 || $request->subtest == 'true') {
    $query = mysql_query("SELECT mode_id, machine, stamp, awfy_breakdown.score, suite_test_id, build_id\n                          FROM `awfy_breakdown`\n                          LEFT JOIN awfy_score ON awfy_score.id = score_id\n                          LEFT JOIN awfy_build ON awfy_build.id = awfy_score.build_id\n                          LEFT JOIN awfy_run ON awfy_run.id = run_id\n                          WHERE awfy_breakdown.id = " . $request->id) or die(mysql_error());
    $data = mysql_fetch_assoc($query);
    $prev = prev_suite_test($data["stamp"], $data["machine"], $data["mode_id"], $data["suite_test_id"]);
    if (count($prev) == 1) {
        $prev_breakdown_id = $prev[0]["id"];
        $prev_score_id = get("breakdown", $prev_breakdown_id, "score_id");
        $prev_build_id = get("score", $prev_score_id, "build_id");
    }
    $build_id = $data["build_id"];
} else {
    $query = mysql_query("SELECT mode_id, machine, stamp, score, suite_version_id, build_id\n                          FROM `awfy_score`\n                          LEFT JOIN awfy_build ON awfy_build.id = build_id\n                          LEFT JOIN awfy_run ON awfy_run.id = run_id\n                          WHERE awfy_score.id = " . $request->id) or die(mysql_error());
    $data = mysql_fetch_assoc($query);
    $prev = prev_($data["stamp"], $data["machine"], $data["mode_id"], $data["suite_version_id"]);
    if (count($prev) == 1) {
        $prev_score_id = $prev[0]["id"];
        $prev_build_id = get("score", $prev_score_id, "build_id");
    }
    $build_id = $data["build_id"];
}
$query = mysql_query("SELECT id FROM awfy_regression\n\t\t\t\t\t  WHERE build_id = " . $build_id . " AND\n                            prev_build_id = " . $prev_build_id);
if (mysql_num_rows($query) == 0) {
    mysql_query("INSERT INTO awfy_regression\n                 (build_id, prev_build_id, status) VALUES (" . $build_id . "," . $prev_build_id . ",'unconfirmed')") or die(mysql_error());
    $regression_id = mysql_insert_id();
} else {
    $data = mysql_fetch_assoc($query);
    $regression_id = $data["id"];
}
if ($request->subtest == 1 || $request->subtest == 'true') {