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

Shorten paths to auxiliary files created by tests #45748

Merged
merged 1 commit into from
Nov 5, 2017

Conversation

petrochenkov
Copy link
Contributor

I'm hitting issues with long file paths to object files created by the test suite, similar to #45103 (comment).

If we look at the object file path in #45103 we can see that the patch contains of few components:

specialization-cross-crate-defaults.stage2-x86_64-pc-windows-gnu.run-pass.libaux\specialization_cross_crate_defaults.specialization_cross_crate_defaults0.rust-cgu.o

=>

  1. specialization-cross-crate-defaults // test name, required
  2. stage2 // stage disambiguator, required
  3. x86_64-pc-windows-gnu // target disambiguator, required
  4. run-pass // mode disambiguator, rarely required
  5. libaux // suffix, can be shortened
  6. specialization_cross_crate_defaults // required, there may be several libraries in the directory
  7. specialization_cross_crate_defaults0 // codegen unit name, can be shortened?
  8. rust-cgu // suffix, can be shortened?
  9. o // object file extension

This patch addresses items 4, 5 and 8.
libaux is shortened to aux, rust-cgu is shortened to rcgu, mode disambiguator is omitted unless it's necessary (for pretty-printing and debuginfo tests, see 38d26d8)

I haven't touched names of codegen units though (specialization_cross_crate_defaults0).
Is it useful for them to have descriptive names including the crate name, as opposed to just 0 or cgu0 or something?

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

@bors: r+

Thanks!

One possible strategy could be a cargo-like strategy where everything is hashed but a descriptive name remains in front for debugging

@bors
Copy link
Contributor

bors commented Nov 3, 2017

📌 Commit d588f93 has been approved by alexcrichton

@Zoxc
Copy link
Contributor

Zoxc commented Nov 4, 2017

You could drop x86_64-pc-windows-gnu too since these files are created inside build\x86_64-pc-windows-gnu.

@kennytm kennytm added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 4, 2017
@petrochenkov
Copy link
Contributor Author

petrochenkov commented Nov 4, 2017

@Zoxc
build\x86_64-pc-windows-gnu refers to the host triple, but disambiguator x86_64-pc-windows-gnu refers to a target triple.
If tests are run from one x86_64-pc-windows-gnu host for several targets, they will all end up in build\x86_64-pc-windows-gnu.
(In principle the disambiguator can be omitted when target == host though, leaving only cross-compiled paths long.)

@bors
Copy link
Contributor

bors commented Nov 5, 2017

⌛ Testing commit d588f93 with merge 16e9b9f...

bors added a commit that referenced this pull request Nov 5, 2017
Shorten paths to auxiliary files created by tests

I'm hitting issues with long file paths to object files created by the test suite, similar to #45103 (comment).

If we look at the object file path in #45103 we can see that the patch contains of few components:
```
specialization-cross-crate-defaults.stage2-x86_64-pc-windows-gnu.run-pass.libaux\specialization_cross_crate_defaults.specialization_cross_crate_defaults0.rust-cgu.o
```
=>

1. specialization-cross-crate-defaults // test name, required
2. stage2 // stage disambiguator, required
3. x86_64-pc-windows-gnu // target disambiguator, required
4. run-pass // mode disambiguator, rarely required
5. libaux // suffix, can be shortened
6. specialization_cross_crate_defaults // required, there may be several libraries in the directory
7. specialization_cross_crate_defaults0 // codegen unit name, can be shortened?
8. rust-cgu // suffix, can be shortened?
9. o // object file extension

This patch addresses items `4`, `5` and `8`.
`libaux` is shortened to `aux`, `rust-cgu` is shortened to `rcgu`, mode disambiguator is omitted unless it's necessary (for pretty-printing and debuginfo tests, see 38d26d8)

I haven't touched names of codegen units though (`specialization_cross_crate_defaults0`).
Is it useful for them to have descriptive names including the crate name, as opposed to just `0` or `cgu0` or something?
@bors
Copy link
Contributor

bors commented Nov 5, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 16e9b9f to master...

@bors bors merged commit d588f93 into rust-lang:master Nov 5, 2017
@petrochenkov petrochenkov deleted the short branch June 5, 2019 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants