about summary refs log tree commit diff
path: root/src/tools/compiletest
AgeCommit message (Collapse)AuthorLines
2017-11-06Auto merge of #45737 - oli-obk:json, r=petrochenkovbors-1/+2
Pretty print json in ui tests I found the json output in one line to not be useful for reviewing r? @petrochenkov
2017-11-06Abbreviate some stdout/stderr output in compiletest.kennytm-7/+300
This is intended to prevent the spurious OOM error from run-pass/rustc-rust-log.rs, by skipping the output in the middle when the size is over 416 KB, so that the log output will not be overwhelmed.
2017-11-05Auto merge of #45748 - petrochenkov:short, r=alexcrichtonbors-1/+15
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 https://github.com/rust-lang/rust/issues/45103#issuecomment-335622075. If we look at the object file path in https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/pull/24537/commits/38d26d811a44ba93637c84ce77a58af88c47f0ac) 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?
2017-11-03Shorten paths to auxiliary files created by testsVadim Petrochenkov-1/+15
2017-11-03Pretty print json in ui testsOliver Schneider-1/+2
2017-11-02improve compiletest output for errors from mir-opt testsMikhail Modin-3/+16
2017-10-31runtest: fix mir directory and delete outdated MIR filesNiko Matsakis-5/+4
2017-10-25Compiletest should parse suggestions from the spansOliver Schneider-9/+10
2017-10-21Auto merge of #45391 - malbarbo:x32-1, r=alexcrichtonbors-1/+1
Update libc and some fixes for x86_64-unknown-linux-gnux32
2017-10-20Fix some tests for linux gnux32Marco A L Barbosa-1/+1
2017-10-19Auto merge of #45080 - clippered:issue-44986/fix-windows-ui-path, r=estebankbors-1/+8
Issue 44986/fix windows ui path #44968
2017-10-15Don't use target's linker when linking build scriptsVadim Petrochenkov-0/+3
2017-10-15rustbuild: Support specifying archiver and linker explicitlyVadim Petrochenkov-1/+17
2017-10-15Rollup merge of #45258 - hdhoang:master, r=alexcrichtonkennytm-2/+2
compiletest/runtest: format ErrorKind with Display The strings are nouns for the most part, so we give ErrorKind::Help a more sensible string. This reduces quote hiccups in failure output. unexpected "error": '...' ↓ unexpected error: '...'
2017-10-14Auto merge of #45162 - chrisvittal:mir-testing, r=nikomatsakisbors-32/+94
Modify MIR testing to require consecutive lines MIR testing now requires that lines be consecutive. To achive this, instead of collecting the expected mir as a string, it is now wrapped in an `ExpectedLine` enum, that is either `Elision` or `Text(T)` where `T: AsRef<str>`. `Text` lines must be matched in order, unless separated by `Elision` lines. Elision occurs lazily, that is, an Elision will skip as few lines as possible. To add a new elision marker. Put a comment containing only "..." and whitespace in any MIR testing block. Like so: ``` // fn write_42(_1: *mut i32) -> bool { // ... // bb0: { // Validate(Acquire, [_1: *mut i32]); // Validate(Release, [_1: *mut i32]); // ... // return; // } // } ``` Right now, all input before the line right after `// START` is elided, and all input after the line right before `// END` is also not tested. Many tests need to be updated. That will follow in the next commit. cc #45153 r? @nikomatsakis
2017-10-13Auto merge of #45063 - michaelwoerister:bring-back-incremental-info, ↵bors-1/+0
r=nikomatsakis incr.comp.: Bring back output of -Zincremental-info. This got kind lost during the transition to red/green. I also switched back from `eprintln!()` to `println!()` since the former never actually produced any output. I suspect this has to do with `libterm` somehow monopolizing `stderr`. r? @nikomatsakis
2017-10-13compiletest/runtest: format ErrorKind with DisplayHoàng Đức Hiếu-2/+2
The strings are nouns for the most part, so we give ErrorKind::Help a more sensible string. This reduces quote hiccups in failure output. unexpected "error": '...' ↓ unexpected error: '...'
2017-10-11Fix #44968 Windows path in UI testsclippered-1/+8
2017-10-09Modify MIR testing to require continuous linesChristopher Vittal-32/+94
Mir testing now requires that lines be continuous. To achive this, instead of collecting the expected mir as a string, it is now wrapped in an `ExpectedLine` enum, that is either `Elision` or `Text(T)` where `T: AsRef<str>`. `Text` lines must be matched in order, unless separated by `Elision` lines. Matches occur greedily, that is, an Elision will skip as few lines as possible. To add a new elision marker. Put a comment containing only "..." and whitespace in any MIR testing block. Like so: ``` // fn write_42(_1: *mut i32) -> bool { // ... // bb0: { // Validate(Acquire, [_1: *mut i32]); // Validate(Release, [_1: *mut i32]); // ... // return; // } // } ``` Right now, all input before the line right after `// START` is elided, and all input after the line right before `// END` is also not tested. Many tests need to be updated. That will follow in the next commit. cc #45153
2017-10-09New rebase for the issue #45022k0pernicus-29/+47
Add pretty printer files into test execution time-stamping Move find_rust_src_path() as a method for Config Move find_rust_src_path() as a method for Config Call find_rust_src_path() from Config Move find_rust_src_path() from common.rs to header.rs Add pretty printer files as relevant files to get up_to_date information Remove dead code Add two pretty printer files to keep a close watch on Move find_rust_src_path() as a method for Config Move find_rust_src_path() as a method for Config Call find_rust_src_path() from Config Move find_rust_src_path() from common.rs to header.rs Remove dead code Add two pretty printer files to keep a close watch on
2017-10-06incr.comp.: Bring back output of -Zincremental-info.Michael Woerister-1/+0
2017-09-16fix test name being printed twice for ui testsRalf Jung-2/+0
2017-09-16compiletest: print the correct basename of the src dirRalf Jung-1/+1
2017-08-28compiletest: Change Config comments to doc commentsThomas Jespersen-39/+39
2017-08-27Additional libc cleanupTatsuyuki Ishi-0/+1
2017-08-23capture `adb shell` stdoutAndy Russell-0/+2
2017-08-22remove needless cloneAndy Russell-1/+1
2017-08-16remove procsrv moduleAndy Russell-51/+28
2017-08-16remove `extra_args` argumentAndy Russell-48/+38
2017-08-16return `Command` from make_compile_argsAndy Russell-68/+45
2017-08-16make `compose_and_run_compiler` take `Command`Andy Russell-52/+40
2017-08-16remove `working_dir` argumentAndy Russell-40/+20
2017-08-16let `compose_and_run` take a `Command`Andy Russell-68/+55
2017-08-16replace procsrv functions with `Command`Andy Russell-182/+70
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-28/+28
Like #43008 (f668999), but _much more aggressive_.
2017-08-09rustc: Rearchitect lints to be emitted more eagerlyAlex Crichton-3/+15
In preparation for incremental compilation this commit refactors the lint handling infrastructure in the compiler to be more "eager" and overall more incremental-friendly. Many passes of the compiler can emit lints at various points but before this commit all lints were buffered in a table to be emitted at the very end of compilation. This commit changes these lints to be emitted immediately during compilation using pre-calculated lint level-related data structures. Linting today is split into two phases, one set of "early" lints run on the `syntax::ast` and a "late" set of lints run on the HIR. This commit moves the "early" lints to running as late as possible in compilation, just before HIR lowering. This notably means that we're catching resolve-related lints just before HIR lowering. The early linting remains a pass very similar to how it was before, maintaining context of the current lint level as it walks the tree. Post-HIR, however, linting is structured as a method on the `TyCtxt` which transitively executes a query to calculate lint levels. Each request to lint on a `TyCtxt` will query the entire crate's 'lint level data structure' and then go from there about whether the lint should be emitted or not. The query depends on the entire HIR crate but should be very quick to calculate (just a quick walk of the HIR) and the red-green system should notice that the lint level data structure rarely changes, and should hopefully preserve incrementality. Overall this resulted in a pretty big change to the test suite now that lints are emitted much earlier in compilation (on-demand vs only at the end). This in turn necessitated the addition of many `#![allow(warnings)]` directives throughout the compile-fail test suite and a number of updates to the UI test suite.
2017-07-27Don't needlessly build rustdoc for compiletest.Mark Simulacrum-6/+8
For most tests, rustdoc isn't needed, so avoid building it.
2017-07-17Only set cwd for test process, not compilerRichard Dodd-11/+40
2017-07-17Try running all tests using cwdRichard Dodd-5/+3
2017-07-17Make compiletest set cwd before running js testsRichard Dodd-3/+22
2017-07-13Reduce the usage of features in compiletest and libtestOliver Schneider-2/+1
2017-07-11compiletest: Support custom normalization rules.kennytm-6/+65
2017-07-11compiletest: Refactor: Move the `ignore-{}` logic into its own method.kennytm-30/+34
Prepare for `normalize-std???` which will share the same logic. Added `ignore-32bit` and `ignore-64bit`.
2017-07-01Auto merge of #42896 - llogiq:clippy_compiletest, r=alexcrichtonbors-94/+79
fixed some clippy warnings in compiletest This is mainly readability stuff. Whenever the `clone_ref` lint asked me to clone the dereferenced object, I removed the `.clone()` instead, relying on the fact that it has worked so far and the immutable borrow ensures that the value won't change.
2017-06-29fix a stray semicolonAndre Bogus-1/+1
2017-06-29Rollup merge of #42219 - pwoolcoc:add-allow-fail-to-libtest, r=GuillaumeGomezAriel Ben-Yehuda-0/+1
add `allow_fail` test attribute This change allows the user to add an `#[allow_fail]` attribute to tests that will cause the test to compile & run, but if the test fails it will not cause the entire test run to fail. The test output will show the failure, but in yellow instead of red, and also indicate that it was an allowed failure. Here is an example of the output: http://imgur.com/a/wt7ga
2017-06-27address tidy error & commentAndre Bogus-4/+3
2017-06-27compiletest: show details if GDB failed to execute.kennytm-1/+1
2017-06-25fixed some clippy warnings in compiletestAndre Bogus-93/+79
2017-06-24add `allow_fail` test attributePaul Woolcock-0/+1
This change allows the user to add an `#[allow_fail]` attribute to tests that will cause the test to compile & run, but if the test fails it will not cause the entire test run to fail. The test output will show the failure, but in yellow instead of red, and also indicate that it was an allowed failure.