-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix(ci): fix windows ci #9261
Closed
Closed
fix(ci): fix windows ci #9261
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5297,16 +5297,13 @@ fn web_platform_tests() { | |
let config: std::collections::HashMap<String, Vec<WptConfig>> = | ||
deno_core::serde_json::from_value(jsonc_to_serde(jsonc)).unwrap(); | ||
|
||
// 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", | ||
}; | ||
|
||
eprintln!("If the wpt server fails or gets stuck, please set up your /etc/hosts file like specified in //docs/contributing/building_from_source.md."); | ||
eprintln!("On windows python.exe needs to available in your path, and needs to point to python 3. On macOS and Linux, python3 needs to be available in your path."); | ||
|
||
let mut proc = Command::new(python) | ||
.current_dir(util::wpt_path()) | ||
|
@@ -5316,39 +5313,8 @@ fn web_platform_tests() { | |
.spawn() | ||
.unwrap(); | ||
|
||
let stderr = proc.stderr.as_mut().unwrap(); | ||
let mut stderr = BufReader::new(stderr).lines(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should remove use declaration of this as well? |
||
let mut ready_8000 = false; | ||
let mut ready_8443 = false; | ||
let mut ready_8444 = false; | ||
let mut ready_9000 = false; | ||
while let Ok(line) = stderr.next().unwrap() { | ||
if !line.starts_with("DEBUG:") { | ||
eprintln!("{}", line); | ||
} | ||
if cfg!(target_os = "windows") && line.contains("Using ports") { | ||
break; | ||
} | ||
if line.contains("web-platform.test:8000") { | ||
ready_8000 = true; | ||
} | ||
if line.contains("web-platform.test:8443") { | ||
ready_8443 = true; | ||
} | ||
if line.contains("web-platform.test:8444") { | ||
ready_8444 = true; | ||
} | ||
if line.contains("web-platform.test:9000") { | ||
ready_9000 = true; | ||
} | ||
// WPT + python2 doesn't support HTTP/2.0. | ||
if line.contains("Cannot start HTTP/2.0 server") { | ||
ready_9000 = true; | ||
} | ||
if ready_8000 && ready_8443 && ready_8444 && ready_9000 { | ||
break; | ||
} | ||
} | ||
// Give the wpt runner time to start up. | ||
std::thread::sleep(std::time::Duration::from_secs(5)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :) |
||
|
||
let _wpt_server = WPTServer(proc); | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should check this here in Rust? Like start
python.exe --version
and see that it has the correct output?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be ok if I do this when I move the WPT runner to TS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not convinced about moving WPT runner to TS, but sure