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

chore: restore pty tests and make them run on the Linux CI #18424

Merged
merged 28 commits into from
Mar 28, 2023

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Mar 24, 2023

The repl tests now run on my system again. I will test on linux in a second. The tests didn't run on linux, so I'm rewriting them.

This does a few things:

  1. Rewrites the tests to be more back and forth rather than getting the output all at once (which I believe was causing the hangs on linux and maybe mac)
  2. Runs the pty tests on the linux ci.
  3. Fixes a bunch of tests that were just wrong.
  4. Adds timeouts on the pty tests.

Closes #18129 - Hangs on mac

@dsherret dsherret marked this pull request as draft March 24, 2023 21:19
@dsherret dsherret changed the title chore: restore repl tests chore: restore repl tests and make them run on the CI Mar 25, 2023

for item in deno_ast::lex(input, deno_ast::MediaType::TypeScript) {
let current_line_index = line_info.line_index(item.range.start);
let mut queued_validation_error = None;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change here fixes another regression due to swc not having regex literals as tokens anymore. A pty test pointed this out.

))
}

pub fn run(&self) -> TestCommandOutput {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the below except cwd and args isn't new. The diff is just not great.

@dsherret dsherret changed the title chore: restore repl tests and make them run on the CI chore: restore repl tests and make them run on the Linux CI Mar 28, 2023
@dsherret dsherret changed the title chore: restore repl tests and make them run on the Linux CI chore: restore pty tests and make them run on the Linux CI Mar 28, 2023
@dsherret dsherret marked this pull request as ready for review March 28, 2023 19:17
@@ -511,33 +539,30 @@ impl TestCommandOutput {
.expect("call .split_output() on the builder")
}

#[track_caller]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://blog.rust-lang.org/2020/08/27/Rust-1.46.0.html#track_caller

I just learned about this and it works way better than the failed_position() thing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, sadly the tests don't yet work properly on macOS. We tried several things but none of them worked so far. I'll try to revisit this topic later this week.

@@ -511,33 +539,30 @@ impl TestCommandOutput {
.expect("call .split_output() on the builder")
}

#[track_caller]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find

@dsherret dsherret enabled auto-merge (squash) March 28, 2023 20:42
@dsherret dsherret merged commit 6fb6b0c into denoland:main Mar 28, 2023
mmastrac pushed a commit that referenced this pull request Mar 31, 2023
1. Rewrites the tests to be more back and forth rather than getting the
output all at once (which I believe was causing the hangs on linux and
maybe mac)
2. Runs the pty tests on the linux ci.
3. Fixes a bunch of tests that were just wrong.
4. Adds timeouts on the pty tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

integration::repl tests hang on local machine
2 participants