Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSwitch `run-make` tests from Makefiles to rust #40713
Comments
TimNN
added
A-build
A-testsuite
labels
Mar 21, 2017
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
IIRC, |
This comment has been minimized.
This comment has been minimized.
|
Oh dear I completely forgot about filing an issue to do this! I would love to have this implementation, I think we should drop I would discourage use of Python for basically the sole reason that "contributors to rust-lang/rust are likely Rust programmers" in the sense that it's far easier for us as a community to maintain Rust code than Python code (empircally this seems true as well). I agree an incremental strategy is best, and I think that we've got a lot of flexibility in terms of what we move to. In general I think it should look like:
Given all that I'd imagine this would be best implemented by extending compiletest slightly to compile a librun_make library and then compile scripts with rustc and then execute them (passing variables as appropriate). That way we could add something like (note that this'd make a fantastic quest issue to migrate over these tests) |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton Define "quest issue"? Do you mean something like what we did for #35233 ? |
This comment has been minimized.
This comment has been minimized.
|
Yep! Precisely like that |
Mark-Simulacrum
referenced this issue
May 16, 2017
Open
consider linting test/run-pass/*.rs to ensure all have assert/assert_eq #23113
Mark-Simulacrum
added
I-nominated
T-infra
labels
Jun 27, 2017
Mark-Simulacrum
added
I-nominated
and removed
I-nominated
labels
Jul 7, 2017
Mark-Simulacrum
assigned
TimNN
Jul 7, 2017
Mark-Simulacrum
removed
the
I-nominated
label
Jul 7, 2017
TimNN
changed the title
Interest in switching `run-make` to python or rust
Switch `run-make` tests from `make` to `rust`
Jul 8, 2017
TimNN
changed the title
Switch `run-make` tests from `make` to `rust`
Switch `run-make` tests from Makefiles to rust
Jul 8, 2017
This comment has been minimized.
This comment has been minimized.
|
I just updated the original issue with a somewhat more detailed plan on going forward, as well as some open questions. Any feedback / thoughts are greatly appreciated. I will personally start to work on the steps mentioned, although that will have to wait for about two weeks until I finish my bachelor's thesis. |
Mark-Simulacrum
added
the
C-enhancement
label
Jul 27, 2017
This comment has been minimized.
This comment has been minimized.
|
Some of the run-make tests like Some must still rely on make, mainly |
TimNN commentedMar 21, 2017
•
edited
Rust currently has a suite of
run-maketests, which generally test specificrustcinvocations or behaviour, or require external tools (eg.grepornm).The goal of this issue is to rewrite these
run-maketests, which are currently written as Makefiles, in rust to a) get rid of the dependency on external tools such asmakeand b) make them more accessible to rust contributors by not requiring arcane knowledge of themaketool.The transition will require at least the following steps:
run-maketests with regard to what they actually do / which programs they use (and how). I assume the programs will likely fall into one of three categories:rustc,rustdoc)grepnm, which cannot be easily rewritten in rustcompile-test, mayberun-rmake, which runs the new rust-basedrun-maketests. This will either include compiling the support library, or receiving the support library from a previous build stage.run-maketests, which may involve adding additional functionality to the support library. At that time this issue, or another, will track the state of all the existing tests and include some detailed instruction to allow people to easily contributing by porting one of the existing tests.There are some open questions:
compiletestthe correct choice? For example the support library itself may have external dependencies (mayberegexorgcc-rs) which means we should probably use cargo to compile the actual tests. At which point it may be worth considering ifcompile-testis needed at all or if cargo is enough (Have the support library insrc/lib.rs, the newrun-maketests intests/*.rsand auxiliary files in subdirectories oftests/named after the main test file).If anyone wants to get involved in the process, please leave a comment on this issue or ping me on IRC.
Original Issue Description
Based on a short experiment, it looks like rust on msvc only has five build dependencies: Visual Studio, Git, Python, CMake and make, where make is only used for the
run-maketests as far as I can tell.Of those five, the first four are easily installable natively on windows, whereas make wasn't as straight forward to installe when I tried and required msys2 / mingw.
The questions the are:
run-maketests.