Skip to content

Parallel make check doesn't run in the right order #22021

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

Closed
Manishearth opened this issue Feb 6, 2015 · 6 comments
Closed

Parallel make check doesn't run in the right order #22021

Manishearth opened this issue Feb 6, 2015 · 6 comments

Comments

@Manishearth
Copy link
Member

I ran make check -j7, and some of the tests were failing because the syntax and rustc libs in $target/stage2/lib/rustlib/....../lib/ hadn't been built yet.

I guess the makefile needs some tweaks?

@kmcallister
Copy link
Contributor

I've seen this too. I usually do make -j8 all && make check but it'd be great if this worked.

@Manishearth
Copy link
Member Author

This seems to be specific to the pretty tests. Goes away with make rustc-stage2 && make check-stage2, so I assume a make dep is missing.

@pnkfelix
Copy link
Member

cc me

@rprichard
Copy link
Contributor

@pnkfelix AFAICT, the PRETTY_DEPS$(1)_H_$(3)_pretty-... definitions in this commit are not defining the expected variables, because the definitions are outside any function, so $(1) and $(3) expand to nothing.

make -pn shows this line:

PRETTY_DEPS_H__pretty-rpass-full = $$(HLIB$(1)_H_$(3))/stamp.syntax $$(HLIB$(1)_H_$(3))/stamp.rustc

I'll work on a fix.

@rprichard
Copy link
Contributor

@pnkfelix Do you have a preference on how to fix the run-make/simd-ffi test with parallel make check?

I have a fix now, but it's not successfully tested.

Parallel make check now fails because the run-make/simd-ffi test is run in parallel, and it has multiple phony targets that generate the same output file. I think it's easy to fix that test. Alternatively, we could disable parallelism for run-make tests by modifying src/etc/maketest.py somehow: (1) add -j 1 to the command-line or (2) filter/clear MAKEFLAGS. I'm leaning towards -j 1 if we want to disable parallelism. I think we require GNU make, so I would think -j 1 wouldn't break anything.

@rprichard
Copy link
Contributor

I fixed run-make/simd-ffi. I'll leave maketest.py alone for now.

rprichard added a commit to rprichard/rust that referenced this issue Apr 17, 2015
The current code attempts to define the
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full variable, which does not work,
because $(1) and $(3) are not inside a function. Moving it into a function
helps, but we need the target library (TLIB), not the host library (HLIB).
Moreover, there is a test (run-pass-fulldeps/compiler-calls.rs) that uses
rustc_driver, which is not an indirect dependency of librustc or libsyntax.
Listing all the dependencies will be hard to maintain, but there's a better
way to do this...

As with the rpass-full and cfail-full tests, add dependencies using the
$$(CSREQ$(1)_T_$(2)_H_$(3)) variable, which includes the complete set of
host and target crates, built for a particular stage, host, and target.

Fixes rust-lang#22021
@bors bors closed this as completed in b7ab2ae Apr 23, 2015
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

No branches or pull requests

4 participants