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

Reorganize integration tests as one crate with many modules #4867

Closed
matklad opened this Issue Dec 27, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@matklad
Member

matklad commented Dec 27, 2017

Currently, Cargo has a huge amount of integration tests. The problem with them is that each test is a separate artifact, and each tests gets a copy of Cargo linked in. This leads to a HUGE ./target directory after cargo test, about 7 GB.

What if instead we have only one crate with integration tests, which consists of a number of submodules? That is, to have this layout

tests/
  cargosuite/
    main.rs # <- mod build; mod run; mod test; mod publish;
    build.rs
    run.rs
    test.rs
    publish.rs
@alexcrichton

This comment has been minimized.

Member

alexcrichton commented Dec 27, 2017

This may no longer be a problem with incremental compilation, but historically I haven't done this because it makes compilation time for tests huge. Would just want to be sure that editing tests doesn't take minutes to get a new artifact!

@matklad

This comment has been minimized.

Member

matklad commented Dec 27, 2017

Would just want to be sure that editing tests doesn't take minutes to get a new artifact!

Yeah, the alternative would be for tests not to link with cargo. I think it is possible to achieve, but will require moderately more complicated changes. Not that we need to do anything with tests right now, but it would be great to fix it one day :)

@rochamatcomp

This comment has been minimized.

Contributor

rochamatcomp commented Feb 6, 2018

I can try to do.

bors added a commit that referenced this issue Feb 21, 2018

Auto merge of #5063 - Eh2406:TestssuiteV3, r=matklad
Reorganize integration tests as one crate with many modules. Issue #4867. Rebased V3

This is an automatic rebase of @rochamatcomp's work in #5022, as requested in [#5038](#5038 (comment)).

I take no credit for the changes; I just wanted faster test for my work. :-)

@matklad matklad closed this Mar 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment