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

re-enable test_raw_tty #8509

Merged
merged 2 commits into from
Nov 26, 2020
Merged
Changes from all 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
12 changes: 6 additions & 6 deletions cli/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,13 @@ fn no_color() {
assert_eq!("noColor false", util::strip_ansi_codes(stdout_str));
}

// TODO re-enable. This hangs on macOS
// https://github.com/denoland/deno/issues/4262
#[cfg(unix)]
#[test]
#[ignore]
pub fn test_raw_tty() {
use std::io::{Read, Write};
use util::pty::fork::*;

let deno_exe = util::deno_exe_path();
let deno_dir = TempDir::new().expect("tempdir fail");
let fork = Fork::from_ptmx().unwrap();

if let Ok(mut master) = fork.is_parent() {
Expand All @@ -206,14 +204,16 @@ pub fn test_raw_tty() {
t.local_flags.remove(termios::LocalFlags::ECHO);
termios::tcsetattr(stdin_fd, termios::SetArg::TCSANOW, &t).unwrap();

let deno_dir = TempDir::new().expect("tempdir fail");
let mut child = Command::new(util::deno_exe_path())
let mut child = Command::new(deno_exe)
.env("DENO_DIR", deno_dir.path())
.current_dir(util::root_path())
.arg("run")
.arg("--unstable")
.arg("cli/tests/raw_mode.ts")
.stdin(Stdio::inherit())
.stdout(Stdio::inherit())
// Warning: errors may be swallowed. Try to comment stderr null if
// experiencing problems.
.stderr(Stdio::null())
.spawn()
.expect("Failed to spawn script");
Expand Down