This repository has been archived by the owner on Mar 29, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
613 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
/* 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(); | ||
|
||
$amount = Array(); | ||
|
||
$query = mysql_query("SELECT build_id FROM awfy_regression | ||
INNER JOIN awfy_build ON awfy_build.id = build_id | ||
WHERE (mode_id = 14 OR mode_id = 26 or mode_id = 32 or mode_id = 20) AND | ||
status != 'fixed' AND status != 'improvement'"); | ||
while ($regs = mysql_fetch_object($query)) { | ||
$qScore = mysql_query("SELECT count(*) as count FROM awfy_regression_score | ||
WHERE build_id = ".$regs->build_id); | ||
$score = mysql_fetch_object($qScore); | ||
$qBreakdown = mysql_query("SELECT count(*) as count FROM awfy_regression_breakdown | ||
WHERE build_id = ".$regs->build_id); | ||
$breakdown = mysql_fetch_object($qBreakdown); | ||
$qDate = mysql_query("SELECT stamp FROM awfy_build | ||
LEFT JOIN awfy_run ON awfy_run.id = awfy_build.run_id | ||
WHERE awfy_build.id = ".$regs->build_id); | ||
$date = mysql_fetch_object($qDate); | ||
$date_str = date("Y", $date->stamp).",".(date("m", $date->stamp)*1-1).",".date("d", $date->stamp); | ||
|
||
$amount[$date_str] += $score->count + $breakdown->count; | ||
} | ||
|
||
echo "["; | ||
$first = true; | ||
foreach ($amount as $key => $value) { | ||
if (!$first) | ||
echo ','; | ||
echo '{"c":[{"v":"Date('.$key.')"},{"v":'.$value.'}]}'; | ||
$first = false; | ||
} | ||
echo "]"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/* 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, stamp, score, suite_test_id | ||
FROM `awfy_breakdown` | ||
LEFT JOIN awfy_build ON awfy_build.id = build_id | ||
LEFT JOIN awfy_run ON awfy_run.id = run_id | ||
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) | ||
$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, stamp, score, suite_version_id | ||
FROM `awfy_score` | ||
LEFT JOIN awfy_build ON awfy_build.id = build_id | ||
LEFT JOIN awfy_run ON awfy_run.id = run_id | ||
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) | ||
$data["prev_score"] = $prev[0]["score"]; | ||
|
||
die(json_encode($data)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
/* 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') { | ||
$build_id = get("breakdown", $request->id, "build_id"); | ||
$suite_test_id = get("breakdown", $request->id, "suite_test_id"); | ||
$suite = get("suite_test", $suite_test_id, "name"); | ||
|
||
$query = mysql_query("SELECT id FROM awfy_regression_breakdown | ||
WHERE breakdown_id = ".$request->id); | ||
if (mysql_num_rows($query) == 0) { | ||
mysql_query("INSERT INTO awfy_regression_breakdown | ||
(build_id, breakdown_id) VALUES (".$build_id.",".$request->id.")"); | ||
} | ||
} else { | ||
$build_id = get("score", $request->id, "build_id"); | ||
$suite_version_id = get("score", $request->id, "suite_version_id"); | ||
$suite = get("suite_version", $suite_version_id, "name"); | ||
|
||
$query = mysql_query("SELECT id FROM awfy_regression_score | ||
WHERE score_id = ".$request->id); | ||
if (mysql_num_rows($query) == 0) { | ||
mysql_query("INSERT INTO awfy_regression_score | ||
(build_id, score_id) VALUES (".$build_id.",".$request->id.")"); | ||
} | ||
} | ||
|
||
$query = mysql_query("SELECT id FROM awfy_regression | ||
WHERE build_id = ".$build_id); | ||
if (mysql_num_rows($query) == 0) { | ||
mysql_query("INSERT INTO awfy_regression | ||
(build_id, status) VALUES (".$build_id.",'unconfirmed')"); | ||
$regression_id = mysql_insert_id(); | ||
} else { | ||
$data = mysql_fetch_assoc($query); | ||
$regression_id = $data["id"]; | ||
} | ||
|
||
mysql_query("INSERT INTO awfy_regression_status | ||
(regression_id, name, extra, stamp) VALUES | ||
(".$regression_id.",'".username()."','Reported ".$suite." regression', UNIX_TIMESTAMP())"); | ||
|
||
echo $regression_id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.