Bug 1809843 - Run mochitest with Http/3 server on try, r=gbrown,necko-reviewers,ci-and-tooling,valentin,suhaib,jmaher

Differential Revision: https://phabricator.services.mozilla.com/D167515
This commit is contained in:
Kershaw Chang 2023-03-21 09:09:58 +00:00
Родитель 5cc62d9dc4
Коммит b39b0bed43
20 изменённых файлов: 90 добавлений и 7 удалений

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

@ -287,7 +287,7 @@ class TRRServerCode {
await global.server.listen(port);
global.dnsPacket = require(`${__dirname}/../dns-packet`);
global.ip = require(`${__dirname}/../node-ip`);
global.ip = require(`${__dirname}/../node_ip`);
let serverPort = global.server.address().port;

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

@ -541,7 +541,7 @@ ARCHIVE_FILES = {
"mach_test_package_commands.py",
"moz-http2/**",
"node-http2/**",
"node-ip/**",
"node_ip/**",
"node-ws/**",
"dns-packet/**",
"odoh-wasm/**",

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

@ -57,6 +57,7 @@ treeherder:
'M-headless-nofis': 'Headless Mochitests without fission enabled.'
'M-headless-spi-nw': 'Headless Mochitests with fission and socketprocess networking.'
'M-headless-spi-nw-nofis': 'Headless Mochitests with fission and socketprocess networking without fission enabled.'
'M-http3': 'Mochitests with Http/3 server'
'M-aab': 'Mochitests with AAB test_runner.'
'M-aab-nofis': 'Mochitests with AAB test_runner without fission enabled.'
'M-1proc': 'Mochitests without e10s or fission'

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

@ -66,6 +66,7 @@ mochitest-plain:
- webrender-sw
- headless
- headless+socketprocess_networking
- http3
run-on-projects:
by-variant:
conditioned_profile:
@ -118,6 +119,10 @@ mochitest-plain:
linux1804-64-qr/debug: ['trunk']
linux1804-64(-shippable|-asan)?-qr/opt: ['trunk']
default: []
http3:
by-test-platform:
linux1804-64-qr/debug: built-projects
default: []
default:
by-test-platform:
android.*: []
@ -149,6 +154,31 @@ mochitest-plain:
by-test-platform:
android-em.*: false
default: true
fetches:
toolchain:
by-test-platform:
linux.*:
- linux64-node-12
- linux64-minidump-stackwalk
- linux64-fix-stacks
macosx.*:
- macosx64-node-12
- macosx64-minidump-stackwalk
- macosx64-fix-stacks
win.*-64.*:
- win64-node-12
- win32-minidump-stackwalk
- win32-fix-stacks
win.*32.*:
- win32-node-12
- win32-minidump-stackwalk
- win32-fix-stacks
android-em-7.*:
- android-system-image-x86_64-linux
- android-avd-x86_64-linux
- android-emulator-linux
- linux64-node-12
- linux64-minidump-stackwalk
mochitest-a11y:
description: "Mochitest a11y run"

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

@ -276,3 +276,13 @@ msix:
mozharness:
extra-options:
- "--installer-path installer.msix"
http3:
description: "{description} with http3 server"
component: "Testing::General"
expiration: "2023-09-01"
suffix: "http3"
merge:
mozharness:
extra-options:
- "--use-http3-server"

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

@ -14,8 +14,18 @@ const options = {
const http2 = require("http2");
const http = require("http");
const url = require("url");
const dnsPacket = require("../../xpcshell/dns-packet");
const _ = require("lodash");
const path = require("path");
let dnsPacket;
let libPath = path.join(__dirname, "../../xpcshell/dns-packet");
if (fs.existsSync(libPath)) {
// This is the path of dns-packet when running mochitest locally.
dnsPacket = require(libPath);
} else {
// This path is for running mochitest on try.
dnsPacket = require(path.join(__dirname, "./dns_packet"));
}
let serverPort = parseInt(process.argv[2].split("=")[1]);
let listeningPort = parseInt(process.argv[3].split("=")[1]);

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

@ -210,6 +210,25 @@ TEST_HARNESS_FILES.testing.mochitest.websocketprocessbridge += [
"/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements_3.txt",
]
TEST_HARNESS_FILES.testing.mochitest.DoHServer.dns_packet += [
"../xpcshell/dns-packet/classes.js",
"../xpcshell/dns-packet/index.js",
"../xpcshell/dns-packet/opcodes.js",
"../xpcshell/dns-packet/optioncodes.js",
"../xpcshell/dns-packet/package.json",
"../xpcshell/dns-packet/rcodes.js",
"../xpcshell/dns-packet/test.js",
"../xpcshell/dns-packet/types.js",
]
TEST_HARNESS_FILES.testing.mochitest.DoHServer.node_ip += [
"../xpcshell/node_ip/package.json",
]
TEST_HARNESS_FILES.testing.mochitest.DoHServer.node_ip.lib += [
"../xpcshell/node_ip/lib/ip.js",
]
with Files("**"):
BUG_COMPONENT = ("Testing", "Mochitest")
SCHEDULES.exclusive = ["mochitest"]

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

@ -3287,6 +3287,7 @@ toolbar#nav-bar {
"e10s": options.e10s,
"fission": not options.disable_fission,
"headless": options.headless,
"http3": options.useHttp3Server,
# Until the test harness can understand default pref values,
# (https://bugzilla.mozilla.org/show_bug.cgi?id=1577912) this value
# should by synchronized with the default pref value indicated in

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

@ -322,6 +322,15 @@ class DesktopUnittest(TestingMixin, MercurialScript, MozbaseMixin, CodeCoverageM
"times in which case the test must contain at least one of the given tags.",
},
],
[
["--use-http3-server"],
{
"action": "store_true",
"default": False,
"dest": "useHttp3Server",
"help": "Whether to use the Http3 server",
},
],
]
+ copy.deepcopy(testing_config_options)
+ copy.deepcopy(code_coverage_config_options)
@ -621,6 +630,9 @@ class DesktopUnittest(TestingMixin, MercurialScript, MozbaseMixin, CodeCoverageM
]:
base_cmd.append("--disable-fission")
if c["useHttp3Server"]:
base_cmd.append("--use-http3-server")
# Ignore chunking if we have user specified test paths
if not (self.verify_enabled or self.per_test_coverage):
test_paths = self._get_mozharness_test_paths(suite_category, suite)

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

@ -6,7 +6,7 @@ exports.rcodes = rcodes;
const opcodes = require('./opcodes')
const classes = require('./classes')
const optioncodes = require('./optioncodes')
const ip = require('../node-ip')
const ip = require('../node_ip')
const QUERY_FLAG = 0
const RESPONSE_FLAG = 1 << 15

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

@ -16,7 +16,7 @@ var fs = require("fs");
var url = require("url");
var crypto = require("crypto");
const dnsPacket = require(`${node_http2_root}/../dns-packet`);
const ip = require(`${node_http2_root}/../node-ip`);
const ip = require(`${node_http2_root}/../node_ip`);
const { fork } = require("child_process");
const path = require("path");
const zlib = require("zlib");

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

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

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

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

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

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

@ -162,7 +162,7 @@ testing/talos/talos/tests/v8_7/
testing/web-platform/tests/resources/webidl2/
testing/web-platform/tests/tools/third_party/
testing/xpcshell/dns-packet/
testing/xpcshell/node-ip/
testing/xpcshell/node_ip/
testing/xpcshell/node-http2/
testing/xpcshell/node-ws/
testing/xpcshell/odoh-wasm/