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

libstd Process tests depend on msys programs on windows #38565

Closed
retep998 opened this issue Dec 23, 2016 · 6 comments
Closed

libstd Process tests depend on msys programs on windows #38565

retep998 opened this issue Dec 23, 2016 · 6 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. O-windows Operating system: Windows

Comments

@retep998
Copy link
Member

If you don't have some sort of msys in your PATH, then the libstd process tests will fail because they attempt to spawn programs that don't exist on Windows by default.

failures:

---- process::tests::test_finish_once stdout ----
        thread 'process::tests::test_finish_once' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "The system cannot find the file specified." } }', src\libcore\result.rs:845

---- process::tests::test_finish_twice stdout ----
        thread 'process::tests::test_finish_twice' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "The system cannot find the file specified." } }', src\libcore\result.rs:845

---- process::tests::test_process_output_error stdout ----
        thread 'process::tests::test_process_output_error' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "The system cannot find the file specified." } }', src\libcore\result.rs:845

---- process::tests::test_process_output_output stdout ----
        thread 'process::tests::test_process_output_output' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "The system cannot find the file specified." } }', src\libcore\result.rs:845

---- process::tests::test_process_status stdout ----
        thread 'process::tests::test_process_status' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "The system cannot find the file specified." } }', src\libcore\result.rs:845

---- process::tests::test_wait_with_output_once stdout ----
        thread 'process::tests::test_wait_with_output_once' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "The system cannot find the file specified." } }', src\libcore\result.rs:845


failures:
    process::tests::exit_reported_right
    process::tests::smoke
    process::tests::stdout_works
    process::tests::test_finish_once
    process::tests::test_finish_twice
    process::tests::test_process_output_error
    process::tests::test_process_output_output
    process::tests::test_process_status
    process::tests::test_wait_with_output_once
@brson brson added O-windows Operating system: Windows A-testsuite Area: The testsuite used to check the correctness of rustc I-wrong labels Dec 23, 2016
@brson
Copy link
Contributor

brson commented Dec 23, 2016

It's probably best for the test suite to run it's own binaries for testing processes, but in the short term we can just make their names unix/windows-specific.

@brson brson added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Dec 23, 2016
@brson
Copy link
Contributor

brson commented Dec 23, 2016

The task here should be simple. Identify equivalent windows system exes to call for the failing tests and use cfgs to enable them on windows.

@abhijeetbhagat
Copy link
Contributor

i can work on this.

@petrochenkov
Copy link
Contributor

All run-make tests also fail when run without msys (they are not skipped on MSVC, at least in rustbuild).
In theory they could use MSVC's nmake instead of make, they should be compatible for very simple makefiles.

@alexcrichton
Copy link
Member

@petrochenkov oh my plan with run-make was to migrate all the tests to Rust actually one day rather than prolonging the life of make. I feel like it'd be a never-ending series of painful PRs to maintain compatibility with both make and nmake, so we could solve both by making a rustbuild-like transition, just rewriting all the tests in Rust.

bors added a commit that referenced this issue Jan 8, 2017
Fix process module tests to run on Windows

Fixes #38565
r? @retep998
bors added a commit that referenced this issue Jan 8, 2017
Fix process module tests to run on Windows

Fixes #38565
r? @retep998
@petrochenkov
Copy link
Contributor

use MSVC's nmake instead of make

Some status update: This is a bad idea.
nmake and gnu make are largely incompatible and most of src\test\run-make\tools.mk and many makefiles need to be rewritten + run-make tests actively use other unix utilities unavailable in MSVC environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

5 participants