No bug - mozscreenshots: Don't capture screenshots on Try if not explicitly indicated by the env. var. rs=kitcambridge

This commit is contained in:
Matthew Noorenberghe 2016-02-02 19:05:21 -08:00
parent 3a8e2b9d98
commit c8890c7df8
2 changed files with 3 additions and 3 deletions

View File

@ -4,8 +4,6 @@
"use strict";
const env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
add_task(function* capture() {
if (!shouldCapture()) {
return;

View File

@ -5,6 +5,7 @@
"use strict";
const {AddonWatcher} = Cu.import("resource://gre/modules/AddonWatcher.jsm", {});
const env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
function setup() {
requestLongerTimeout(10);
@ -23,7 +24,8 @@ function shouldCapture() {
// Automation isn't able to schedule test jobs to only run on nightlies so we handle it here
// (see also: bug 1116275). Try pushes and local builds should also capture.
let capture = AppConstants.MOZ_UPDATE_CHANNEL == "nightly" ||
AppConstants.SOURCE_REVISION_URL.includes("/try/rev/") ||
(AppConstants.SOURCE_REVISION_URL.includes("/try/rev/") &&
env.get("MOZSCREENSHOTS_SETS")) ||
AppConstants.SOURCE_REVISION_URL == "";
if (!capture) {
ok(true, "Capturing is disabled for this MOZ_UPDATE_CHANNEL or REPO");