Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: enable wpt for url #9046

Merged
merged 19 commits into from
Jan 24, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion cli/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5284,7 +5284,22 @@ fn web_platform_tests() {
let config: std::collections::HashMap<String, Vec<WptConfig>> =
deno_core::serde_json::from_value(jsonc_to_serde(jsonc)).unwrap();

let mut proc = Command::new("python3")
// The windows-2019 buildbots are too slow to finish the WPT tests within
// the 1 hour time limit.
if cfg!(target_os = "windows") && std::env::var("CI").is_ok() {
return;
}

// Observation: `python3 wpt serve` hangs with the python3 from homebrew
// but works okay with /usr/bin/python, which is python 2.7.10. Observed
// with homebrew python 3.8.5, 3.8.7 and 3.9.1.
let python = match true {
_ if cfg!(target_os = "windows") => "python.exe",
_ if cfg!(target_os = "macos") => "python",
_ => "python3",
};

let mut proc = Command::new(python)
.current_dir(util::wpt_path())
.arg("wpt")
.arg("serve")
Expand Down Expand Up @@ -5314,6 +5329,13 @@ fn web_platform_tests() {
if line.contains("web-platform.test:9000") {
ready_9000 = true;
}
<<<<<<< HEAD
lucacasonato marked this conversation as resolved.
Show resolved Hide resolved
=======
// WPT + python2 doesn't support HTTP/2.0.
if line.contains("Cannot start HTTP/2.0 server") {
ready_9000 = true;
}
>>>>>>> dd0000c3b94967cdc5f0d60efcd947c4466ecefa
if ready_8000 && ready_8443 && ready_8444 && ready_9000 {
break;
}
Expand Down
94 changes: 85 additions & 9 deletions cli/tests/wpt.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,90 @@
"structured-serialize-detail",
"user_timing_exists"
],
"wasm": [
"jsapi/constructor/compile",
"jsapi/constructor/multi-value",
"jsapi/constructor/toStringTag",
"jsapi/constructor/validate",
"jsapi/global/constructor",
"jsapi/global/toString",
"jsapi/global/value-get-set",
"jsapi/global/valueOf",
"jsapi/instance/toString",
"jsapi/instance/constructor-caching",
"jsapi/memory/toString",
"jsapi/module/constructor",
"jsapi/module/customSections",
"jsapi/module/exports",
"jsapi/module/imports",
"jsapi/module/toString",
"jsapi/table/get-set",
"jsapi/table/toString",
"webapi/body",
"webapi/invalid-args",
"webapi/rejected-arg",
"webapi/status",
"webapi/create_multiple_memory",
"create_multiple_memory"

//FAILING TESTS
// "jsapi/constructor/instantiate-bad-imports",
// "jsapi/constructor/instantiate",
// "jsapi/global/type",
// "jsapi/instance/constructor-bad-imports",
// "jsapi/instance/constructor",
// "jsapi/instance/exports",
// "jsapi/memory/buffer",
// "jsapi/memory/constructor-shared",
// "jsapi/memory/constructor-types",
// "jsapi/memory/constructor",
// "jsapi/memory/grow",
// "jsapi/memory/type",
// "jsapi/table/constructor-types",
// "jsapi/table/constructor",
// "jsapi/table/grow-reftypes",
// "jsapi/table/grow",
// "jsapi/table/length",
// "jsapi/idlharness",
// "jsapi/instance",
// "jsapi/prototypes",
// "serialization/arraybuffer/transfer"
// "serialization/module/nested-worker-success",
// "serialization/module/serialization-via-idb",
// "serialization/module/serialization-via-notifications-api",
// "webapi/abort",
// "webapi/contenttype",
// "webapi/empty-body",
// "webapi/historical",
// "webapi/idlharness",
// "webapi/instantiateStreaming-bad-imports",
// "webapi/instantiateStreaming",
// "webapi/invalid-code",
// "webapi/origin",
],
"console": [
"console-is-a-namespace",
"console-label-conversion",
"console-namespace-object-class-string",
"console-tests-historical"
],
"WebCryptoApi": ["getRandomValues"],
"WebIDL": [
"ecmascript-binding/es-exceptions/DOMException-constants",
"ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype",
"ecmascript-binding/es-exceptions/DOMException-constructor-behavior",
{
"name": "ecmascript-binding/es-exceptions/DOMException-custom-bindings",
"expectFail": [
// TODO(kt3k): Enable this test.
// We can pass this test by using Object.setPrototypeOf(...) instead of
// class...extends, but that causes a problem in printing of uncaught
// DOMException. We might need to modify how to print uncaught error in
// `//core/error.rs`.
"does not inherit from Error: class-side"
]
}
],
"url": [
"historical",
{
Expand Down Expand Up @@ -561,7 +645,6 @@
{
"name": "urlsearchparams-constructor",
"expectFail": [
"URLSearchParams constructor, DOMException as argument",
"URLSearchParams constructor, empty string as argument",
"Construct with 2 unpaired surrogates (no trailing)",
"Construct with 3 unpaired surrogates (no leading)",
Expand All @@ -584,12 +667,5 @@
"urlsearchparams-set",
"urlsearchparams-sort",
"urlsearchparams-stringifier"
],
"console": [
"console-is-a-namespace",
"console-label-conversion",
"console-namespace-object-class-string",
"console-tests-historical"
],
"WebCryptoApi": ["getRandomValues"]
]
}