Bug 1496341 - Run debugger tests on try. r=loganfsmyth,ahal

Differential Revision: https://phabricator.services.mozilla.com/D21217

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jason Laster 2019-02-28 14:18:59 +00:00
Родитель 19ce0ac165
Коммит 7c335e3b2b
7 изменённых файлов: 68 добавлений и 33 удалений

Просмотреть файл

@ -11,9 +11,6 @@
},
"homepage": "https://github.com/firefox-devtools/debugger.html#readme",
"engineStrict": true,
"engines": {
"node": ">=10.15.0"
},
"scripts": {
"start": "node bin/dev-server",
"start-app": "TARGET=application node bin/dev-server",

Просмотреть файл

@ -42,11 +42,12 @@ env.testing = true;
const rootPath = path.join(__dirname, "../../");
function getL10nBundle() {
const read = file => readFileSync(path.join(__dirname, file));
const read = file => readFileSync(path.join(rootPath, file));
try {
return read("../../assets/panel/debugger.properties");
return read("./assets/panel/debugger.properties");
} catch (e) {
return read("../../../../locales/en-us/debugger.properties");
return read("../../locales/en-US/debugger.properties");
}
}
@ -111,3 +112,20 @@ function mockIndexeddDB() {
}
};
}
// NOTE: We polyfill finally because TRY uses node 8
if (!global.Promise.prototype.finally) {
global.Promise.prototype.finally = function finallyPolyfill(callback) {
var constructor = this.constructor;
return this.then(function(value) {
return constructor.resolve(callback()).then(function() {
return value;
});
}, function(reason) {
return constructor.resolve(callback()).then(function() {
throw reason;
});
});
};
}

Просмотреть файл

@ -6,7 +6,7 @@ treeherder:
'cram': 'Cram tests'
'js-bench-sm': 'JavaScript shell benchmarks with Spidermonkey'
'js-bench-v8': 'JavaScript shell benchmarks with Google V8'
'mocha': 'Mocha unit tests'
'node': 'Node tests'
'py2': 'Python 2 unit tests'
'py3': 'Python 3 unit tests'
'A': 'Android Gradle tests'

Просмотреть файл

@ -19,8 +19,8 @@ jobs-from:
- doc.yml
- file-metadata.yml
- jsshell.yml
- mocha.yml
- mozlint.yml
- node.yml
- python.yml
- webidl.yml
- wpt-manifest.yml

Просмотреть файл

@ -1,21 +0,0 @@
eslint-plugin-mozilla:
description: eslint-plugin-mozilla integration tests
platform: linux64/opt
treeherder:
symbol: mocha(epm)
kind: test
tier: 1
worker-type: aws-provisioner-v1/gecko-t-linux-xlarge
worker:
docker-image: {in-tree: "lint"}
max-run-time: 1800
run:
using: run-task
cache-dotcache: true
command: >
cd /builds/worker/checkouts/gecko/tools/lint/eslint/eslint-plugin-mozilla &&
cp -r /build/node_modules_eslint-plugin-mozilla node_modules &&
npm run test
when:
files-changed:
- 'tools/lint/eslint/eslint-plugin-mozilla/**'

Просмотреть файл

@ -0,0 +1,44 @@
debugger-tests:
description: devtools debugger unit tests and flow type checks
platform: linux64/opt
treeherder:
symbol: node(debugger)
kind: test
tier: 1
worker-type: aws-provisioner-v1/gecko-t-linux-xlarge
worker:
docker-image: {in-tree: "lint"}
max-run-time: 1800
run:
using: run-task
cache-dotcache: true
command: >
cd /builds/worker/checkouts/gecko/devtools/client/debugger/new/ &&
yarn &&
yarn flow &&
yarn test
when:
files-changed:
- 'devtools/client/debugger/new/**'
eslint-plugin-mozilla:
description: eslint-plugin-mozilla integration tests
platform: linux64/opt
treeherder:
symbol: node(epm)
kind: test
tier: 1
worker-type: aws-provisioner-v1/gecko-t-linux-xlarge
worker:
docker-image: {in-tree: "lint"}
max-run-time: 1800
run:
using: run-task
cache-dotcache: true
command: >
cd /builds/worker/checkouts/gecko/tools/lint/eslint/eslint-plugin-mozilla &&
cp -r /build/node_modules_eslint-plugin-mozilla node_modules &&
npm run test
when:
files-changed:
- 'tools/lint/eslint/eslint-plugin-mozilla/**'

Просмотреть файл

@ -51,11 +51,8 @@ cd /build
# shellcheck disable=SC1091
. install-node.sh
###
# jsdoc Setup
###
npm install -g jsdoc@3.5.5
npm install -g yarn@1.9.4
/build/tooltool.py fetch -m /tmp/eslint.tt
mv /build/node_modules /build/node_modules_eslint